-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
51 lines (50 loc) · 938 Bytes
/
docker-compose.yaml
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
version: "3.7"
services:
db:
image: mysql:8.0.19
command: '--default-authentication-plugin=mysql_native_password'
restart: always
secrets:
- db-password
volumes:
- db-data:/var/lib/mysql
#- db-data:/timetables/
networks:
- backnet
environment:
- MYSQL_DATABASE=example
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
# uncomment this to run in final mode only once
setup:
build: init
restart: on-failure
secrets:
- db-password
networks:
- backnet
- frontnet
proxy:
build: proxy
restart: always
ports:
- 80:80
networks:
- frontnet
backend:
build: backend
restart: always
secrets:
- db-password
ports:
- 5000
networks:
- backnet
- frontnet
volumes:
db-data:
secrets:
db-password:
file: db/password.txt
networks:
backnet:
frontnet: