-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
42 lines (41 loc) · 1.11 KB
/
docker-compose.yml
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
services:
db:
image: mysql:latest
container_name: db
env_file:
- .db
expose:
- "3306"
ports:
- "3306:3306"
volumes:
- ./my-db:/var/lib/mysql
- ./app/sql/schema.sql:/docker-entrypoint-initdb.d/init_a.sql
- ./app/sql/product_statuses.sql:/docker-entrypoint-initdb.d/init_b.sql
- ./app/sql/catalog.sql:/docker-entrypoint-initdb.d/init_c.sql
- ./app/sql/order_statuses.sql:/docker-entrypoint-initdb.d/init_d.sql
- ./app/sql/users.sql:/docker-entrypoint-initdb.d/init_e.sql
- ./app/sql/test.sql:/docker-entrypoint-initdb.d/init_f.sql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "-uroot", "-ppass"]
interval: 5s
timeout: 5s
retries: 20
app:
build:
context: ./app
dockerfile: Dockerfile
container_name: app
depends_on:
db:
condition: service_healthy
env_file:
- .env
environment:
- PYTHONPATH=/code
expose:
- "5000"
ports:
- "5000:5000"
volumes:
- ./app/flaskr/static:/static