forked from checkmarble/marble
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yaml
More file actions
165 lines (153 loc) · 4.55 KB
/
docker-compose-dev.yaml
File metadata and controls
165 lines (153 loc) · 4.55 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
name: marble
x-backend-image-version: &backend-image-version
image: europe-west1-docker.pkg.dev/marble-infra/marble/marble-backend:v0.58.1
x-frontend-image-version: &frontend-image-version
image: europe-west1-docker.pkg.dev/marble-infra/marble/marble-frontend:v0.58.1
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: postgres:15
restart: always
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
api: &backend
<<: *backend-image-version
container_name: marble-api
platform: linux/amd64
restart: always
depends_on:
- db
- yente
entrypoint: ["./app", "--server", "--migrations"]
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8080/liveness || exit 1
interval: 10s
timeout: 60s
retries: 1
start_period: 30s
ports:
- ${HOST_API_PORT:-8080}:8080
volumes:
- marble-tempfiles:/tempFiles
environment:
<<: [*shared-env, *backend-env]
cron:
<<: *backend
container_name: marble-api-cron
depends_on:
- api
entrypoint: ["./app", "--worker"]
healthcheck:
disable: true
ports: []
app:
<<: *frontend-image-version
container_name: marble-app
platform: linux/amd64
restart: always
depends_on:
- api
- firebase_auth
healthcheck:
test:
- CMD
- /nodejs/bin/node
- --input-type=module
- -e
- "process.exit((await fetch('http://localhost:${APP_PORT:-8080}/healthcheck')).status == 200 ? 0 : 1)"
interval: 10s
timeout: 60s
retries: 1
start_period: 30s
ports:
- ${HOST_APP_PORT:-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:8.14.3
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
yente:
container_name: marble-yente
image: ghcr.io/opensanctions/yente:4.5.1
depends_on:
- elasticsearch
ports:
- ${YENTE_PORT:-8000}:${YENTE_PORT:-8000}
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/yente-datasets.yml:/app/manifests/default.yml
environment:
YENTE_INDEX_TYPE: elasticsearch
YENTE_INDEX_URL: ${YENTE_ELASTICSEARCH_HOST:-http://marble-es:9200}
YENTE_UPDATE_TOKEN: ""
volumes:
marble-db:
driver: local
marble-es:
driver: local
marble-tempfiles: