-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
32 lines (30 loc) · 947 Bytes
/
Copy pathdocker-compose.yaml
File metadata and controls
32 lines (30 loc) · 947 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
services:
secret-note-db:
image: postgres
volumes:
- ./data/secret-note-db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=secretnote
- POSTGRES_USER=secretnote
- POSTGRES_PASSWORD=secretnote
- POSTGRES_HOST=secret-note-db
- POSTGRES_PORT=5432
- DATABASE_URL=postgres://secretnote:secretnote@secret-note-db:5432/secretnote
web:
build: .
command: >
sh -c "until nc -z secret-note-db 5432; do echo waiting for secret-note-db; sleep 1; done &&
python manage.py migrate &&
python manage.py collectstatic --noinput &&
gunicorn secret_notes_project.wsgi:application --bind 0.0.0.0:8008"
volumes:
- .:/app
ports:
- "8008:8008"
environment:
- DATABASE_URL=postgres://secretnote:secretnote@secret-note-db:5432/secretnote
- DEBUG=False
depends_on:
- secret-note-db
volumes:
static_volume: