deploy:修改nginx配置,支持公共文件访问

This commit is contained in:
fanxb 2019-11-17 10:51:56 +00:00
parent bd5257046c
commit 6e49cf4a4c
4 changed files with 14442 additions and 5 deletions

4
bookMarkDocker/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
mavenRep
es/data
mysql/data
nginx/log

View File

@ -56,7 +56,7 @@ services:
- ../front/build:/opt/dist
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/log:/var/log/nginx
- ${BOOKMARK_FILE_SAVE_PATH}/public:/opt/files/public
- ${BOOKMARK_FILE_SAVE_PATH}/files/public:/opt/files/public
ports:
- 8083:8080
bookmark-service:
@ -72,6 +72,7 @@ services:
- /etc/localtime:/etc/localtime
- ./timezone:/etc/timezone
- ../bookMarkService/web/target/bookmark-web-1.0-SNAPSHOT.jar:/opt/app/service.jar
- ${BOOKMARK_FILE_SAVE_PATH}:/opt/files
working_dir: /opt/app
command:
- /bin/bash
@ -90,7 +91,7 @@ services:
-Dspring.redis.host=bookmark-redis \
-Des.host=bookmark-es \
-DserviceAddress=${BOOKMARK_HOST} \
-DfileSavePath=${BOOKMARK_FILE_SAVE_PATH} \
-DfileSavePath=/opt/files \
service.jar
networks:
bookmark:

View File

@ -36,14 +36,17 @@ http {
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 100m;
}
location /files/public/{
root /opt;
}
location / {
root /opt/dist;
index index.html;
try_files $uri $uri/ /index.html;
}
location /files/public{
root /opt/files/public;
}
}
}

14429
front/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff