[部署]:解决报错

This commit is contained in:
fanxb 2019-07-16 05:10:43 -04:00
parent c242539a93
commit 34d1b79d5c
2 changed files with 11 additions and 11 deletions

View File

@ -14,7 +14,7 @@ services:
- /etc/localtime:/etc/localtime
- ./timezone:/etc/timezone
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=bookmark
bookmark-redis:
image: redis:3.2.10
@ -30,6 +30,8 @@ services:
bookmark-front:
image: nginx
container_name: bookmark-front
depends_on:
- bookmark-service
networks:
- bookmark
volumes:
@ -51,21 +53,22 @@ services:
volumes:
- /etc/localtime:/etc/localtime
- ./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
command:
- /bin/bash
- -c
- |
sleep 20 && \
ls -l && \
java -jar -DisDev=false \
-DjwtSecret= \
-DjwtSecret=123456 \
-Dmybatis.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl \
-Dspring.mail.host= \
-Dspring.mail.username= \
-Dspring.mail.password= \
-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.redis.host=bookmark-redis \
service.jar

View File

@ -23,10 +23,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_prefer_server_ciphers on;
upstream bookmark-service{
server bookmark-service:8088;
keepalive 2000;
}
server {
listen 8080;
listen [::]:8080;
@ -34,7 +31,7 @@ http {
root /opt/dist/;
server_name _;
location /bookmark/api/ {
proxy_pass http://bookmark-service;
proxy_pass http://bookmark-service:8088;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 100m;