-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
75 lines (66 loc) · 1.61 KB
/
docker-compose-prod.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3'
volumes:
db_data_production: {}
static_production: {}
services:
django-service: &django
build:
context: .
dockerfile: compose/production/backend/Dockerfile
env_file:
- .envs/production/django.env
- .envs/production/postgres.env
command: bash /manage/build.sh
volumes:
- static_production:/static
depends_on:
- db
- redis
django-app:
<<: *django
command: bash /manage/run.sh
depends_on:
- db
- redis
- django-service
django-celery:
<<: *django
command: celery -A alternative_backend worker -l info
depends_on:
- db
- redis
- django-service
- django-app
django-celery-beat:
<<: *django
command: celery -A alternative_backend beat -l info --pidfile=
depends_on:
- db
- redis
- django-service
- django-app
db:
image: postgres:latest
volumes:
- db_data_production:/var/lib/postgresql/data
env_file:
- .envs/production/postgres.env
redis:
build:
context: .
dockerfile: compose/production/redis/Dockerfile
command: sh -c "redis-server /config/redis.conf && redis-cli flushall"
depends_on:
- db
sysctls:
net.core.somaxconn: '511'
nginx:
build:
context: .
dockerfile: compose/production/nginx/Dockerfile
volumes:
- static_production:/var/local/alternative_backend/static
ports:
- 80:80
depends_on:
- django-app