-
Notifications
You must be signed in to change notification settings - Fork 33
/
docker-compose.yml
95 lines (91 loc) · 2.88 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: "2"
services:
mysql:
image: mysql:8.0.16
networks:
- bookmark
ports:
- 13454:3306
volumes:
- ./data/mysql/data:/var/lib/mysql
# mysql文件备份目录
- ./data/mysql/backup:/backup
- ./data/mysql/temp:/var/lib/mysql-files
- ./data/mysql/my.cnf:/etc/mysql/my.cnf
- /etc/localtime:/etc/localtime
- ./data/timezone:/etc/timezone
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=bookmark
# redis未设置密码,如端口暴露可能会被攻击
redis:
image: redis:3.2.10
volumes:
- /etc/localtime:/etc/localtime
- ./data/timezone:/etc/timezone
- ./data/redis:/data
restart: unless-stopped
networks:
- bookmark
front:
image: nginx
networks:
- bookmark
volumes:
- /etc/localtime:/etc/localtime
- ./data/timezone:/etc/timezone
- ./bookmark_front/dist:/opt/dist
- ./data/nginx/nginx.conf:/etc/nginx/nginx.conf
- ${BOOKMARK_FILE_SAVE_PATH}/files/public:/opt/files/public
restart: unless-stopped
ports:
- 8080:8080
# icon服务(默认端口8080)
iconserver:
image: matthiasluedtke/iconserver:latest
networks:
- bookmark
ports:
- 19843:8080
restart: unless-stopped
backend:
image: openjdk:11.0
networks:
- bookmark
volumes:
- /etc/localtime:/etc/localtime
- ./data/timezone:/etc/timezone
- ./bookMarkService/web/target/bookmark-web-1.0-SNAPSHOT.jar:/opt/app/service.jar
- ${BOOKMARK_FILE_SAVE_PATH}:/opt/files
working_dir: /opt/app
restart: unless-stopped
command:
- /bin/bash
- -c
- |
sleep 20 && \
ls -l && \
java -jar -Dspring.profiles.active=prd \
-DjwtSecret='${JWT_SECRET}' \
-Dmybatis-plus.configuration.log-impl=org.apache.ibatis.logging.nologging.NoLoggingImpl \
-Dspring.mail.host=${SMTP_HOST} \
-Dspring.mail.username='${SMTP_USERNAME}' \
-Dspring.mail.password='${SMTP_PASSWORD}' \
-Dspring.datasource.druid.password='${MYSQL_PASSWORD}' \
-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} \
-Des.host=bookmark-es \
-DserviceAddress=${BOOKMARK_HOST} \
-DfileSavePath=/opt/files \
-Dpinyin.base-url=http://pinyin:8012 \
-Dpinyin.token=123456321 \
-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} \
service.jar
networks:
bookmark: