This commit is contained in:
2026-03-14 16:28:54 +08:00
commit fa9a4fcc10
1412 changed files with 231831 additions and 0 deletions

5
docker/Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM nginx
RUN rm /etc/nginx/conf.d/default.conf
RUN /bin/bash -c 'echo init ok'

View File

@@ -0,0 +1,22 @@
version: '3'
services:
honeycom-ui:
build:
context: .
restart: always
container_name: honeycom-ui
image: honeycom-ui
networks:
- spring_cloud_default
volumes:
- ../dist:/data/main
- ./honeycom-ui.conf:/etc/nginx/conf.d/default.conf
external_links:
- honeycom-gateway
ports:
- 80:80
# 加入到后端网络, 默认为 honeycom_default | docker network ls 查看
networks:
spring_cloud_default:
external: true

40
docker/honeycom-ui.conf Normal file
View File

@@ -0,0 +1,40 @@
client_max_body_size 64m; # 最大上传文件大小!
server {
listen 80;
server_name localhost;
gzip on;
gzip_static on; # 需要http_gzip_static_module 模块
gzip_min_length 1k;
gzip_comp_level 4;
gzip_proxied any;
gzip_types text/plain text/xml text/css;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
# 前端打包好的dist目录文件
root /data/main/;
location / {
index index.html;
try_files $uri $uri/ /index.html;
if ($request_filename ~ .*\.(htm|html)$) {
add_header Cache-Control no-store;
}
}
location ^~/api/ {
proxy_pass http://honeycom-gateway:9999/; #注意/后缀
proxy_connect_timeout 60s;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
}
}