-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (57 loc) · 1.5 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
services:
group_center:
image: registry.cn-shanghai.aliyuncs.com/a645162/group-center:latest
# image: a645162/group-center:latest
# image: group_center
# build:
# context: .
# dockerfile: Dockerfile
ports:
- 15090:15090
- 15092:15092
networks:
group-center-network:
aliases:
- GROUP_CENTER_URL
restart: always
container_name: GroupCenterJdk21
depends_on:
db:
condition: service_healthy
links:
- db
volumes:
- ./Config:/usr/local/group-center/Config
# - ./src/main/resources/application-docker.yml:/usr/local/group-center/application.yml
- ./Data/Log:/usr/local/group-center/logs
environment:
SPRING_DATASOURCE_HOST: db:3306
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: 123456
# Here should be the same as SPRING_DATASOURCE_HOST
db:
image: mysql:9
ports:
- 15096:3306
networks:
group-center-network:
aliases:
- MYSQL_URL
restart: always
container_name: GroupCenterMySQL
privileged: true
healthcheck:
test: [ "CMD-SHELL", "mysqladmin ping -h127.0.0.1 -u root -p123456" ]
interval: 5s
start_period: 5s
timeout: 2s
retries: 10
volumes:
- ./Data/Db/MySQL:/var/lib/mysql
- ./Data/Db/Backup:/usr/local/backup
environment:
MYSQL_DATABASE: group_center
MYSQL_ROOT_PASSWORD: 123456
networks:
group-center-network:
driver: bridge