-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
268 lines (267 loc) Β· 10.8 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
version: "3.5"
services:
rabbitmq:
image: rabbitmq:3.11-management
container_name: rabbitmq
hostname: rabbitmq
environment:
RABBITMQ_DEFAULT_USER: openk9
RABBITMQ_DEFAULT_PASS: openk9
ports:
- 5672:5672
- 15672:15672
opensearch:
image: docker.io/opensearchproject/opensearch:2.13.0
container_name: opensearch
hostname: opensearch
environment:
- node.name=opensearch
- cluster.name=docker-cluster
- cluster.initial_master_nodes=opensearch
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
# TODO: verify how to set credentials
ports:
- "9200:9200"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./opensearch/data:/var/lib/opensearch/data
postgresql:
image: postgres:latest
hostname: postgresql
environment:
- POSTGRES_MULTIPLE_DATABASES=openk9,tenantmanager,keycloak
- POSTGRES_PASSWORD=openk9
- POSTGRES_USER=postgres
- OPENK9_USER=openk9
- OPENK9_PASSWORD=openk9
volumes:
- ./postgres/db-data:/var/lib/postgresql/data
- ./compose-utilities:/docker-entrypoint-initdb.d
adminer:
image: adminer
restart: always
ports:
- 5050:8080
keycloak:
image: bitnami/keycloak:20.0.5-debian-11-r4
hostname: keycloak.openk9.local
environment:
KEYCLOAK_CREATE_ADMIN_USER: 'true'
KEYCLOAK_ADMIN_USER: user
KEYCLOAK_ADMIN_PASSWORD: openk9
KEYCLOAK_DATABASE_VENDOR: postgresql
KEYCLOAK_DATABASE_HOST: postgresql
KEYCLOAK_DATABASE_PORT: 5432
KEYCLOAK_DATABASE_NAME: keycloak
KEYCLOAK_DATABASE_USER: openk9
KEYCLOAK_DATABASE_SCHEMA: public
KEYCLOAK_DATABASE_PASSWORD: openk9
KEYCLOAK_HTTP_PORT: 8081
ports:
- 8081:8081
depends_on:
- postgresql
networks:
default:
aliases:
- keycloak.openk9.local
neo4j:
image: neo4j:4.4.8-enterprise
container_name: neo4j
hostname: neo4j
environment:
- NEO4J_AUTH=neo4j/openk9
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
volumes:
- ./neo4j/data:/data
ports:
- '7474:7474'
- '7687:7687'
tenant-manager:
image: smclab/openk9-tenant-manager:1.6.0
hostname: openk9-tenant-manager
environment:
QUARKUS_DATASOURCE_USERNAME: 'openk9'
QUARKUS_DATASOURCE_PASSWORD: 'openk9'
QUARKUS_DATASOURCE_REACTIVE_URL: 'postgresql://postgresql/tenantmanager'
OPENK9_DATASOURCE_URL: 'postgresql://postgresql/openk9'
QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION: 'none'
QUARKUS_HIBERNATE_ORM_LOG_SQL: 'false'
QUARKUS_HTTP_ACCESS_LOG_ENABLED: 'true'
QUARKUS_HTTP_ACCESS_LOG_PATTERN: '%h %l %u %t "%r" %s %b %D'
QUARKUS_HTTP_CORS: 'true'
QUARKUS_KEYCLOAK_ADMIN_CLIENT_USERNAME: 'user'
QUARKUS_KEYCLOAK_ADMIN_CLIENT_PASSWORD: 'openk9'
QUARKUS_KEYCLOAK_ADMIN_CLIENT_SERVER_URL: 'http://keycloak.openk9.local:8081'
QUARKUS_OIDC_AUTH_SERVER_URL: 'http://keycloak.openk9.local:8081/realms/tenant-manager'
QUARKUS_OIDC_CLIENT_ID: 'tenant-manager'
ports:
- 8186:8080
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-tenant-manager.entrypoints=web"
- "traefik.http.routers.api-tenant-manager.rule=PathPrefix(`/api/tenant-manager`)"
- "traefik.http.middlewares.api-tenant-manager_compress.compress=true"
- "traefik.http.routers.api-tenant-manager.middlewares=api-tenant-manager-strip@docker,api-tenant-manager_compress@docker"
- "traefik.http.middlewares.openk9-host.headers.customrequestheaders.Host=demo.openk9.local"
- "traefik.http.middlewares.openk9-forwarded-host.headers.customrequestheaders.X-Forwarded-Host=demo.openk9.local"
- "traefik.http.routers.api-tenant-manager.middlewares=api-tenant-manager_compress@docker,openk9-forwarded-host@docker,openk9-host@docker"
datasource:
image: smclab/openk9-datasource:1.6.0
container_name: datasource
environment:
AKKA_CLUSTER_BOOTSTRAP_SERVICE_NAME: datasource
AKKA_CLUSTER_FILE: local
IO_OPENK9_SCHEDULING_PURGE_CRON: 0 */10 * ? * *
IO_OPENK9_SCHEDULING_PURGE_MAX_AGE: 2d
IO_OPENK9_SCHEDULING_TIMEOUT: 100s
JAVA_DEBUG: 'true'
MP_MESSAGING_INCOMING_EVENTS_ROUTING_KEYS: noop
OPENK9_AUTHSERVERURL_TEMPLATE: http://keycloak.openk9.local:8081/realms/{realm}
OPENK9_DATASOURCE_ACL_QUERY_EXTRA_PARAMS_ENABLED: 'true'
OPENK9_DATASOURCE_MULTITENANCY_ENABLED: 'true'
QUARKUS_DATASOURCE_PASSWORD: openk9
QUARKUS_DATASOURCE_REACTIVE_URL: postgresql://postgresql/openk9
QUARKUS_DATASOURCE_USERNAME: openk9
QUARKUS_OPENSEARCH_HOSTS: opensearch:9200
QUARKUS_OPENSEARCH_PASSWORD: admin
QUARKUS_OPENSEARCH_USERNAME: admin
QUARKUS_GRPC_CLIENTS__TENANTMANAGER__HOST: openk9-tenant-manager
QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION: none
QUARKUS_HIBERNATE_ORM_LOG_SQL: 'false'
QUARKUS_HTTP_ACCESS_LOG_ENABLED: 'true'
QUARKUS_HTTP_ACCESS_LOG_PATTERN: '%h %l %u %t "%r" %s %b %D'
QUARKUS_HTTP_CORS: 'true'
QUARKUS_HTTP_LIMITS_MAX_BODY_SIZE: 20480K
QUARKUS_LOG_LEVEL: INFO
QUARKUS_OIDC_AUTH_SERVER_URL: http://keycloak.openk9.local:8081/realms/master
QUARKUS_OIDC_CLIENT_ID: openk9
QUARKUS_REST_CLIENT_KEYCLOAK_CLIENT_URL: http://keycloak.openk9.local:8081
QUARKUS_SMALLRYE_GRAPHQL_UI_ALWAYS_INCLUDE: 'true'
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: openk9
RABBITMQ_PORT: '5672'
RABBITMQ_USERNAME: openk9
ports:
- 8185:8080
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-datasource.entrypoints=web"
- "traefik.http.routers.api-datasource.rule=PathPrefix(`/api/datasource`)"
- "traefik.http.middlewares.api-datasource_compress.compress=true"
- "traefik.http.routers.api-datasource.middlewares=api-datasource-strip@docker,api-datasource_compress@docker"
- "traefik.http.middlewares.openk9-host.headers.customrequestheaders.Host=demo.openk9.local"
- "traefik.http.middlewares.openk9-forwarded-host.headers.customrequestheaders.X-Forwarded-Host=demo.openk9.local"
- "traefik.http.routers.api-datasource.middlewares=api-datasource_compress@docker,openk9-forwarded-host@docker,openk9-host@docker"
ingestion:
image: smclab/openk9-ingestion:1.6.0
container_name: ingestion
environment:
RABBITMQ_HOST: 'rabbitmq'
RABBITMQ_PASSWORD: 'openk9'
RABBITMQ_USERNAME: 'openk9'
RABBITMQ_PORT: '5672'
QUARKUS_HTTP_ACCESS_LOG_ENABLED: 'true'
QUARKUS_HTTP_ACCESS_LOG_PATTERN: '%h %l %u %t "%r" %s %b %D'
QUARKUS_HTTP_LIMITS_MAX_BODY_SIZE: '10240K'
QUARKUS_REST_CLIENT_FILE_MANAGER_URL: http://openk9-file-manager:8080
ports:
- 8187:8080
searcher:
image: smclab/openk9-searcher:1.5.0
container_name: searcher
environment:
OPENK9_AUTHSERVERURL_TEMPLATE: http://keycloak.openk9.local:8081/realms/{realm}
OPENK9_DATASOURCE_MULTITENANCY_ENABLED: 'true'
QUARKUS_OPENSEARCH_HOSTS: opensearch:9200
QUARKUS_OPENSEARCH_USERNAME: admin
QUARKUS_GRPC_CLIENTS__SEARCHER__HOST: openk9-datasource
QUARKUS_GRPC_CLIENTS__TENANTMANAGER__HOST: openk9-tenant-manager
QUARKUS_OIDC_AUTH_SERVER_URL: http://keycloak.openk9.local:8081/realms/master
QUARKUS_OIDC_CLIENT_ID: openk9
QUARKUS_REST_CLIENT_KEYCLOAK_CLIENT_URL: http://keycloak.openk9.local:8081
ports:
- 8188:8080
entity-manager:
image: smclab/openk9-entity-manager:1.6.0
container_name: entity-manager
environment:
RABBITMQ_HOST: 'rabbitmq'
RABBITMQ_PASSWORD: 'openk9'
RABBITMQ_USERNAME: 'openk9'
RABBITMQ_PORT: '5672'
QUARKUS_HTTP_ACCESS_LOG_ENABLED: 'true'
QUARKUS_HTTP_ACCESS_LOG_PATTERN: '%h %l %u %t "%r" %s %b %D'
QUARKUS_OPENSEARCH_HOSTS: opensearch:9200
QUARKUS_OPENSEARCH_USERNAME: admin
QUARKUS_OPENSEARCH_PASSWORD: admin
OPENK9_ENTITY_UNIQUE_ENTITIES: 'date,organization,loc,email,document,bank,person'
OPENK9_ENTITY_MIN_HOPS: '1'
OPENK9_ENTITY_MAX_HOPS: '2'
OPENK9_ENTITY_SCORE_THRESHOLD: '0.8'
HZ_NETWORK_JOIN_KUBERNETES_NAMESPACE: 'k9-develop'
HZ_NETWORK_JOIN_KUBERNETES_ENABLED: 'false'
ports:
- 8189:8080
# web-parser:
# image: smclab/openk9-web-parser:latest
# container_name: web-parser
# environment:
# INGESTION_URL: " http://ingestion:8080/v1/ingestion/"
# DELETE_URL: "http://ingestion:8080/v1/ingestion/"
# ports:
# - "5008:80"
# - "6800:6800"
search-frontend:
image: smclab/openk9-search-frontend:1.6.0
container_name: search-frontend
ports:
- "8080:80"
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.services.api-aggregator-docker.loadbalancer.server.port=8080"
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
search-admin:
image: smclab/openk9-admin-ui:1.6.0
labels:
- "traefik.enable=true"
- "traefik.http.routers.admin-ui.entrypoints=web"
- "traefik.http.routers.admin-ui.rule=PathPrefix(`/admin`)"
- "traefik.http.middlewares.admin-ui_compress.compress=true"
- "traefik.http.routers.admin-ui.middlewares=admin-ui_compress@docker"
- "traefik.http.middlewares.openk9-host.headers.customrequestheaders.Host=demo.openk9.local"
- "traefik.http.middlewares.openk9-forwarded-host.headers.customrequestheaders.X-Forwarded-Host=demo.openk9.local"
- "traefik.http.routers.admin-ui.middlewares=admin-ui_compress@docker,openk9-forwarded-host@docker,openk9-host@docker"
- "traefik.http.services.admin-ui.loadbalancer.server.port=8080"
tenant-admin:
image: smclab/openk9-tenant-ui:1.6.0
hostname: tenant-admin
labels:
- "traefik.enable=true"
- "traefik.http.routers.tenant-admin.entrypoints=web"
- "traefik.http.routers.tenant-admin.rule=PathPrefix(`/tenant`)"
- "traefik.http.middlewares.tenant-admin_compress.compress=true"
- "traefik.http.routers.tenant-admin.middlewares=tenant-admin_compress@docker"
- "traefik.http.middlewares.openk9-host.headers.customrequestheaders.Host=demo.openk9.local"
- "traefik.http.middlewares.openk9-forwarded-host.headers.customrequestheaders.X-Forwarded-Host=demo.openk9.local"
- "traefik.http.routers.tenant-admin.middlewares=tenant-admin_compress@docker,openk9-forwarded-host@docker,openk9-host@docker"
- "traefik.http.services.admin.loadbalancer.server.port=8080"
ports:
- '8183:8080'
reverse-proxy:
image: traefik:v2.3
command: --api.insecure=true --providers.docker --providers.docker.exposedbydefault=false --entrypoints.web.address=:80
networks:
default:
aliases:
- demo.openk9.local
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- '8888:80'
- '8182:8080'