-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (49 loc) · 1.09 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
version: "3"
networks:
app_net:
services:
entry:
container_name: entry
image: njuptsast/sast-fresh-cup-entry:latest
networks:
- app_net
depends_on:
- backend
ports:
- 8000:80
backend:
container_name: backend
image: njuptsast/sast-fresh-cup-backend:latest
networks:
- app_net
depends_on:
mysql:
condition: service_healthy
environment:
- ADMIN_NAME=${ADMIN_NAME}
- ADMIN_EMAIL=${ADMIN_EMAIL}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- DB_HOST=mysql
- DB_PORT=3306
- DB_DATABASE=sast_fresh_cup
- DB_USERNAME=sast
- DB_PASSWORD=sast
mysql:
container_name: mysql
image: mysql:5.7
environment:
- MYSQL_DATABASE=sast_fresh_cup
- MYSQL_USER=sast
- MYSQL_PASSWORD=sast
- MYSQL_ROOT_PASSWORD=root
networks:
- app_net
volumes:
- ./mysql_data:/var/lib/mysql
ports:
- 3306:3306
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
interval: 2s
timeout: 20s
retries: 30