-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
54 lines (54 loc) · 1.48 KB
/
Copy pathcompose.yml
File metadata and controls
54 lines (54 loc) · 1.48 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
services:
django-app:
build: .
ports:
- "8000:8000"
depends_on:
- "postgres"
- "redis"
command: daphne -b 0.0.0.0 -p 8000 django_project.asgi:application
env_file: .env
environment:
DJANGO_ENV: "production"
DATABASE_HOST: "postgres"
CELERY_BROKER_URL: "redis://redis:6379/0"
CELERY_RESULT_BACKEND: "redis://redis:6379/0"
CACHE_LOCATION: "redis://redis:6379/1"
CHANNEL_LAYER_HOST: "redis"
celery:
build: .
command: celery -A django_project worker -l INFO
depends_on:
- "postgres"
- "redis"
env_file: .env
environment:
DJANGO_ENV: "production"
DATABASE_HOST: "postgres"
CELERY_BROKER_URL: "redis://redis:6379/0"
CELERY_RESULT_BACKEND: "redis://redis:6379/0"
CACHE_LOCATION: "redis://redis:6379/1"
CHANNEL_LAYER_HOST: "redis"
nginx:
image: nginx
ports:
- "80:80"
- "443:443"
volumes:
- /etc/nginx/sites-available/catsim:/etc/nginx/conf.d/default.conf
- /etc/ssl/catsim:/etc/ssl/catsim
depends_on:
- "django-app"
postgres:
image: postgres:16
ports:
- "5432:5432"
env_file: .env
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis
ports:
- "6379:6379"
volumes:
postgres_data: