-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
275 lines (262 loc) · 10.4 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
version: '3.9'
# https://docs.docker.com/compose/compose-file/#name-top-level-element
name: ${NAME:?}
networks:
proxy:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1420
pelias:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1420
services:
#
# BACKGROUND MAP
#
tileserver-gl:
build:
context: tileserver-gl
args:
IMAGE_DEBIAN: ${IMAGE_DEBIAN:?}
IMAGE_TILESERVER_GL: ${IMAGE_TILESERVER_GL:?}
# Used to determine name of `osm-excerpt` image.
BUILD_NAME: ${BUILD_NAME:?}
MAP_STYLE_URL: ${MAP_STYLE_URL:?}
REGION_URL: ${OSM_PBF_URL:?}
MIN_LON: ${MIN_LON:?}
MAX_LON: ${MAX_LON:?}
MIN_LAT: ${MIN_LAT:?}
MAX_LAT: ${MAX_LAT:?}
restart: 'no'
ports:
- '127.0.0.1:7070:8080/tcp'
networks:
- proxy
#
# ROUTING
#
opentripplanner:
build:
context: opentripplanner
args:
IMAGE_OPENTRIPPLANNER: ${IMAGE_OPENTRIPPLANNER:?}
# Used to determine name of `osm-excerpt` and `gtfs-filtered` images.
BUILD_NAME: ${BUILD_NAME:?}
JAVA_BUILD_OPTS: ${JAVA_BUILD_OPTS:?}
JAVA_OPTS: ${JAVA_OPTS:?}
TIMEZONE: ${TIMEZONE:?}
HEALTHCHECK_AGENCY_NAME: ${HEALTHCHECK_OPENTRIPPLANNER:?}
restart: 'no'
ports:
- '127.0.0.1:8080:8080/tcp'
networks:
- proxy
#
# GEOCODER
#
# https://github.com/pelias/api
#
# This is the core of Pelias. It talks to all other services (if available), Elasticsearch, and provides the interface for all queries to Pelias.
# https://github.com/pelias/documentation/blob/master/services.md#descriptions
api:
build:
context: ${PELIAS_BUILD_DIR:?}
dockerfile: ./api.Dockerfile
args:
IMAGE_PELIAS_API: ${IMAGE_PELIAS_API:?}
HEALTHCHECK_REQUEST: ${HEALTHCHECK_API_REQUEST:?}
HEALTHCHECK_RESPONSE: ${HEALTHCHECK_API_RESPONSE:?}
PORT: 4000
restart: 'no'
ports: [ '127.0.0.1:4000:4000/tcp' ]
networks:
- proxy
- pelias
depends_on:
libpostal:
condition: service_healthy
placeholder:
condition: service_healthy
interpolation:
condition: service_healthy
pip:
condition: service_healthy
elasticsearch:
condition: service_healthy
# https://github.com/pelias/libpostal-service
#
# Libpostal is a library that provides an address parser using a statistical natural language processing model trained on OpenStreetMap, OpenAddresses, and other open data. It is quite good at parsing fully specified input, but cannot handle autocomplete very well.
# https://github.com/pelias/documentation/blob/master/services.md#descriptions
#
# Pelias Libpostal Service creates an instance of the whosonfirst/go-whosonfirst-libpostal server.
# https://github.com/pelias/libpostal-service#pelias-libpostal-service
#
# go-whosonfirst-libpostal uses the libpostal C library.
# https://github.com/whosonfirst/go-whosonfirst-libpostal#wof-libpostal-server
#
# The data for this model is gotten from OpenAddresses, OpenStreetMap and data generated by Senzing based on customer feedback (a few hundred records), a total of about 1.2 billion records of data from over 230 countries, in 100+ languages. The data from OpenStreetMap and OpenAddresses is good but not perfect so the dataset was modified by filtering out badly formed addresses, correcting misclassified address tokens and removing tokens that didn't belong in the addresses, whenever these conditions were encountered.
# https://github.com/openvenues/libpostal#installation-with-an-alternative-data-model
#
# GIF demonstration on parsing a full address input: https://github.com/openvenues/libpostal#examples-of-parsing
libpostal:
build:
context: ${PELIAS_BUILD_DIR:?}
dockerfile: ./libpostal.Dockerfile
args:
IMAGE_PELIAS_LIBPOSTAL: ${IMAGE_PELIAS_LIBPOSTAL:?}
HEALTHCHECK_REQUEST: ${HEALTHCHECK_LIBPOSTAL_REQUEST:?}
HEALTHCHECK_RESPONSE: ${HEALTHCHECK_LIBPOSTAL_RESPONSE:?}
PORT: 4400
restart: 'no'
# Ports are only required for debugging purposes and can be commented out.
ports: [ '127.0.0.1:4400:4400/tcp' ]
networks:
- pelias
# https://github.com/pelias/placeholder
#
# Placeholder is used specifically to handle the relational component of geocoding. Placeholder understands, for example, that Paris is a city in a country called France, but that there is another city called Paris in the state of Texas, USA.
# Placeholder also stores the translations of administrative areas in multiple languages. Therefore, it is required if any support for multiple languages is desired.
# https://github.com/pelias/documentation/blob/master/services.md#descriptions
#
# Can be run independently as it has no external dependencies.
# https://github.com/pelias/placeholder#pelias-coarse-geocoder
#
# The data is sourced from the Who's On First project.
# https://github.com/pelias/placeholder#natural-language-parser-for-geographic-text
#
# The generated DB is hosted by Geocode Earth (`store.sqlite3`).
# https://github.com/pelias/placeholder#download-the-required-database-files
# This data is made available under the same license conditions as the source data: https://whosonfirst.org/docs/licenses/
# https://geocode.earth/data
#
# Configuration: `PLACEHOLDER_DATA` - Path to the directory where the placeholder service will find the `store.sqlite3` database file.
# https://github.com/pelias/placeholder#configuration-via-environment-variables
placeholder:
build:
context: ${PELIAS_BUILD_DIR:?}
dockerfile: ./placeholder.Dockerfile
args:
IMAGE_PELIAS_PLACEHOLDER: ${IMAGE_PELIAS_PLACEHOLDER:?}
HEALTHCHECK_REQUEST: ${HEALTHCHECK_PLACEHOLDER_REQUEST:?}
HEALTHCHECK_RESPONSE: ${HEALTHCHECK_PLACEHOLDER_RESPONSE:?}
PORT: 4100
restart: 'no'
# Ports are only required for debugging purposes and can be commented out.
ports: [ '127.0.0.1:4100:4100/tcp' ]
networks:
- pelias
# https://github.com/pelias/interpolation
#
# The interpolation service combines street geometries with known addresses and address ranges, to allow estimating the position of addresses that might exist, but aren't in existing open data sources.
# https://github.com/pelias/documentation/blob/master/services.md#descriptions
#
# it can also be used as a stand-alone application
# https://github.com/pelias/interpolation#overview
#
# OSM -> polyline -> street.db
# https://github.com/pelias/interpolation#street-database
#
# OSM and/or OpenAddresses -> address.db
# https://github.com/pelias/interpolation#address-database
#
# Optionally: US Census Bureau TIGER data
# https://github.com/pelias/interpolation#tiger
#
# CMD [ "./interpolate", "server", "/data/interpolation/address.db", "/data/interpolation/street.db" ]
# https://github.com/pelias/interpolation/blob/a1451e9ba4db4ceabd53018310ab700cbc39708f/Dockerfile#L62
#
# The data is split into 2 different sqlite3 databases: street.db and address.db
# https://github.com/pelias/interpolation#architecture
interpolation:
build:
context: ${PELIAS_BUILD_DIR:?}
dockerfile: ./interpolation.Dockerfile
args:
IMAGE_PELIAS_INTERPOLATION: ${IMAGE_PELIAS_INTERPOLATION:?}
HEALTHCHECK_REQUEST: ${HEALTHCHECK_INTERPOLATION_REQUEST:?}
HEALTHCHECK_RESPONSE: ${HEALTHCHECK_INTERPOLATION_RESPONSE:?}
PORT: 4300
restart: 'no'
# Ports are only required for debugging purposes and can be commented out.
ports: [ '127.0.0.1:4300:4300/tcp' ]
networks:
- pelias
# https://github.com/pelias/pip-service
#
# The Point-in-Polygon (PIP) service loads polygon data representing the boundaries of cities, states, regions, countries etc. into memory, and can perform calculations on that geometric data. It's used to determine if a given point lies in a particular polygon. Thus, it's highly recommended for reverse geocoding.
# https://github.com/pelias/documentation/blob/master/services.md#descriptions
#
# It will look for Who's On First data in the place configured in `pelias.json`.
# https://github.com/pelias/pip-service#usage
pip:
build:
context: ${PELIAS_BUILD_DIR:?}
dockerfile: ./pip.Dockerfile
args:
IMAGE_PELIAS_PIP: ${IMAGE_PELIAS_PIP:?}
HEALTHCHECK_REQUEST: ${HEALTHCHECK_PIP_REQUEST:?}
HEALTHCHECK_RESPONSE: ${HEALTHCHECK_PIP_RESPONSE:?}
PORT: 4200
restart: 'no'
# Ports are only required for debugging purposes and can be commented out.
ports: [ '127.0.0.1:4200:4200/tcp' ]
networks:
- pelias
# The underlying datastore that does most of the query heavy-lifting and powers our search results. We use Elasticsearch. Currently, versions 6 and 7 are supported.
# https://github.com/pelias/pelias/#database
elasticsearch:
build:
context: ${PELIAS_BUILD_DIR:?}
dockerfile: ./elasticsearch.Dockerfile
args:
IMAGE_PELIAS_ELASTICSEARCH: ${IMAGE_PELIAS_ELASTICSEARCH:?}
restart: 'no'
# Ports are only required for debugging purposes and can be commented out.
ports: [ '127.0.0.1:9200:9200/tcp', '127.0.0.1:9300:9300/tcp' ]
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add: [ "IPC_LOCK" ]
security_opt:
- seccomp=unconfined
networks:
- pelias
#
# WEB UI
#
digitransit-ui:
build:
# https://docs.docker.com/engine/reference/commandline/build/#build-with-url
context: ${DOCKERFILE_DIGITRANSIT_UI:?}
args:
CONFIG: btp
DATA_SOURCES_PARAGRAPHS: ${DATA_SOURCES_PARAGRAPHS:?}
TIMEZONE: ${TIMEZONE:?}
OTP_TIMEOUT: ${OTP_TIMEOUT:?}
MIN_LON: ${MIN_LON:?}
MAX_LON: ${MAX_LON:?}
MIN_LAT: ${MIN_LAT:?}
MAX_LAT: ${MAX_LAT:?}
MIN_ZOOM: ${MIN_ZOOM:?}
restart: 'no'
environment:
OTP_URL: http://localhost:8080/otp/routers/default/
GEOCODING_BASE_URL: http://localhost:4000/v1
DEFAULT_MAP_URL: http://localhost:7070/styles/bicycle/
STOP_MAP_URL: http://localhost:8080/otp/routers/default/vectorTiles/stops,stations/
ports:
- '127.0.0.1:9090:8080/tcp'
networks:
- proxy
depends_on:
tileserver-gl:
condition: service_healthy
api:
condition: service_healthy
opentripplanner:
condition: service_healthy