forked from s4l1hs/Database-Management-System
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (39 loc) · 876 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (39 loc) · 876 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
version: "3.8"
services:
db:
image: mysql:8.0
container_name: wdi_mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME:-wdi_project}
ports:
- "${DB_PORT:-3306}:3306"
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_PASSWORD}"]
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
app:
build: .
container_name: wdi_app
restart: unless-stopped
ports:
- "5000:5000"
env_file:
- .env
environment:
DB_HOST: db
DB_PORT: 3306
FLASK_DEBUG: ${FLASK_DEBUG:-0}
depends_on:
db:
condition: service_healthy
volumes:
- ./Data:/app/Data:ro
- ./SQL:/app/SQL:ro
volumes:
mysql_data: