2019-07-05 17:00:22 +08:00
|
|
|
|
version: "2"
|
2019-12-13 23:47:47 +08:00
|
|
|
|
services:
|
2021-03-09 11:40:21 +08:00
|
|
|
|
mysql:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
image: mysql:8.0.16
|
2019-12-13 23:47:47 +08:00
|
|
|
|
networks:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- bookmark
|
2021-03-16 10:37:15 +08:00
|
|
|
|
ports:
|
|
|
|
|
- 13454:3306
|
2019-12-13 23:47:47 +08:00
|
|
|
|
volumes:
|
2021-03-09 11:40:21 +08:00
|
|
|
|
- ./data/mysql/data:/var/lib/mysql
|
2021-03-09 14:39:47 +08:00
|
|
|
|
# mysql文件备份目录
|
|
|
|
|
- ./data/mysql/backup:/backup
|
2021-03-09 11:40:21 +08:00
|
|
|
|
- ./data/mysql/temp:/var/lib/mysql-files
|
|
|
|
|
- ./data/mysql/my.cnf:/etc/mysql/my.cnf
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- /etc/localtime:/etc/localtime
|
2021-03-09 11:40:21 +08:00
|
|
|
|
- ./data/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
|
2021-03-14 23:36:30 +08:00
|
|
|
|
|
|
|
|
|
# redis未设置密码,如端口暴露可能会被攻击
|
2021-03-09 11:40:21 +08:00
|
|
|
|
redis:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
image: redis:3.2.10
|
2019-12-13 23:47:47 +08:00
|
|
|
|
volumes:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- /etc/localtime:/etc/localtime
|
2021-03-09 11:40:21 +08:00
|
|
|
|
- ./data/timezone:/etc/timezone
|
2021-11-04 16:54:27 +08:00
|
|
|
|
- ./data/redis:/data
|
2019-12-13 23:47:47 +08:00
|
|
|
|
networks:
|
2019-07-05 16:33:40 +08:00
|
|
|
|
- bookmark
|
2021-03-14 23:36:30 +08:00
|
|
|
|
|
2021-03-09 11:40:21 +08:00
|
|
|
|
front:
|
2019-07-16 15:21:01 +08:00
|
|
|
|
image: nginx
|
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
|
2021-03-09 11:40:21 +08:00
|
|
|
|
- ./data/timezone:/etc/timezone
|
|
|
|
|
- ./bookmark_front/dist:/opt/dist
|
|
|
|
|
- ./data/nginx/nginx.conf:/etc/nginx/nginx.conf
|
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:
|
2021-03-16 10:37:15 +08:00
|
|
|
|
- 8080:8080
|
2021-03-14 23:36:30 +08:00
|
|
|
|
|
2021-03-09 11:40:21 +08:00
|
|
|
|
pinyin:
|
|
|
|
|
image: node:lts-buster-slim
|
2020-03-29 17:20:41 +08:00
|
|
|
|
networks:
|
|
|
|
|
- bookmark
|
|
|
|
|
volumes:
|
|
|
|
|
- /etc/localtime:/etc/localtime
|
2021-03-09 11:40:21 +08:00
|
|
|
|
- ./data/timezone:/etc/timezone
|
|
|
|
|
- ./pinyinService:/opt/app
|
2020-03-29 17:20:41 +08:00
|
|
|
|
working_dir: /opt/app
|
2021-03-14 23:36:30 +08:00
|
|
|
|
command:
|
2020-03-29 17:52:08 +08:00
|
|
|
|
- /bin/bash
|
|
|
|
|
- -c
|
|
|
|
|
- |
|
|
|
|
|
ls -l && \
|
|
|
|
|
cd /opt/app && \
|
|
|
|
|
npm --registry https://registry.npm.taobao.org install && \
|
|
|
|
|
node index.js 8012 123456321
|
2021-03-14 23:36:30 +08:00
|
|
|
|
|
|
|
|
|
# icon服务(默认端口8080)
|
|
|
|
|
iconserver:
|
|
|
|
|
image: matthiasluedtke/iconserver:latest
|
|
|
|
|
networks:
|
|
|
|
|
- bookmark
|
2021-03-16 10:37:15 +08:00
|
|
|
|
ports:
|
|
|
|
|
- 19843:8080
|
2021-03-14 23:36:30 +08:00
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
2021-03-09 11:40:21 +08:00
|
|
|
|
backend:
|
|
|
|
|
image: openjdk:11.0
|
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
|
2021-03-09 11:40:21 +08:00
|
|
|
|
- ./data/timezone:/etc/timezone
|
|
|
|
|
- ./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-06-16 00:33:37 +08:00
|
|
|
|
java -jar -Dspring.profiles.active=prd \
|
2020-06-16 00:06:46 +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} \
|
2020-06-16 00:06:46 +08:00
|
|
|
|
-Dspring.mail.username='${SMTP_USERNAME}' \
|
|
|
|
|
-Dspring.mail.password='${SMTP_PASSWORD}' \
|
|
|
|
|
-Dspring.datasource.druid.password='${MYSQL_PASSWORD}' \
|
2021-03-09 11:40:21 +08:00
|
|
|
|
-Dspring.datasource.druid.url=jdbc:mysql://${MYSQL_ADDRESS}/bookmark?useUnicode=true\&characterEncoding=utf-8\&useSSL=false\&useJDBCCompliantTimezoneShift=true\&useLegacyDatetimeCode=false\&serverTimezone=UTC \
|
|
|
|
|
-Dspring.redis.host=${REDIS_HOST} \
|
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 \
|
2021-03-09 11:40:21 +08:00
|
|
|
|
-Dpinyin.base-url=http://pinyin:8012 \
|
2020-03-29 17:20:41 +08:00
|
|
|
|
-Dpinyin.token=123456321 \
|
2021-03-14 23:36:30 +08:00
|
|
|
|
-DurlIconAddress=http://iconserver:8080 \
|
|
|
|
|
-Dproxy.ip=${PROXY_IP} \
|
|
|
|
|
-Dproxy.port=${PROXY_PORT} \
|
|
|
|
|
-DOAuth.github.clientId=${GITHUB_CLIENT_ID} \
|
|
|
|
|
-DOAuth.github.secret=${GITHUB_SECRET} \
|
|
|
|
|
-DmanageUserId=${MANAGE_USER_ID} \
|
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:
|