-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (43 loc) · 1.02 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
---
name: graffitihouse
services:
app:
build: .
image: "rrchnm/graffitihouse"
ports:
- 8000:8000
volumes:
- dj-data:/app
environment:
- DEBUG=True
- DJANGO_SECRET_KEY=thisisnotasecretkey
- DJANGO_ALLOWED_HOSTS=localhost
- DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=graffitihouse
- DB_USER=graffitihouse
- DB_PASSWORD=password
command: >
sh -c "poetry run python3 manage.py migrate &&
poetry run python3 manage.py runserver 0.0.0.0:8000"
depends_on:
db:
condition: service_healthy
db:
image: postgres:16
volumes:
- pg-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=graffitihouse
- POSTGRES_USER=graffitihouse
- POSTGRES_PASSWORD=password
- POSTGRES_HOST=db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U graffitihouse"]
interval: 2s
timeout: 5s
retries: 3
volumes:
pg-data:
dj-data: