-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (42 loc) · 836 Bytes
/
docker-compose.yml
File metadata and controls
47 lines (42 loc) · 836 Bytes
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
version: "3.8"
services:
mysql:
restart: always
image: mysql
environment:
- MYSQL_DATABASE=appdb
- MYSQL_PASSWORD=pass123
- MYSQL_ROOT_PASSWORD=pass123
networks:
- project-net
volumes:
- ./mysql-db:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -ppass123 || exit 1"]
interval: 10s
retries: 5
start_period: 30s
backend:
build:
context: ./backend
ports:
- "3000:3000"
networks:
- project-net
depends_on:
mysql:
condition: service_healthy
frontend:
restart: on-failure
build:
context: ./frontend
ports:
- "3001:3000"
networks:
- project-net
depends_on:
- backend
networks:
project-net:
volumes:
mysql-db: