-
Notifications
You must be signed in to change notification settings - Fork 263
/
docker-compose.yaml
48 lines (48 loc) · 922 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
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
networks:
- backnet
environment:
- MYSQL_DATABASE=example
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
backend:
build:
context: ./backend
restart: always
secrets:
- db-password
# ports:
# - 5000:5000
networks:
- backnet
- frontnet
depends_on:
- db
environment:
- DB_TYPE=docker
frontend:
build:
context: ./frontend
restart: always
ports:
- 3000:3000
networks:
- frontnet
depends_on:
- backend
volumes:
db-data:
secrets:
db-password:
# This is mounted to /run/secrets/ onto the container using it
file: db/password.txt
networks:
backnet:
frontnet: