-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (43 loc) · 978 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
48 lines (43 loc) · 978 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
48
version: '3.8'
services:
db:
build:
context: .
dockerfile: mysql.Dockerfile
container_name: mstack_mysql_db
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: mstack_db
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./mysql-init:/docker-entrypoint-initdb.d
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-u", "root", "-proot" ]
interval: 15s
timeout: 5s
retries: 15
start_period: 180s
backend:
build: ./backend
container_name: mstack_backend
ports:
- "3002:3333"
environment:
- DATABASE_URL=mysql://root:root@db:3306/mstack_db
env_file:
- ./backend/.env
depends_on:
db:
condition: service_healthy
restart: on-failure
frontend:
build: ./frontend
container_name: mstack_frontend
ports:
- "3001:3000"
depends_on:
- backend
volumes:
mysql_data: