-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (38 loc) · 863 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (38 loc) · 863 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
version: "3.9"
services:
app:
build:
context: .
args:
- DEV=true
ports:
- "8000:8000"
volumes:
- ./app:/app
- dev-static-data:/vol/web
command: >
sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
environment:
- DB_HOST=db
- DB_NAME=devdb
- DB_USER=devuser
- DB_PASS=changeme
- DEBUG=1
depends_on:
db:
condition: service_healthy
db:
image: postgres:13-alpine
volumes:
- dev-db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=devdb
- POSTGRES_USER=devuser
- POSTGRES_PASSWORD=changeme
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "devdb", "-U", "devuser"]
volumes:
dev-db-data:
dev-static-data: