-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose-sqs-postgresql.yaml
383 lines (368 loc) · 13.3 KB
/
docker-compose-sqs-postgresql.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
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
version: '3'
services:
# makefile makes a metadata file for pgadmin.
makefile:
container_name: senzing-makefile
command:
- sh
- -c
- mkdir /output/postgres_postgres.com; echo $${FILE_CONTENTS} >> /output/postgres_postgres.com/servers.json
environment:
FILE_CONTENTS: >-
{
"Servers": {
"1": {
"Name": "senzing",
"Group": "Servers",
"Host": "senzing-postgres",
"Port": 5432,
"MaintenanceDB": "postgres",
"Username": "postgres",
"SSLMode": "prefer",
"SSLCert": "<STORAGE_DIR>/.postgresql/postgresql.crt",
"SSLKey": "<STORAGE_DIR>/.postgresql/postgresql.key",
"SSLCompression": 0,
"Timeout": 10,
"UseSSHTunnel": 0,
"TunnelPort": "22",
"TunnelAuthentication": 0
}
}
}
image: busybox:${SENZING_DOCKER_IMAGE_VERSION_BUSYBOX:-latest}
networks:
- senzing
read_only: true
user: ${SENZING_UID:-1001}:${SENZING_GID:-1001}
volumes:
- ${PGADMIN_DIR:-/var/lib/pgadmin/storage}:/output
producer:
container_name: senzing-stream-producer
environment:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN}
# See https://github.com/senzing-garage/stream-producer#configuration
SENZING_DEFAULT_DATA_SOURCE: ${SENZING_DEFAULT_DATA_SOURCE:-TEST}
SENZING_DELAY_IN_SECONDS: 30
SENZING_SQS_QUEUE_URL: ${SENZING_SQS_QUEUE_URL}
SENZING_SUBCOMMAND: json-to-sqs
image: senzing/stream-producer:${SENZING_DOCKER_IMAGE_VERSION_STREAM_PRODUCER:-latest}
networks:
- senzing
read_only: true
restart: on-failure
user: ${SENZING_UID:-1001}:${SENZING_GID:-1001}
volumes:
- ${SENZING_VAR_DIR:-/var/opt/senzing}:/var/opt/senzing
postgres:
container_name: senzing-postgres
environment:
# See https://github.com/bitnami/bitnami-docker-postgresql#configuration
POSTGRESQL_DATABASE: ${POSTGRES_DB:-G2}
POSTGRESQL_PASSWORD: ${POSTGRES_PASSWORD:-senzing}
POSTGRESQL_POSTGRES_PASSWORD: ${POSTGRESQL_POSTGRES_PASSWORD:-postgres}
POSTGRESQL_USERNAME: ${POSTGRES_USERNAME:-senzing}
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USERNAME:-postgres}"
]
interval: 10s
timeout: 5s
retries: 5
image: bitnami/postgresql:${SENZING_DOCKER_IMAGE_VERSION_BITNAMI_POSTGRESQL:-latest}
networks:
- senzing
ports:
- 5432:5432
restart: always
user: "${SENZING_UID:-1001}:0"
volumes:
- ${POSTGRES_DIR:-/var/lib/postgresql/data}:/bitnami/postgresql
initdatabase:
container_name: senzing-tools-init-database
command: init-database
depends_on:
- postgres
environment:
SENZING_TOOLS_DATASOURCES: CUSTOMERS REFERENCE WATCHLIST
SENZING_TOOLS_ENGINE_CONFIGURATION_JSON: >-
{
"PIPELINE": {
"CONFIGPATH": "/etc/opt/senzing",
"LICENSESTRINGBASE64": "${SENZING_LICENSE_BASE64_ENCODED}",
"RESOURCEPATH": "/opt/senzing/g2/resources",
"SUPPORTPATH": "/opt/senzing/data"
},
"SQL": {
"BACKEND": "SQL",
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-senzing-postgres}:${POSTGRES_PORT:-5432}:${POSTGRES_DB:-G2}/?sslmode=disable"
}
}
image: senzing/senzing-tools:${SENZING_DOCKER_IMAGE_VERSION_SENZING_TOOLS:-latest}
networks:
- senzing
read_only: true
restart: on-failure
pgadmin:
container_name: senzing-pgadmin
depends_on:
- makefile
environment:
# See https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html
PGADMIN_CONFIG_DEFAULT_SERVER: '"0.0.0.0"'
PGADMIN_CONFIG_LOGIN_BANNER: |-
"<h4>Senzing demonstration</h4>
Although pgAdmin can be configured for security,
<br/>the following credentials are used for demonstration.
<ul>
<li><b>Username:</b> [email protected]</li>
<li><b>Password:</b> password</li>
</ul>"
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: password
PGADMIN_SERVER_JSON_FILE: /var/lib/pgadmin/storage/postgres_postgres.com/servers.json
image: dpage/pgadmin4:${SENZING_DOCKER_IMAGE_VERSION_DPAGE_PGADMIN4:-latest}
networks:
- senzing
ports:
- 9171:80
- 9172:443
restart: always
user: "${SENZING_UID:-1001}:0"
volumes:
- ${PGADMIN_DIR:-/var/lib/pgadmin/storage}:/var/lib/pgadmin/storage
console:
cap_add:
- ALL
container_name: senzing-console
environment:
SENZING_ENGINE_CONFIGURATION_JSON: >-
{
"PIPELINE": {
"CONFIGPATH": "/etc/opt/senzing",
"LICENSESTRINGBASE64": "${SENZING_LICENSE_BASE64_ENCODED}",
"RESOURCEPATH": "/opt/senzing/g2/resources",
"SUPPORTPATH": "/opt/senzing/data"
},
"SQL": {
"BACKEND": "SQL",
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-senzing-postgres}:${POSTGRES_PORT:-5432}:${POSTGRES_DB:-G2}/"
}
}
image: senzing/senzing-console:${SENZING_DOCKER_IMAGE_VERSION_SENZING_CONSOLE:-latest}
networks:
- senzing
restart: always
user: ${SENZING_UID:-1001}:${SENZING_GID:-1001}
volumes:
- ${SENZING_VAR_DIR:-/var/opt/senzing}:/var/opt/senzing
loader:
container_name: senzing-stream-loader
depends_on:
- postgres
environment:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN}
LC_CTYPE: en_US.utf8
# See https://github.com/senzing-garage/stream-loader#configuration
SENZING_DELAY_IN_SECONDS: 60
SENZING_ENGINE_CONFIGURATION_JSON: >-
{
"PIPELINE": {
"CONFIGPATH": "/etc/opt/senzing",
"LICENSESTRINGBASE64": "${SENZING_LICENSE_BASE64_ENCODED}",
"RESOURCEPATH": "/opt/senzing/g2/resources",
"SUPPORTPATH": "/opt/senzing/data"
},
"SQL": {
"BACKEND": "SQL",
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-senzing-postgres}:${POSTGRES_PORT:-5432}:${POSTGRES_DB:-G2}/"
}
}
SENZING_MONITORING_PERIOD_IN_SECONDS: ${SENZING_MONITORING_PERIOD_IN_SECONDS:-60}
SENZING_SQS_QUEUE_URL: ${SENZING_SQS_QUEUE_URL}
SENZING_SUBCOMMAND: sqs
image: senzing/stream-loader:${SENZING_DOCKER_IMAGE_VERSION_STREAM_LOADER:-latest}
networks:
- senzing
read_only: true
restart: always
redoer:
container_name: senzing-redoer
depends_on:
- loader
environment:
# See https://github.com/senzing-garage/redoer#configuration
SENZING_DELAY_IN_SECONDS: 60
SENZING_ENGINE_CONFIGURATION_JSON: >-
{
"PIPELINE": {
"CONFIGPATH": "/etc/opt/senzing",
"LICENSESTRINGBASE64": "${SENZING_LICENSE_BASE64_ENCODED}",
"RESOURCEPATH": "/opt/senzing/g2/resources",
"SUPPORTPATH": "/opt/senzing/data"
},
"SQL": {
"BACKEND": "SQL",
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-senzing-postgres}:${POSTGRES_PORT:-5432}:${POSTGRES_DB:-G2}/"
}
}
SENZING_EXIT_ON_THREAD_TERMINATION: ${SENZING_EXIT_ON_THREAD_TERMINATION:-"false"}
SENZING_MONITORING_PERIOD_IN_SECONDS: ${SENZING_MONITORING_PERIOD_IN_SECONDS:-60}
SENZING_SUBCOMMAND: redo
image: senzing/redoer:${SENZING_DOCKER_IMAGE_VERSION_REDOER:-latest}
networks:
- senzing
read_only: true
restart: always
pocserver:
container_name: senzing-poc-server
depends_on:
- postgres
environment:
SENZING_API_SERVER_ALLOWED_ORIGINS: '*'
SENZING_API_SERVER_BIND_ADDR: 'all'
SENZING_API_SERVER_ENABLE_ADMIN: 'true'
SENZING_API_SERVER_PORT: '8250'
SENZING_API_SERVER_SKIP_ENGINE_PRIMING: 'true'
SENZING_API_SERVER_SKIP_STARTUP_PERF: 'true'
SENZING_DATA_MART_POSTGRESQL_DATABASE: ${POSTGRES_DB:-G2}
SENZING_DATA_MART_POSTGRESQL_HOST: ${POSTGRES_HOST:-senzing-postgres}
SENZING_DATA_MART_POSTGRESQL_PASSWORD: ${POSTGRES_PASSWORD:-senzing}
SENZING_DATA_MART_POSTGRESQL_PORT: ${POSTGRES_PORT:-5432}
SENZING_DATA_MART_POSTGRESQL_USER: ${POSTGRES_USERNAME:-senzing}
SENZING_ENGINE_CONFIGURATION_JSON: >-
{
"PIPELINE": {
"CONFIGPATH": "/etc/opt/senzing",
"LICENSESTRINGBASE64": "${SENZING_LICENSE_BASE64_ENCODED}",
"RESOURCEPATH": "/opt/senzing/g2/resources",
"SUPPORTPATH": "/opt/senzing/data"
},
"SQL": {
"BACKEND": "SQL",
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-senzing-postgres}:${POSTGRES_PORT:-5432}:${POSTGRES_DB:-G2}/"
}
}
image: senzing/senzing-poc-server:${SENZING_DOCKER_IMAGE_VERSION_SENZING_POC_SERVER:-latest}
networks:
- senzing
ports:
- 8250:8250
read_only: true
restart: always
tmpfs:
- /tmp
webapp:
container_name: senzing-webapp
depends_on:
- pocserver
environment:
# See https://github.com/senzing-garage/entity-search-web-app#configuration
SENZING_API_SERVER_URL: http://senzing-poc-server:8250
SENZING_WEB_SERVER_ADMIN_AUTH_MODE: NONE
SENZING_WEB_SERVER_ADMIN_AUTH_PATH: http://senzing-webapp:8251
SENZING_WEB_SERVER_INTERNAL_URL: http://senzing-webapp:8251
SENZING_WEB_SERVER_PORT: 8251
SENZING_WEB_SERVER_STREAM_CLIENT_URL: wss://senzing-poc-server:8250/ws
image: senzing/entity-search-web-app:${SENZING_DOCKER_IMAGE_VERSION_ENTITY_SEARCH_WEB_APP:-latest}
networks:
- senzing
ports:
- 8251:8251
read_only: true
restart: always
jupyter:
container_name: senzing-jupyter
command:
- start.sh
- jupyter
- lab
- "--NotebookApp.token=''"
depends_on:
- loader
environment:
# See https://github.com/senzing-garage/docker-jupyter#configuration
SENZING_ENGINE_CONFIGURATION_JSON: >-
{
"PIPELINE": {
"CONFIGPATH": "/etc/opt/senzing",
"LICENSESTRINGBASE64": "${SENZING_LICENSE_BASE64_ENCODED}",
"RESOURCEPATH": "/opt/senzing/g2/resources",
"SUPPORTPATH": "/opt/senzing/data"
},
"SQL": {
"BACKEND": "SQL",
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-senzing-postgres}:${POSTGRES_PORT:-5432}:${POSTGRES_DB:-G2}/"
}
}
SENZING_SQL_CONNECTION: "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@senzing-postgres:5432:${POSTGRES_DB:-G2}/"
image: senzing/jupyter:${SENZING_DOCKER_IMAGE_VERSION_JUPYTER:-latest}
networks:
- senzing
ports:
- 9178:8888
restart: always
volumes:
- ${JUPYTER_NOTEBOOKS_SHARED_DIR:-~}:/notebooks/shared
sshd:
cap_add:
- ALL
container_name: senzing-sshd
environment:
ROOT_PASSWORD: ${SENZING_SSHD_PASSWORD:-senzingsshdpassword}
SENZING_ENGINE_CONFIGURATION_JSON: >-
{
"PIPELINE": {
"CONFIGPATH": "/etc/opt/senzing",
"LICENSESTRINGBASE64": "${SENZING_LICENSE_BASE64_ENCODED}",
"RESOURCEPATH": "/opt/senzing/g2/resources",
"SUPPORTPATH": "/opt/senzing/data"
},
"SQL": {
"BACKEND": "SQL",
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-senzing-postgres}:${POSTGRES_PORT:-5432}:${POSTGRES_DB:-G2}/"
}
}
image: senzing/sshd:${SENZING_DOCKER_IMAGE_VERSION_SSHD:-latest}
networks:
- senzing
ports:
- "${SENZING_SSHD_PORT:-9181}:22"
restart: always
volumes:
- ${SENZING_VAR_DIR:-/var/opt/senzing}:/var/opt/senzing
xterm:
container_name: senzing-xterm
environment:
SENZING_ENGINE_CONFIGURATION_JSON: >-
{
"PIPELINE": {
"CONFIGPATH": "/etc/opt/senzing",
"LICENSESTRINGBASE64": "${SENZING_LICENSE_BASE64_ENCODED}",
"RESOURCEPATH": "/opt/senzing/g2/resources",
"SUPPORTPATH": "/opt/senzing/data"
},
"SQL": {
"BACKEND": "SQL",
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-postgres}:${POSTGRES_PASSWORD:-postgres}@${POSTGRES_HOST:-senzing-postgres}:${POSTGRES_PORT:-5432}:${POSTGRES_DB:-G2}/"
}
}
image: senzing/xterm:${SENZING_DOCKER_IMAGE_VERSION_XTERM:-latest}
networks:
- senzing
ports:
- 8254:5000
restart: always
user: ${SENZING_UID:-1001}:${SENZING_GID:-1001}
volumes:
- ${SENZING_VAR_DIR:-/var/opt/senzing}:/var/opt/senzing
networks:
senzing:
name: ${SENZING_DOCKER_NETWORK:-senzing-network}