-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (43 loc) · 989 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
name: lasfera
services:
app:
build: .
image: "rrchnm/lasfera"
ports:
- "8000:8000"
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=lasfera
- DB_USER=lasfera
- DB_PASSWORD=password
depends_on:
db:
condition: service_healthy
command: >
sh -c "
poetry run python manage.py migrate &&
poetry run python manage.py runserver 0.0.0.0:8000
"
volumes:
- .:/app
db:
image: postgres:16
volumes:
- pg-data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=lasfera
- POSTGRES_USER=lasfera
- POSTGRES_PASSWORD=password
- POSTGRES_HOST=db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U lasfera"]
interval: 2s
timeout: 5s
retries: 5
volumes:
pg-data: