2019-07-05 17:00:22 +08:00
|
|
|
|
version: "2"
|
2019-07-05 16:33:40 +08:00
|
|
|
|
services:
|
|
|
|
|
bookmark-mysql:
|
|
|
|
|
image: mysql:8.0.16
|
|
|
|
|
container_name: bookmark-mysql
|
|
|
|
|
ports:
|
|
|
|
|
- 3307:3306
|
|
|
|
|
networks:
|
|
|
|
|
- bookmark
|
|
|
|
|
volumes:
|
|
|
|
|
- ./mysql/data:/var/lib/mysql
|
|
|
|
|
- ./mysql/temp:/var/lib/mysql-files
|
|
|
|
|
- ./mysql/my.cnf:/etc/mysql/my.cnf
|
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
|
- ./timezone:/etc/timezone
|
|
|
|
|
environment:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
- MYSQL_ROOT_PASSWORD=
|
2019-07-05 17:00:22 +08:00
|
|
|
|
- MYSQL_DATABASE=bookmark
|
2019-07-05 16:33:40 +08:00
|
|
|
|
bookmark-redis:
|
|
|
|
|
image: redis:3.2.10
|
|
|
|
|
container_name: bookmark-redis
|
|
|
|
|
volumes:
|
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
|
- ./timezone:/etc/timezone
|
|
|
|
|
networks:
|
|
|
|
|
- bookmark
|
2019-07-16 17:00:27 +08:00
|
|
|
|
# redis未设置密码,如端口暴露可能会被攻击
|
2019-07-05 16:33:40 +08:00
|
|
|
|
ports:
|
2019-07-16 17:00:27 +08:00
|
|
|
|
- 6380:6379
|
2019-07-16 15:21:01 +08:00
|
|
|
|
bookmark-front:
|
|
|
|
|
image: nginx
|
|
|
|
|
container_name: bookmark-front
|
|
|
|
|
networks:
|
|
|
|
|
- bookmark
|
|
|
|
|
volumes:
|
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
|
- ./timezone:/etc/timezone
|
|
|
|
|
- ../front/build:/opt/dist
|
|
|
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
|
|
|
- ./nginx/log:/var/log/nginx
|
|
|
|
|
ports:
|
|
|
|
|
- 8083:8080
|
|
|
|
|
bookmark-service:
|
|
|
|
|
image: registry.cn-hangzhou.aliyuncs.com/fleyx/node-java-env:v1
|
|
|
|
|
container_name: bookmark-service
|
|
|
|
|
depends_on:
|
|
|
|
|
- bookmark-mysql
|
|
|
|
|
- bookmark-redis
|
|
|
|
|
networks:
|
|
|
|
|
- bookmark
|
|
|
|
|
volumes:
|
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
|
- ./timezone:/etc/timezone
|
|
|
|
|
- ../bookMarkService/web/target/web-1.0-SNAPSHOT.jar:/opt/app/service.jar
|
|
|
|
|
working_dir: /opt/app
|
|
|
|
|
command:
|
|
|
|
|
- /bin/bash
|
|
|
|
|
- -c
|
|
|
|
|
- |
|
|
|
|
|
sleep 20 && \
|
|
|
|
|
java -jar -DisDev=false \
|
|
|
|
|
-DjwtSecret= \
|
|
|
|
|
-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= \
|
2019-07-16 16:52:19 +08:00
|
|
|
|
-Dspring.datasource.druid.url=jdbc:mysql://bookmark-mysql:3306/bookmark?useUnicode=true\&characterEncoding=utf-8\&useSSL=false\&useJDBCCompliantTimezoneShift=true\&useLegacyDatetimeCode=false\&serverTimezone=UTC \
|
2019-07-16 15:21:01 +08:00
|
|
|
|
-Dspring.redis.host=bookmark-redis \
|
|
|
|
|
service.jar
|
2019-07-05 16:33:40 +08:00
|
|
|
|
networks:
|
|
|
|
|
bookmark:
|