-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
223 lines (207 loc) · 8.25 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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# Typical usage:
#
# ```fig build``` to build all the images defined here
# ```fig up -d``` to run the images
# ```fig run inasafe /start.sh checkout <branch_name>``` to pull and checkout the latest branch with the name <branch_name>
# ```fig run inasafe``` to run the latest shakemap with the branch defined in previous command
version: "2"
services:
btsync:
image: kartoza/btsync
hostname: inasafe-btsync
volumes:
- ./analysis_data:/web
env_file:
- ./docker-btsync/btsync.env
bnpb-sync:
image: kartoza/btsync
hostname: bnpb-sync
volumes:
- ./shakemaps-bnpb:/web
env_file:
- ./docker-bnpb-sync/bnpb_credential.env
bmkg-sync:
image: kartoza/btsync
hostname: bmkg-sync
volumes:
- ./shakemaps:/web
env_file:
- ./docker-bmkg-sync/bmkg_credential.env
shakemaps-extracted-sync:
image: kartoza/btsync
hostname: shakemaps-extracted-sync
volumes:
- ./shakemaps-extracted:/web
env_file:
- ./docker-shakemaps-extracted-sync/btsync.env
shakemaps-corrected-sync:
image: kartoza/btsync
hostname: shakemaps-corrected-sync
volumes:
- ./shakemaps-corrected:/web
env_file:
- ./docker-shakemaps-corrected-sync/btsync.env
shakemaps-corrected-extracted-sync:
image: kartoza/btsync
hostname: shakemaps-corrected-extracted-sync
volumes:
- ./shakemaps-corrected-extracted:/web
env_file:
- ./docker-shakemaps-corrected-extracted-sync/btsync.env
floodmaps-sync:
image: kartoza/btsync
hostname: floodmaps-sync
volumes:
- ./floodmaps:/web
env_file:
- ./docker-floodmaps-sync/btsync.env
ashmaps-sync:
image: kartoza/btsync
hostname: ashmaps-sync
volumes:
- ./ashmaps:/web
env_file:
- ./docker-ashmaps-sync/btsync.env
sftp:
build: docker-sftp
hostname: inasafe-sftp
volumes:
- ./ssh-config:/home/realtime/.ssh
- ./etc-ssh-config:/etc/ssh
- ./shakemaps:/home/realtime/shakemaps
- ./shakemaps-corrected:/home/realtime/shakemaps-corrected
ports:
- "9222:22"
apache:
build: docker-apache
hostname: inasafe-apache
volumes:
- ./web:/var/www
ports:
- "8090:80"
rabbitmq:
image: library/rabbitmq
restart: on-failure
hostname: rabbitmq
environment:
- RABBIT_PASSWORD=rabbit_test_password
- USER=rabbit_user
- RABBITMQ_NODENAME=rabbit
ports:
- "8100:5672"
inasafe: &inasafe
build: docker-inasafe
hostname: inasafe-realtime
environment:
- INASAFE_LOCALE=id
- INASAFE_REALTIME_TEMPLATE=/home/realtime/analysis_data/realtime-template.qpt
- INASAFE_REALTIME_PROJECT=/home/realtime/analysis_data/realtime.qgs
- INASAFE_POPULATION_PATH=/home/realtime/analysis_data/exposure/population.tif
- INASAFE_FLOOD_POPULATION_PATH=/home/realtime/analysis_data/exposure/DKI_Jakarta_Population_Dukcapil_Ages_WGS84.shp
- GEONAMES_SQLITE_PATH=/home/realtime/analysis_data/indonesia.sqlite
- INASAFE_SOURCE_DIR=/home/realtime/src/inasafe
- SHAKEMAPS_DIR=/home/realtime/shakemaps
- SHAKEMAPS_EXTRACT_DIR=/home/realtime/shakemaps-extracted
- FLOODMAPS_DIR=/home/realtime/floodmaps
# Shake Environment
- INASAFE_SHAKE_POPULATION_PATH=/home/realtime/analysis_data/exposure/population.tif
- INASAFE_SHAKE_REALTIME_TEMPLATE=/home/realtime/analysis_data/realtime-template.qpt
# Ash Environment
- ASHMAPS_DIR=/home/realtime/ashmaps
- INASAFE_ASH_VOLCANO_PATH=/home/realtime/analysis_data/ash/exposure/home/realtime/analysis_data/ash/exposure/GVP_Volcano_List_Darwin_VAAC_AOR_final.shp
- INASAFE_ASH_POPULATION_PATH=/home/realtime/analysis_data/ash/exposure/WorldPop_200m.tif
- INASAFE_ASH_LANDCOVER_PATH=/home/realtime/analysis_data/ash/exposure/IDN_Landcover_250K_WGS84.shp
- INASAFE_ASH_CITIES_PATH=/home/realtime/analysis_data/ash/exposure/IDN_Capital_Population_Point_WGS84.shp
- INASAFE_ASH_AIRPORT_PATH=/home/realtime/analysis_data/ash/exposure/IDN_Airport_OpenFlights_WGS84.shp
- INASAFE_ASH_HIGHLIGHT_BASE_PATH=/home/realtime/analysis_data/ash/srtm_indo_hillshade.tif
- INASAFE_ASH_OVERVIEW_PATH=/home/realtime/analysis_data/ash/overview.shp
- WEB_DIR=/var/www
- INASAFE_REALTIME_BROKER_HOST=amqp://guest:guest@rabbitmq:5672/
- C_FORCE_ROOT=True
env_file:
- ./docker-inasafe/realtime-rest.env
volumes:
- ./inasafe-src:/home/realtime/src
- ./analysis_data:/home/realtime/analysis_data
- ./shakemaps:/home/realtime/shakemaps
- ./shakemaps-extracted:/home/realtime/shakemaps-extracted
- ./floodmaps:/home/realtime/floodmaps
- ./ashmaps:/home/realtime/ashmaps
- ./web:/var/www
working_dir: /home/realtime/src/inasafe
links:
- sftp:sftp
- rabbitmq:rabbitmq
# exactly the same like inasafe, but with container name to easily identify it
inasafe-shakemap-monitor:
<<: *inasafe
restart: on-failure
# container_name: shakemap-monitor
command: /shakemaps_monitor.sh /home/realtime/shakemaps
links:
- rabbitmq:rabbitmq
inasafe-shakemap-monitor-bnpb:
<<: *inasafe
restart: on-failure
command: /shakemaps_monitor.sh /home/realtime/shakemaps
# container_name: shakemap-monitor-bnpb
volumes:
- ./inasafe-src:/home/realtime/src
- ./analysis_data:/home/realtime/analysis_data
- ./shakemaps-bnpb:/home/realtime/shakemaps
- ./shakemaps-extracted:/home/realtime/shakemaps-extracted
- ./floodmaps:/home/realtime/floodmaps
- ./ashmaps:/home/realtime/ashmaps
- ./web:/var/www
links:
- rabbitmq:rabbitmq
inasafe-shakemap-corrected-monitor:
<<: *inasafe
restart: on-failure
# container_name: shakemap-corrected-monitor
command: /shakemaps_monitor.sh /home/realtime/shakemaps-corrected
volumes:
- ./inasafe-src:/home/realtime/src
- ./analysis_data:/home/realtime/analysis_data
- ./shakemaps-corrected:/home/realtime/shakemaps
- ./shakemaps-corrected-extracted:/home/realtime/shakemaps-extracted
- ./floodmaps:/home/realtime/floodmaps
- ./ashmaps:/home/realtime/ashmaps
- ./web:/var/www
environment:
- INASAFE_LOCALE=id
- INASAFE_REALTIME_TEMPLATE=/home/realtime/analysis_data/realtime-template.qpt
- INASAFE_REALTIME_PROJECT=/home/realtime/analysis_data/realtime.qgs
- INASAFE_POPULATION_PATH=/home/realtime/analysis_data/exposure/population.tif
- INASAFE_FLOOD_POPULATION_PATH=/home/realtime/analysis_data/exposure/DKI_Jakarta_Population_Dukcapil_Ages_WGS84.shp
- GEONAMES_SQLITE_PATH=/home/realtime/analysis_data/indonesia.sqlite
- INASAFE_SOURCE_DIR=/home/realtime/src/inasafe
- SHAKEMAPS_DIR=/home/realtime/shakemaps
- SHAKEMAPS_EXTRACT_DIR=/home/realtime/shakemaps-extracted
- FLOODMAPS_DIR=/home/realtime/floodmaps
# Shake Environment
- INASAFE_SHAKE_POPULATION_PATH=/home/realtime/analysis_data/exposure/population.tif
- INASAFE_SHAKE_REALTIME_TEMPLATE=/home/realtime/analysis_data/realtime-template.qpt
# Ash Environment
- ASHMAPS_DIR=/home/realtime/ashmaps
- INASAFE_ASH_VOLCANO_PATH=/home/realtime/analysis_data/ash/exposure/home/realtime/analysis_data/ash/exposure/GVP_Volcano_List_Darwin_VAAC_AOR_final.shp
- INASAFE_ASH_POPULATION_PATH=/home/realtime/analysis_data/ash/exposure/WorldPop_200m.tif
- INASAFE_ASH_LANDCOVER_PATH=/home/realtime/analysis_data/ash/exposure/IDN_Landcover_250K_WGS84.shp
- INASAFE_ASH_CITIES_PATH=/home/realtime/analysis_data/ash/exposure/IDN_Capital_Population_Point_WGS84.shp
- INASAFE_ASH_AIRPORT_PATH=/home/realtime/analysis_data/ash/exposure/IDN_Airport_OpenFlights_WGS84.shp
- INASAFE_ASH_HIGHLIGHT_BASE_PATH=/home/realtime/analysis_data/ash/srtm_indo_hillshade.tif
- INASAFE_ASH_OVERVIEW_PATH=/home/realtime/analysis_data/ash/overview.shp
- WEB_DIR=/var/www
- INASAFE_REALTIME_BROKER_HOST=amqp://guest:guest@rabbitmq:5672/
- C_FORCE_ROOT=True
- SHAKEMAPS_CATEGORY="BMKG - Corrected"
links:
- rabbitmq:rabbitmq
inasafe-worker:
<<: *inasafe
restart: on-failure
working_dir: /home/realtime/src/inasafe
command: /start.sh celery-workers
container_name: realtime-celery-worker
links:
- rabbitmq:rabbitmq