-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
57 lines (53 loc) · 1.43 KB
/
docker-compose.yaml
File metadata and controls
57 lines (53 loc) · 1.43 KB
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
services:
backend:
image: ghcr.io/sysu-aicpm/backend:latest
container_name: aicpm-backend
ports:
- "8000:8000"
environment:
- DB_ENGINE=django.db.backends.mysql
- DB_HOST=aicpm-sql
- DB_PORT=3306
- DB_NAME=${MYSQL_DATABASE:-sysu-aicpm2025}
- DB_USER=root
- DB_PASSWORD=${MYSQL_ROOT_PASSWORD:-sysu-aicpm2025}
- ALLOWED_HOSTS=172.18.198.206,localhost,127.0.0.1
- ENVIROMENT=deployment
depends_on:
aicpm-sql:
condition: service_healthy
networks:
- aicpm-network
aicpm-sql:
image: mysql:latest
container_name: aicpm-sql
command: >
bash -c "/bin/bash docker-entrypoint.sh mysqld"
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-sysu-aicpm2025}
MYSQL_DATABASE: ${MYSQL_DATABASE:-sysu-aicpm2025}
volumes:
- ./aicpm-sql/config:/etc/mysql/conf.d:rw
- ./aicpm-sql/init:/docker-entrypoint-initdb.d:rw
- ./aicpm-sql/healthcheck:/opt/healthcheck:rw,exec
- aicpm_sql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "/bin/bash", "/opt/healthcheck/healthcheck.sh"]
interval: 2s
timeout: 3s
retries: 20
start_period: 5s
networks:
- aicpm-network
networks:
aicpm-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.34.0/24
volumes:
aicpm_sql_data:
driver: local