-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathdocker-compose-dev.yaml
More file actions
204 lines (192 loc) · 5.66 KB
/
docker-compose-dev.yaml
File metadata and controls
204 lines (192 loc) · 5.66 KB
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
name: marble
x-backend-image-version: &backend-image-version
image: europe-west1-docker.pkg.dev/marble-infra/marble/marble-backend:v0.65.1
x-frontend-image-version: &frontend-image-version
image: europe-west1-docker.pkg.dev/marble-infra/marble/marble-frontend:v0.65.0
x-shared-environment: &shared-env
DISABLE_SEGMENT: ${DISABLE_SEGMENT:-false}
x-backend-environment: &backend-env
LICENSE_KEY: ${LICENSE_KEY:-LICENSE_KEY}
PORT: 8080
MARBLE_APP_URL: http://localhost:${HOST_APP_PORT:-3000}
PG_HOSTNAME: db
PG_PORT: ${PG_PORT:-5432}
PG_USER: postgres
PG_PASSWORD: changeme
PG_DATABASE: marble
INGESTION_BUCKET_URL: ${INGESTION_BUCKET_URL:-}
CASE_MANAGER_BUCKET_URL: ${CASE_MANAGER_BUCKET_URL:-}
ANALYTICS_BUCKET_URL: ${ANALYTICS_BUCKET_URL}
FIREBASE_AUTH_EMULATOR_HOST: firebase-auth:9099
FIREBASE_API_KEY: placeholder
# default value of FIREBASE_PROJECT_ID must be kept if working with the emulator (and the emulator is running in the docker image below)
FIREBASE_PROJECT_ID: test-project
CREATE_ORG_NAME: ${CREATE_ORG_NAME:-}
CREATE_ORG_ADMIN_EMAIL: ${CREATE_ORG_ADMIN_EMAIL:-}
CONVOY_API_KEY: ${CONVOY_API_KEY:-}
CONVOY_API_URL: ${CONVOY_API_URL:-}
CONVOY_PROJECT_ID: ${CONVOY_PROJECT_ID:-}
x-frontend-environment: &frontend-env
SESSION_SECRET: ${SESSION_SECRET:-}
SESSION_MAX_AGE: 43200
MARBLE_API_URL: http://api:8080
TEST_FIREBASE_AUTH_EMULATOR_HOST: localhost:9099
services:
db:
container_name: marble-postgres
image: postgis/postgis:16-3.5-alpine
restart: always
platform: linux/amd64
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: changeme
POSTGRES_DB: marble
PGDATA: /data/postgres
PGPORT: ${PG_PORT:-5432}
# ports:
# - ${PG_PORT:-5432}:${PG_PORT:-5432}
volumes:
- marble-db:/data/postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 1s
retries: 5
migrations:
<<: *backend-image-version
container_name: marble-db-migrations
platform: linux/amd64
restart: on-failure
depends_on:
db:
condition: service_healthy
entrypoint: ["./app", "--migrations"]
environment:
<<: [*shared-env, *backend-env]
api: &backend
<<: *backend-image-version
container_name: marble-api
platform: linux/amd64
restart: always
depends_on:
db:
condition: service_healthy
migrations:
condition: service_completed_successfully
motiva:
condition: service_started
entrypoint: ["./app", "--server"]
ports:
- 8080:8080
volumes:
- marble-tempfiles:/tempFiles
environment:
<<: [*shared-env, *backend-env]
cron:
<<: *backend
container_name: marble-api-cron
depends_on:
migrations:
condition: service_completed_successfully
entrypoint: ["./app", "--worker"]
healthcheck:
disable: true
ports: []
app:
<<: *frontend-image-version
container_name: marble-app
platform: linux/amd64
restart: always
depends_on:
api:
condition: service_started
firebase_auth:
condition: service_started
healthcheck:
test:
- CMD
- /nodejs/bin/node
- --input-type=module
- -e
- "process.exit((await fetch('http://localhost:8080/healthcheck')).status == 200 ? 0 : 1)"
interval: 10s
timeout: 60s
retries: 1
start_period: 30s
ports:
- 3000:8080
environment:
<<: [*shared-env, *frontend-env]
firebase_auth:
container_name: firebase-auth
image: europe-west1-docker.pkg.dev/marble-infra/marble/firebase-emulator:latest
restart: always
ports:
- 9099:9099
- 4000:4000
elasticsearch:
container_name: marble-es
image: docker.elastic.co/elasticsearch/elasticsearch:9.3.1
# ports:
# - ${ES_PORT:-9200}:${ES_PORT:-9200}
environment:
- node.name=es
- cluster.name=marble-es
- discovery.type=single-node
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- marble-es:/usr/share/elasticsearch/data
healthcheck:
test:
[
"CMD-SHELL",
"curl -sf http://localhost:9200/_cluster/health || exit 1",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
yente:
container_name: marble-yente
image: ghcr.io/opensanctions/yente:4.5.1
depends_on:
elasticsearch:
condition: service_healthy
command: ["yente", "reindex"]
volumes:
# This configuration file will load only a reduced into the elastic search index.
# This is only a convenience for development purposes, and should be removed or adapted
# for production environments.
- ./contrib/datasets.yml:/app/manifests/default.yml
environment:
YENTE_INDEX_TYPE: elasticsearch
YENTE_INDEX_URL: http://marble-es:9200
motiva:
container_name: marble-motiva
image: ghcr.io/apognu/motiva:v0.7.4
platform: linux/x86_64
# ports:
# - 8000:8000
depends_on:
yente:
condition: service_completed_successfully
environment:
MANIFEST_URL: "/app/manifests/default.yml"
INDEX_URL: "http://marble-es:9200"
volumes:
# This configuration file will load only a reduced into the elastic search index.
# This is only a convenience for development purposes, and should be removed or adapted
# for production environments.
- ./contrib/datasets.yml:/app/manifests/default.yml
volumes:
marble-db:
driver: local
marble-es:
driver: local
marble-tempfiles: