[部署]:解决报错
This commit is contained in:
parent
c242539a93
commit
34d1b79d5c
@ -14,7 +14,7 @@ services:
|
|||||||
- /etc/localtime:/etc/localtime
|
- /etc/localtime:/etc/localtime
|
||||||
- ./timezone:/etc/timezone
|
- ./timezone:/etc/timezone
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=
|
- MYSQL_ROOT_PASSWORD=123456
|
||||||
- MYSQL_DATABASE=bookmark
|
- MYSQL_DATABASE=bookmark
|
||||||
bookmark-redis:
|
bookmark-redis:
|
||||||
image: redis:3.2.10
|
image: redis:3.2.10
|
||||||
@ -30,6 +30,8 @@ services:
|
|||||||
bookmark-front:
|
bookmark-front:
|
||||||
image: nginx
|
image: nginx
|
||||||
container_name: bookmark-front
|
container_name: bookmark-front
|
||||||
|
depends_on:
|
||||||
|
- bookmark-service
|
||||||
networks:
|
networks:
|
||||||
- bookmark
|
- bookmark
|
||||||
volumes:
|
volumes:
|
||||||
@ -51,21 +53,22 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime
|
- /etc/localtime:/etc/localtime
|
||||||
- ./timezone:/etc/timezone
|
- ./timezone:/etc/timezone
|
||||||
- ../bookMarkService/web/target/web-1.0-SNAPSHOT.jar:/opt/app/service.jar
|
- ../bookMarkService/web/target/bookmark-web-1.0-SNAPSHOT.jar:/opt/app/service.jar
|
||||||
working_dir: /opt/app
|
working_dir: /opt/app
|
||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
sleep 20 && \
|
sleep 20 && \
|
||||||
|
ls -l && \
|
||||||
java -jar -DisDev=false \
|
java -jar -DisDev=false \
|
||||||
-DjwtSecret= \
|
-DjwtSecret=123456 \
|
||||||
-Dmybatis.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl \
|
-Dmybatis.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl \
|
||||||
-Dspring.mail.host= \
|
-Dspring.mail.host= \
|
||||||
-Dspring.mail.username= \
|
-Dspring.mail.username= \
|
||||||
-Dspring.mail.password= \
|
-Dspring.mail.password= \
|
||||||
-Dspring.mail.port= \
|
-Dspring.mail.port= \
|
||||||
-Dspring.datasource.druid.password= \
|
-Dspring.datasource.druid.password=123456 \
|
||||||
-Dspring.datasource.druid.url=jdbc:mysql://bookmark-mysql:3306/bookmark?useUnicode=true\&characterEncoding=utf-8\&useSSL=false\&useJDBCCompliantTimezoneShift=true\&useLegacyDatetimeCode=false\&serverTimezone=UTC \
|
-Dspring.datasource.druid.url=jdbc:mysql://bookmark-mysql:3306/bookmark?useUnicode=true\&characterEncoding=utf-8\&useSSL=false\&useJDBCCompliantTimezoneShift=true\&useLegacyDatetimeCode=false\&serverTimezone=UTC \
|
||||||
-Dspring.redis.host=bookmark-redis \
|
-Dspring.redis.host=bookmark-redis \
|
||||||
service.jar
|
service.jar
|
||||||
|
@ -23,10 +23,7 @@ http {
|
|||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
ssl_prefer_server_ciphers on;
|
ssl_prefer_server_ciphers on;
|
||||||
upstream bookmark-service{
|
|
||||||
server bookmark-service:8088;
|
|
||||||
keepalive 2000;
|
|
||||||
}
|
|
||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8080;
|
||||||
listen [::]:8080;
|
listen [::]:8080;
|
||||||
@ -34,7 +31,7 @@ http {
|
|||||||
root /opt/dist/;
|
root /opt/dist/;
|
||||||
server_name _;
|
server_name _;
|
||||||
location /bookmark/api/ {
|
location /bookmark/api/ {
|
||||||
proxy_pass http://bookmark-service;
|
proxy_pass http://bookmark-service:8088;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
client_max_body_size 100m;
|
client_max_body_size 100m;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user