-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.override.yml
219 lines (206 loc) · 5.16 KB
/
docker-compose.override.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
version: "3.8"
x-appserver: &appserver
build: ./appserver
environment:
# Log Services
- FORMAT_AS_JSON=false
# Flask
- FLASK_APP=app
- FLASK_APP_CONFIG=Development
- FLASK_DEBUG=1
- FLASK_ENV=development
# Postgres
- POSTGRES_HOST=pgdatabase
- POSTGRES_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
# ElasticSearch
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTIC_FILE_INDEX_ID=file_dev
# Arango
- ARANGO_HOST=http://arangodb:8529
- ARANGO_USERNAME=root
- ARANGO_PASSWORD=password
- ARANGO_DB_NAME=lifelike
# Redis
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_USERNAME=default
- REDIS_PASSWORD=password
- REDIS_SSL=false
# StatisticalEnrichment
- SE_HOST=statistical-enrichment
- SE_PORT=5010
# Other
- DOMAIN=http://localhost:4200
- LMDB_HOME_FOLDER=/home/n4j/neo4japp/services/annotations/lmdb/
- ASSETS_FOLDER=/home/n4j/assets/
# - OPENAI_API_KEY="<lifelike-openai-api-key>" defined in azure secrets
volumes:
- ./appserver:/home/n4j
# - lmdb:/home/n4j/neo4japp/services/annotations/lmdb
depends_on:
- elasticsearch
- pgdatabase
- redis
- pdfparser
- arangodb
services:
appserver:
<<: *appserver
container_name: appserver
ports:
- "5000:5000"
networks:
- backend
- frontend
worker:
<<: *appserver
container_name: worker
command: rq worker -c rq_config --with-scheduler
networks:
- backend
webserver:
container_name: client
build:
context: ./client
dockerfile: Dockerfile
target: angular-deps
command: yarn dev-start
volumes:
- ./client:/app
# https://jdlm.info/articles/2019/09/06/lessons-building-node-app-docker.html
# Helps not overwrite the node_modules with host
- /app/node_modules
ports:
- "4200:4200"
networks:
- frontend
statistical-enrichment:
container_name: statistical-enrichment
build: ./statistical-enrichment
ports:
- "5010:5010"
environment:
# Flask
- FLASK_APP=statistical_enrichment
- FLASK_APP_CONFIG=Development
- FLASK_DEBUG=1
- FLASK_ENV=development
# Arango
- ARANGO_HOST=http://arangodb:8529
- ARANGO_USERNAME=root
- ARANGO_PASSWORD=password
- ARANGO_DB_NAME=lifelike
# Redis
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=password
- REDIS_SSL=false
# Allow debugging w/ IPython or pdb
stdin_open: true
tty: true
# End debugging section
volumes:
- ./statistical-enrichment:/home/user
networks:
- backend
depends_on:
- arangodb
- redis
cache-invalidator:
container_name: cache-invalidator
build: ./cache-invalidator
environment:
- LOG_LEVEL=DEBUG
# Arango
- ARANGO_HOST=http://arangodb:8529
- ARANGO_USERNAME=root
- ARANGO_PASSWORD=password
- ARANGO_DB_NAME=lifelike
# Redis
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=password
- REDIS_SSL=false
volumes:
- ./cache-invalidator:/app
networks:
- backend
depends_on:
- redis
- arangodb
pdfparser:
container_name: pdfparser
ports:
- "7600:7600"
# tty: true - this is a hack for grizzly as it expects input;
# without it, container will exit right away due to docker not accepting input by default
tty: true
networks:
- backend
pgdatabase:
image: postgres:11
container_name: pgdatabase
command: postgres -c max_wal_size=2GB -c log_statement='all'
environment:
- POSTGRES_PASSWORD=postgres
ports:
- "5431:5432"
networks:
- backend
arangodb:
build:
# Note that this Dockerfile simply adds a user directory and installs the helper scripts into it, and then executes the default arango
# entrypoint as normal.
context: ./arangodb
dockerfile: Dockerfile
container_name: arangodb
environment:
ARANGO_ROOT_PASSWORD: password
LIFELIKE_DB_NAME: lifelike
ports:
- 8529:8529
volumes:
- ./arangodb/bin:/home/dbuser/bin # the /home/dbuser directory is setup in the Dockerfile
- ./arangodb/data:/var/lib/arangodb3
- ./arangodb/apps:/var/lib/arangodb3-apps
networks:
- backend
redis:
container_name: redis
image: redis:6-alpine
command: redis-server --requirepass password
ports:
- "6379:6379"
networks:
- backend
elasticsearch:
container_name: elasticsearch
build:
dockerfile: Dockerfile
context: elasticsearch
environment:
- discovery.type=single-node
- http.max_content_length=200mb #allow 200mb of content to be sent for indexing
- bootstrap.memory_lock=true
- xpack.graph.enabled=false
- xpack.watcher.enabled=false
- xpack.license.self_generated.type=basic
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9200:9200"
- "9300:9300"
networks:
- backend
- elastic
volumes:
lmdb:
networks:
frontend:
backend:
elastic: