-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
34 lines (32 loc) · 902 Bytes
/
Copy pathdocker-compose.yaml
File metadata and controls
34 lines (32 loc) · 902 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
version: "2.2"
services:
mysql:
image: mysql:5.7
ports:
- 3306:3306
healthcheck: # https://docs.docker.com/compose/compose-file/compose-file-v2/#healthcheck
# executing a command that *needs* to stablish a connection to db; the lighter, the better.
test: mysql --execute 'SHOW DATABASES' || exit 1
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=True
volumes:
- db-data:/var/lib/mysql/
escuela:
build:
context: ./
dockerfile: Dockerfile
image: escuelang
command: python escuelang/manage.py runserver 0.0.0.0:8080
volumes:
- .:/code
ports:
- 8080:8080
depends_on:
mysql:
condition: service_healthy # https://docs.docker.com/compose/compose-file/compose-file-v2/#depends_on
environment:
- DB_PASSWORD=${DB_PASSWORD}
- IS_DEVELOPMENT=True
volumes:
db-data:
driver: local