-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose-dev.yml
134 lines (125 loc) · 3.4 KB
/
docker-compose-dev.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.3'
services:
nginx:
build: ./nginx
image: evgeniy-khyst/nginx
env_file:
- ./config.env
volumes:
- nginx_conf:/etc/nginx/sites
- letsencrypt_certs:/etc/letsencrypt
- certbot_acme_challenge:/var/www/certbot
- ./vhosts:/etc/nginx/vhosts
- static_volume:/backend/static
ports:
- "80:80"
- "443:443"
restart: unless-stopped
certbot:
build: ./certbot
image: evgeniy-khyst/certbot
env_file:
- ./config.env
volumes:
- letsencrypt_certs:/etc/letsencrypt
- certbot_acme_challenge:/var/www/certbot
cron:
build: ./cron
image: evgeniy-khyst/cron
environment:
COMPOSE_PROJECT_NAME: "${COMPOSE_PROJECT_NAME}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./:/workdir:ro
restart: unless-stopped
web:
build: ./backend
command: gunicorn --bind 0.0.0.0:8000 --workers 4 shoonya_backend.wsgi --timeout 300
volumes:
- ./backend/:/usr/src/backend/
- static_volume:/usr/src/backend/static
- logs_vol:/logs
ports:
- 8000:8000
depends_on:
- redis
redis:
container_name: redis
image: "redis"
ports:
- 6379:6379
celery:
container_name: celery-default
restart: always
build: ./backend
command: celery -A shoonya_backend.celery worker -Q default --concurrency=2 --loglevel=info
volumes:
- ./backend/:/usr/src/backend/
- logs_vol:/logs
depends_on:
- redis
- web
# This is the additional queue which contains the low-priority celery tasks. We can adjust the concurrency and workers alloted to this container.
celery2:
container_name: celery-low-priority
restart: always
build: ./backend
command: celery -A shoonya_backend.celery worker -Q functions --concurrency=2 --loglevel=info
volumes:
- ./backend/:/usr/src/backend/
- logs_vol:/logs
depends_on:
- redis
- web
logstash:
container_name: logstash
image: docker.elastic.co/logstash/logstash:7.14.0
hostname: shoonya_dev_logger
volumes:
- ./logstash_dev.conf:/usr/share/logstash/pipeline/logstash.conf
- logs_vol:/logs
extra_hosts:
- "elasticsearch:20.42.57.194"
command: logstash -f /usr/share/logstash/pipeline/logstash.conf
# Celery beats - for scheduling daily e-mails - commented out for dev hostings.
# celery-beat:
# build: ./backend
# command: celery -A shoonya_backend.celery beat --loglevel=info
# volumes:
# - ./backend/:/usr/src/backend
# depends_on:
# - redis
# - web
celery3:
container_name: celery-reports
restart: always
build: ./backend
command: celery -A shoonya_backend.celery worker -Q reports --concurrency=2 --loglevel=info
volumes:
- ./backend/:/usr/src/backend/
- logs_vol:/logs
depends_on:
- redis
- web
flower:
container_name: flower
restart: always
build: ./backend
command: celery -A shoonya_backend.celery flower --conf="./usr/src/backend/shoonya_backend/flowerconfig.py" --basic-auth="${FLOWER_USERNAME}:${FLOWER_PASSWORD}"
ports:
- "5555:5555"
volumes:
- ./backend/:/usr/src/backend/
- logs_vol:/logs
depends_on:
- redis
- web
volumes:
logs_vol:
external: true
nginx_conf:
external: true
letsencrypt_certs:
external: true
certbot_acme_challenge:
static_volume: