-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
62 lines (53 loc) · 1016 Bytes
/
docker-compose.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
version: "3.8"
x-app-common:
&app-common
image: event_app:latest
build: .
env_file:
- .env.${APP_ENV}
networks:
- db
- cache
- redis
services:
app:
<<: *app-common
command: >
gunicorn event_app.wsgi:application
--name app-gunicorn
--bind 0.0.0.0:8000
--workers 4
--worker-tmp-dir /dev/shm
--pythonpath "/opt/app"
--log-level=info
--timeout 120
ports:
- ${APP_HOST}:${APP_PORT}:8000
celery-worker:
<<: *app-common
command: python -m celery -A event_app worker
celery-beat:
<<: *app-common
command: python -m celery -A event_app beat
db:
image: postgres:13-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env.${APP_ENV}
networks:
- db
redis:
image: redis:6
networks:
- redis
memcached:
image: memcached:1-alpine
networks:
- cache
volumes:
postgres_data:
networks:
db:
cache:
redis: