update docker env

This commit is contained in:
simonzhangsz committed 2024-12-03 09:51:01 +08:00
1 parent 65e17f074e
commit 8ad015968f
6 files changed
+36 -15

No files matched your search

+18 -4
View File
@@ -14,18 +14,32 @@ http {
listen 80;
server_name localhost;
location / {
root /home/wfc/projects/wfc-ui;
location /sys {
root /home/wfc/portal;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /prod-api/{
location /sys-api/{
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.2.248:8080/;
proxy_pass http://wfc-gateway:8080/;
}
location /u {
root /home/wfc/portal;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /u-api/{
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://wfc-gateway:8080/;
}
# 避免actuator暴露
+4 -4
View File
@@ -4,12 +4,12 @@ FROM nginx
MAINTAINER wfc
# 挂载目录
VOLUME /home/wfc/projects/wfc-ui
VOLUME /home/wfc/portal
# 创建目录
RUN mkdir -p /home/wfc/projects/wfc-ui
RUN mkdir -p /home/wfc/portal
# 指定路径
WORKDIR /home/wfc/projects/wfc-ui
WORKDIR /home/wfc/portal
# 复制conf文件到路径
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
# 复制html文件到路径
COPY ./html/dist /home/wfc/projects/wfc-ui
COPY ./html/dist /home/wfc/portal
+3 -1
View File
@@ -1 +1,3 @@
���ǰ��wfc-ui�����õľ�̬�ļ�������nginx������ʡ�
1. 目录./sys存放客户平台(sys portal)前端文件
2. 目录./u存放用户平台(user portal)前端文件
用于nginx自动执行