forked from CAVEconnectome/MaterializationEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.sentinel.yml
146 lines (134 loc) · 4.02 KB
/
docker-compose.sentinel.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
135
136
137
138
139
140
141
142
143
144
145
146
version: '3.2'
services:
db:
image: postgis/postgis:9.6-2.5
shm_size: 1g
env_file:
- ./sentinel/dev.sentinel.env
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
- ./entrypoint.sh:/var/lib/postgresql/entrypoint.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 10s
retries: 5
redis-master:
image: redis:6.0
container_name: redis-master
hostname: redis-master
command: ["redis-server"]
volumes:
- broker_data:/data
networks:
- redis_network
ports:
- 6379:6379
redis-slave-0:
image: redis:6.0
command: redis-server --port 6380 --slaveof redis-master 6379
volumes:
- broker_data:/data
networks:
- redis_network
depends_on:
- redis-master
redis-slave-1:
image: redis:6.0
command: redis-server --port 6381 --slaveof redis-master 6379
volumes:
- broker_data:/data
networks:
- redis_network
depends_on:
- redis-master
sentinel1:
image: redis:6.0
command: sh /sentinel/run_sentinel.sh sentinel1
networks:
- redis_network
volumes:
- broker_data:/data
- ./sentinel:/sentinel
depends_on:
- redis-master
- redis-slave-0
- redis-slave-1
sentinel2:
image: redis:6.0
command: sh /sentinel/run_sentinel.sh sentinel2
networks:
- redis_network
volumes:
- broker_data:/data
- ./sentinel:/sentinel
depends_on:
- redis-master
- redis-slave-0
- redis-slave-1
celery-process_1:
image: 'materialize:tag'
env_file:
- ./sentinel/dev.sentinel.env
command: ["celery", "worker", "--app=run.celery","--pool=prefork", "--hostname=worker.process@%h", "--queues=process,celery","--concurrency=4", "--loglevel=INFO", "-Ofair"]
volumes:
- ~/.cloudvolume/secrets:/home/nginx/.cloudvolume/secrets:z
- ~/.cloudvolume/secrets/google-secret.json:/home/nginx/.cloudvolume/secrets/google-secret.json:z
depends_on:
- redis-master
celery-process_2:
image: 'materialize:tag'
env_file:
- ./sentinel/dev.sentinel.env
command: ["celery", "worker", "--app=run.celery","--pool=prefork", "--hostname=worker.process@%h", "--queues=process", "--concurrency=4", "--loglevel=INFO", "-Ofair"]
volumes:
- ~/.cloudvolume/secrets:/home/nginx/.cloudvolume/secrets:z
- ~/.cloudvolume/secrets/google-secret.json:/home/nginx/.cloudvolume/secrets/google-secret.json:z
depends_on:
- redis-master
celery-beat:
image: 'materialize:tag'
env_file:
- ./sentinel/dev.sentinel.env
command: ["celery", "beat", "--app=run.celery", "--pidfile=/home/nginx/celerybeat.pid"]
volumes:
- ~/.cloudvolume/secrets:/home/nginx/.cloudvolume/secrets:z
- ~/.cloudvolume/secrets/google-secret.json:/home/nginx/.cloudvolume/secrets/google-secret.json:z
depends_on:
- redis-master
materialize:
image: 'materialize:tag'
build:
context: .
dockerfile: dev.Dockerfile
ports:
- 80:80
volumes:
- ~/.cloudvolume/secrets:/home/nginx/.cloudvolume/secrets:z
- ~/.cloudvolume/secrets/google-secret.json:/home/nginx/.cloudvolume/secrets/google-secret.json:z
- .:/app
env_file:
- ./sentinel/dev.sentinel.env
depends_on:
- db
- redis-master
- celery-process_1
- celery-process_2
- celery-beat
flower:
image: mher/flower
environment:
- FLOWER_PORT=5555
command: ["flower", "--broker=sentinel://sentinel1:26379/0", "--port=5555"]
ports:
- 5555:5555
depends_on:
- celery-process_1
- celery-process_2
volumes:
postgres_data:
broker_data:
networks:
redis_network: