deploy:修改nginx配置,支持公共文件访问
This commit is contained in:
parent
bd5257046c
commit
6e49cf4a4c
4
bookMarkDocker/.gitignore
vendored
Normal file
4
bookMarkDocker/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
mavenRep
|
||||
es/data
|
||||
mysql/data
|
||||
nginx/log
|
@ -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:
|
||||
|
@ -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
14429
front/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user