-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·53 lines (49 loc) · 1 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
43
44
45
46
47
48
49
50
51
52
53
version: "3.9"
services:
app:
build:
context: .
args:
- DEV=true
ports:
- "9090:9090"
volumes:
- ./app:/app
- dev-data:/vol/web
command: >
sh -c "python manage.py wait_for_db && python manage.py migrate && python manage.py runserver 0.0.0.0:9090"
environment:
- DB_HOST=db
- DB_NAME=devdb
- DB_USER=devuser
- DB_PASS=development
- DEBUG=1
- DEV=true
networks:
- dev-net
depends_on:
db:
condition: service_healthy
links:
- db
db:
image: postgres:16.0-alpine3.18
volumes:
- dev-db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=devdb
- POSTGRES_USER=devuser
- POSTGRES_PASSWORD=development
healthcheck:
test: ["CMD-SHELL", "pg_isready -q -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 5s
timeout: 5s
retries: 5
networks:
- dev-net
volumes:
dev-data:
dev-db:
networks:
dev-net:
driver: bridge