-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (45 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
48 lines (45 loc) · 1.11 KB
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
services:
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: resolve
POSTGRES_USER: resolve
POSTGRES_PASSWORD: resolve
healthcheck:
test: ["CMD-SHELL", "pg_isready -U resolve"]
interval: 5s
timeout: 5s
retries: 5
web:
build: .
expose:
- "8000"
environment:
- DATABASE_URL=postgres://resolve:resolve@db:5432/resolve
- SECRET_KEY=docker-dev-secret-key-change-in-production
- DEBUG=false
- ALLOWED_HOSTS=localhost,127.0.0.1
- CSRF_TRUSTED_ORIGINS=http://localhost:8000,http://127.0.0.1:8000
- DJANGO_SETTINGS_MODULE=resolve.settings.production
depends_on:
db:
condition: service_healthy
volumes:
- media_data:/app/media
- static_data:/app/static
nginx:
image: nginx:alpine
ports:
- "8000:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- static_data:/app/static:ro
- media_data:/app/media:ro
depends_on:
- web
volumes:
postgres_data:
media_data:
static_data: