2019-07-05 17:00:22 +08:00
|
|
|
|
version: "2"
|
2019-12-13 23:47:47 +08:00
|
|
|
|
services:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
bookmark-mysql:
|
|
|
|
|
image: mysql:8.0.16
|
|
|
|
|
container_name: bookmark-mysql
|
2019-12-13 23:47:47 +08:00
|
|
|
|
ports:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- 3307:3306
|
2019-12-13 23:47:47 +08:00
|
|
|
|
networks:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- bookmark
|
2019-12-13 23:47:47 +08:00
|
|
|
|
volumes:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- ./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
|
2019-12-13 23:47:47 +08:00
|
|
|
|
environment:
|
2019-07-29 13:58:51 +08:00
|
|
|
|
- MYSQL_ROOT_PASSWORD=${MYSQL_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
|
2019-12-13 23:47:47 +08:00
|
|
|
|
volumes:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
|
- ./timezone:/etc/timezone
|
2019-12-13 23:47:47 +08:00
|
|
|
|
networks:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- bookmark
|
2019-07-16 17:00:27 +08:00
|
|
|
|
# redis未设置密码,如端口暴露可能会被攻击
|
2019-07-05 16:33:40 +08:00
|
|
|
|
ports:
|
2019-12-13 23:47:47 +08:00
|
|
|
|
- 6380:6379
|
2019-07-19 15:13:45 +08:00
|
|
|
|
bookmark-es:
|
2020-01-25 18:09:39 +08:00
|
|
|
|
image: elasticsearch:7.2.0
|
2019-07-19 15:13:45 +08:00
|
|
|
|
container_name: bookmark-es
|
2019-12-13 23:47:47 +08:00
|
|
|
|
volumes:
|
2019-07-19 15:47:12 +08:00
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
|
- ./timezone:/etc/timezone
|
2019-07-19 15:13:45 +08:00
|
|
|
|
- ./es/data:/usr/share/elasticsearch/data
|
2019-07-19 15:47:12 +08:00
|
|
|
|
- ./es/ik:/usr/share/elasticsearch/plugins/ik
|
2019-07-22 16:51:02 +08:00
|
|
|
|
- ./es/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
2019-08-22 10:01:01 +08:00
|
|
|
|
environment:
|
2019-11-30 04:22:30 +00:00
|
|
|
|
- "ES_JAVA_OPTS=-Xms1500m -Xmx1500m"
|
2019-07-19 15:13:45 +08:00
|
|
|
|
ports:
|
|
|
|
|
- 9200:9200
|
|
|
|
|
- 9300:9300
|
2019-12-13 23:47:47 +08:00
|
|
|
|
networks:
|
2019-07-19 15:13:45 +08:00
|
|
|
|
- bookmark
|
2019-07-16 15:21:01 +08:00
|
|
|
|
bookmark-front:
|
|
|
|
|
image: nginx
|
|
|
|
|
container_name: bookmark-front
|
2019-07-16 05:10:43 -04:00
|
|
|
|
depends_on:
|
|
|
|
|
- bookmark-service
|
2019-12-13 23:47:47 +08:00
|
|
|
|
networks:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
- bookmark
|
2019-12-13 23:47:47 +08:00
|
|
|
|
volumes:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
|
- ./timezone:/etc/timezone
|
|
|
|
|
- ../front/build:/opt/dist
|
|
|
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
|
|
|
- ./nginx/log:/var/log/nginx
|
2019-11-17 10:51:56 +00:00
|
|
|
|
- ${BOOKMARK_FILE_SAVE_PATH}/files/public:/opt/files/public
|
2019-12-13 23:47:47 +08:00
|
|
|
|
ports:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
- 8083:8080
|
|
|
|
|
bookmark-service:
|
2019-07-29 13:58:51 +08:00
|
|
|
|
image: registry.cn-hangzhou.aliyuncs.com/fleyx/node-java-env:v2
|
2019-07-16 15:21:01 +08:00
|
|
|
|
container_name: bookmark-service
|
2019-12-13 23:47:47 +08:00
|
|
|
|
depends_on:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
- bookmark-mysql
|
|
|
|
|
- bookmark-redis
|
2019-07-19 15:13:45 +08:00
|
|
|
|
- bookmark-es
|
2019-12-13 23:47:47 +08:00
|
|
|
|
networks:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
- bookmark
|
2019-12-13 23:47:47 +08:00
|
|
|
|
volumes:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
- /etc/localtime:/etc/localtime
|
|
|
|
|
- ./timezone:/etc/timezone
|
2019-07-16 05:10:43 -04:00
|
|
|
|
- ../bookMarkService/web/target/bookmark-web-1.0-SNAPSHOT.jar:/opt/app/service.jar
|
2019-11-17 10:51:56 +00:00
|
|
|
|
- ${BOOKMARK_FILE_SAVE_PATH}:/opt/files
|
2019-07-16 15:21:01 +08:00
|
|
|
|
working_dir: /opt/app
|
2019-12-13 23:47:47 +08:00
|
|
|
|
command:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
- /bin/bash
|
|
|
|
|
- -c
|
|
|
|
|
- |
|
|
|
|
|
sleep 20 && \
|
2019-07-16 05:10:43 -04:00
|
|
|
|
ls -l && \
|
2020-03-22 23:40:24 +08:00
|
|
|
|
java -jar -Dspring.profiles.actice=prd \
|
2019-07-29 13:58:51 +08:00
|
|
|
|
-DjwtSecret=${JWT_SECRET} \
|
2019-12-15 21:43:31 +08:00
|
|
|
|
-Dmybatis-plus.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl \
|
2019-07-29 13:58:51 +08:00
|
|
|
|
-Dspring.mail.host=${SMTP_HOST} \
|
|
|
|
|
-Dspring.mail.username=${SMTP_USERNAME} \
|
|
|
|
|
-Dspring.mail.password=${SMTP_PASSWORD} \
|
|
|
|
|
-Dspring.datasource.druid.password=${MYSQL_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 \
|
2019-07-26 16:44:57 +08:00
|
|
|
|
-Des.host=bookmark-es \
|
2019-11-17 17:40:56 +08:00
|
|
|
|
-DserviceAddress=${BOOKMARK_HOST} \
|
2019-11-17 10:51:56 +00:00
|
|
|
|
-DfileSavePath=/opt/files \
|
2019-12-13 23:47:47 +08:00
|
|
|
|
-DserviceAddress=https://bm.tapme.top \
|
2019-07-16 15:21:01 +08:00
|
|
|
|
service.jar
|
2019-12-13 23:47:47 +08:00
|
|
|
|
networks:
|
2019-07-16 05:10:43 -04:00
|
|
|
|
bookmark:
|