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
|
||||
|
||||
REM 复制 HTML 文件
|
||||
echo begin copy html
|
||||
xcopy /E /I ..\..\fe.wfc\dist\* .\nginx\html\dist
|
||||
echo begin copy sys html
|
||||
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 文件
|
||||
echo begin copy wfc-gateway
|
||||
|
||||
@@ -13,9 +13,11 @@ cp ../sql/wfc-cloud.sql ./mysql/db
|
||||
cp ../sql/wfc-config.sql ./mysql/db
|
||||
|
||||
# copy html
|
||||
echo "begin copy html "
|
||||
cp -r ../../fe.wfc/dist/** ./nginx/html/dist
|
||||
echo "begin copy sys html "
|
||||
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
|
||||
echo "begin copy wfc-gateway "
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
version : '3.8'
|
||||
services:
|
||||
wfc-nacos:
|
||||
container_name: wfc-nacos
|
||||
@@ -57,7 +56,7 @@ services:
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/html/dist:/home/wfc/projects/wfc-ui
|
||||
- ./nginx/html/dist:/home/wfc/portal
|
||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/logs:/var/log/nginx
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
|
||||
@@ -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,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
|
||||
|
||||
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