-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (66 loc) · 1.52 KB
/
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
63
64
65
66
67
68
69
70
71
72
73
74
version: '3'
services:
redis:
image: redis
ports:
- 6379:6379
- 16379:16379
healthcheck:
timeout: 5s
interval: 5s
retries: 5
test: [
'CMD', 'bash', '-c',
'exec 3<> /dev/tcp/127.0.0.1/6379 && echo PING >&3 && head -1 <&3 | grep PONG'
]
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
- 15672:15672
healthcheck:
timeout: 5s
interval: 5s
retries: 5
test: ['CMD', 'rabbitmqctl', 'status']
newscrawler:
image: newscrawler
build:
context: .
command: "true"
harvester: &WORKER
image: newscrawler
hostname: harvester
links:
- rabbitmq:rabbitmq
- redis:redis
depends_on:
- redis
- rabbitmq
environment:
- BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- BACKEND_URL=redis://redis:6379/0
command: celery worker -A worker -Q harvest -l info -E
healthcheck:
timeout: 5s
interval: 5s
retries: 5
test: ['CMD', 'celery', 'status', '-A', 'worker']
distributer:
<<: *WORKER
hostname: distributer
command: celery worker -A worker -Q distribute_chain -l info -E
extractor:
<<: *WORKER
hostname: extractor
command: celery worker -A worker -Q extract -l info -E
aggregator:
<<: *WORKER
hostname: aggregator
command: celery worker -A worker -Q aggregate_words -l info -E
flower:
<<: *WORKER
hostname: flower
ports:
- 5555:5555
command: celery flower -A worker