diff --git a/bookMarkDocker/docker-compose.yml b/bookMarkDocker/docker-compose.yml index 5440345..33527f4 100644 --- a/bookMarkDocker/docker-compose.yml +++ b/bookMarkDocker/docker-compose.yml @@ -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,23 +53,24 @@ 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 networks: - bookmark: \ No newline at end of file + bookmark: diff --git a/bookMarkDocker/nginx/nginx.conf b/bookMarkDocker/nginx/nginx.conf index 905f1b8..f0cd3e9 100644 --- a/bookMarkDocker/nginx/nginx.conf +++ b/bookMarkDocker/nginx/nginx.conf @@ -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; @@ -45,4 +42,4 @@ http { try_files $uri $uri/ /index.html; } } -} \ No newline at end of file +}