forked from matheuszeiser/RPGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (42 loc) · 1023 Bytes
/
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
43
44
45
services:
db:
image: postgres
env_file: .env
ports:
- 5433:5432
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"
]
interval: 5s
timeout: 2s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data
migrations:
build: .
volumes:
- .:/code
command: python manage.py migrate
depends_on:
db:
condition: service_healthy
web:
build: .
env_file: .env
command: python manage.py runserver 0.0.0.0:8000
stdin_open: true
tty: true
ports:
- 8000:8000
volumes:
- .:/code
depends_on:
db:
condition: service_healthy
migrations:
condition: service_completed_successfully
volumes:
pgdata: