-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (57 loc) · 1.37 KB
/
docker-compose.yml
File metadata and controls
62 lines (57 loc) · 1.37 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
51
52
53
54
55
56
57
58
59
60
61
62
services:
web:
build:
context: ./backend
dockerfile: Dockerfile
volumes:
- ./backend:/app/backend
- static_volume:/app/backend/staticfiles # Match Django's STATIC_ROOT
environment:
- DEBUG=1
- DATABASE_URL=postgresql://postgres:postgres@db:5432/devalert
- REDIS_URL=redis://redis:6379/0
- CORS_ALLOWED_ORIGINS=https://localhost:3000,https://127.0.0.1:3000
- CSRF_TRUSTED_ORIGINS=https://localhost,https://127.0.0.1
env_file:
- .env
depends_on:
- db
- redis
nginx:
build: ./nginx
ports:
- "80:80"
- "443:443"
volumes:
- static_volume:/app/backend/staticfiles # Match Django's STATIC_ROOT
depends_on:
web:
condition: service_healthy
db:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=devalert
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
redis:
image: redis:7
ports:
- "6379:6379"
celery:
build: ./backend
command: celery -A devalert worker -l INFO
volumes:
- ./backend:/app/backend
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/devalert
- REDIS_URL=redis://redis:6379/0
env_file:
- .env
depends_on:
- web
- redis
volumes:
postgres_data:
static_volume: