update docker env
This commit is contained in:
@@ -5,8 +5,12 @@ copy ..\sql\wfc-cloud.sql .\mysql\db
|
|||||||
copy ..\sql\wfc-config.sql .\mysql\db
|
copy ..\sql\wfc-config.sql .\mysql\db
|
||||||
|
|
||||||
REM 复制 HTML 文件
|
REM 复制 HTML 文件
|
||||||
echo begin copy html
|
echo begin copy sys html
|
||||||
xcopy /E /I ..\..\fe.wfc\dist\* .\nginx\html\dist
|
rmdir /s /q .\nginx\html\dist\sys
|
||||||
|
xcopy /E /I /Y ..\..\fe.wfc\dist\* .\nginx\html\dist\sys
|
||||||
|
echo begin copy user html
|
||||||
|
rmdir /s /q .\nginx\html\dist\u
|
||||||
|
xcopy /E /I /Y ..\..\fe.wfc.user\dist\* .\nginx\html\dist\u
|
||||||
|
|
||||||
REM 复制 JAR 文件
|
REM 复制 JAR 文件
|
||||||
echo begin copy wfc-gateway
|
echo begin copy wfc-gateway
|
||||||
|
|||||||
@@ -13,9 +13,11 @@ cp ../sql/wfc-cloud.sql ./mysql/db
|
|||||||
cp ../sql/wfc-config.sql ./mysql/db
|
cp ../sql/wfc-config.sql ./mysql/db
|
||||||
|
|
||||||
# copy html
|
# copy html
|
||||||
echo "begin copy html "
|
echo "begin copy sys html "
|
||||||
cp -r ../../fe.wfc/dist/** ./nginx/html/dist
|
cp -rf ../../fe.wfc/dist/** ./nginx/html/dist/sys/
|
||||||
|
|
||||||
|
echo "begin copy user html "
|
||||||
|
cp -rf ../../fe.wfc.user/dist/** ./nginx/html/dist/u/
|
||||||
|
|
||||||
# copy jar
|
# copy jar
|
||||||
echo "begin copy wfc-gateway "
|
echo "begin copy wfc-gateway "
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
version : '3.8'
|
|
||||||
services:
|
services:
|
||||||
wfc-nacos:
|
wfc-nacos:
|
||||||
container_name: wfc-nacos
|
container_name: wfc-nacos
|
||||||
@@ -57,7 +56,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/html/dist:/home/wfc/projects/wfc-ui
|
- ./nginx/html/dist:/home/wfc/portal
|
||||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||||
- ./nginx/logs:/var/log/nginx
|
- ./nginx/logs:/var/log/nginx
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||||
|
|||||||
@@ -14,18 +14,32 @@ http {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location / {
|
location /sys {
|
||||||
root /home/wfc/projects/wfc-ui;
|
root /home/wfc/portal;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /prod-api/{
|
location /sys-api/{
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header REMOTE-HOST $remote_addr;
|
proxy_set_header REMOTE-HOST $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
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暴露
|
# 避免actuator暴露
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ FROM nginx
|
|||||||
MAINTAINER wfc
|
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文件到路径
|
# 复制conf文件到路径
|
||||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||||
# 复制html文件到路径
|
# 复制html文件到路径
|
||||||
COPY ./html/dist /home/wfc/projects/wfc-ui
|
COPY ./html/dist /home/wfc/portal
|
||||||
|
|||||||
4
docker/nginx/html/dist/readme.txt
vendored
4
docker/nginx/html/dist/readme.txt
vendored
@@ -1 +1,3 @@
|
|||||||
<EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD>wfc-ui<75><69><EFBFBD><EFBFBD><EFBFBD>õľ<C3B5>̬<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>nginx<6E><78><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʡ<EFBFBD>
|
1. 目录./sys存放客户平台(sys portal)前端文件
|
||||||
|
2. 目录./u存放用户平台(user portal)前端文件
|
||||||
|
用于nginx自动执行
|
||||||
Reference in New Issue
Block a user