-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
50 lines (47 loc) · 1.31 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
50 lines (47 loc) · 1.31 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
49
50
services:
db:
image: pgvector/pgvector:0.8.0-pg17
environment:
POSTGRES_DB: deepface
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
web:
build: .
command: gunicorn --bind 0.0.0.0:8000 --workers 3 django_deepface_demo.wsgi:application
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/deepface
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY:-your-secret-key-here}
- DJANGO_DEBUG=${DJANGO_DEBUG:-False}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS:-localhost,127.0.0.1}
volumes:
- ./media:/app/media
- static_volume:/app/staticfiles
ports:
- "${WEB_PORT:-8000}:8000"
depends_on:
db:
condition: service_healthy
restart: unless-stopped
# Nginx for serving static files and as reverse proxy
nginx:
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- static_volume:/app/staticfiles
- ./media:/app/media
ports:
- "${NGINX_PORT:-80}:80"
depends_on:
- web
restart: unless-stopped
volumes:
postgres_data:
static_volume: