-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
89 lines (80 loc) · 1.63 KB
/
docker-compose.yaml
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
version: '3.8'
services:
rabbitmq:
image: rabbitmq:management
hostname: rabbitmq
restart: always
ports:
- 5672:5672
- 15672:15672
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS}
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbit disk_free_limit 2147483648"
env_file:
- ./.env
volumes:
- rabbitmq_data:/var/lib/rabbitmq
redis:
image: redis
hostname: ${REDIS_HOST}
restart: always
ports:
- ${REDIS_PORT}:${REDIS_PORT}
env_file:
- ./.env
volumes:
- redis_data:/data
api_worker:
build:
args:
- SERVICE_NAME=api
restart: always
command: >
celery -A workers.celery worker --loglevel=info
--concurrency=${CELERY_CONCURRENCY}
env_file:
- ./.env
depends_on:
- redis
flower:
image: mher/flower
ports:
- ${FLOWER_PORT}:${FLOWER_PORT}
environment:
CELERY_BROKER_URL: redis://${REDIS_HOST}:${REDIS_PORT}/0
CELERY_RESULT_BACKEND: redis://${REDIS_HOST}:${REDIS_PORT}/0
env_file:
- ./.env
depends_on:
- api_worker
api:
build:
args:
- SERVICE_NAME=api
restart: always
ports:
- ${API_PORT}:${API_PORT}
env_file:
- ./.env
depends_on:
- api_worker
consumer:
build:
args:
- SERVICE_NAME=consumer
restart: always
env_file:
- ./.env
websocket:
build:
args:
- SERVICE_NAME=ws
restart: always
ports:
- ${WS_PORT}:${WS_PORT}
env_file:
- ./.env
volumes:
rabbitmq_data:
redis_data: