-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (64 loc) · 1.28 KB
/
docker-compose.yml
File metadata and controls
67 lines (64 loc) · 1.28 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
58
59
60
61
62
63
64
65
66
67
version: '3.8'
services:
frontend:
container_name: frontend
build: ./frontend
restart: on-failure
tty: true
stdin_open: true
ports:
- 3000:3000
working_dir: /home/app-frontend/
volumes:
- ./frontend/:/home/app-frontend/
depends_on:
backend:
condition: service_started
networks:
- conn
backend:
container_name: app_backend
build: ./backend
restart: on-failure
tty: true
stdin_open: true
ports:
- 8000:8000
working_dir: /home/app-backend/
volumes:
- ./backend/:/home/app-backend/
depends_on:
db:
condition: service_healthy
environment:
- API_PORT=8000
- SECRET_KEY=secret
- DB_HOST=db
- DB_PORT=3360
- DB_USER=app
- DB_PASSWORD=password
networks:
- conn
db:
container_name: db
image: mysql:8.0
restart: on-failure
expose:
- 3360
ports:
- 3360:3360
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=app
- MYSQL_USER=app
- MYSQL_PASSWORD=password
- MYSQL_TCP_PORT=3360
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
timeout: 5s
retries: 10
networks:
- conn
networks:
conn:
driver: bridge