-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
43 lines (40 loc) · 813 Bytes
/
docker-compose.yaml
File metadata and controls
43 lines (40 loc) · 813 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
version: "3"
services:
mysql:
container_name: todo_app_db
image: mysql:5.7
platform: linux/x86_64
volumes:
- todo_app_data:/var/lib/mysql
- ./setup.sql:/docker-entrypoint-initdb.d/setup.sql
environment:
MYSQL_DATABASE: todo_app
MYSQL_ROOT_PASSWORD: root
ports:
- "3306:3306"
networks:
- todo_app_network
healthcheck:
test: exit 0
app:
container_name: todo_app
build:
context: .
dockerfile: Dockerfile
depends_on:
mysql:
condition: service_healthy
environment:
DB_HOST: mysql
DB_USER: root
DB_PW: root
DB_NAME: todo_app
networks:
- todo_app_network
ports:
- "8080:8080"
networks:
todo_app_network:
driver: bridge
volumes:
todo_app_data: {}