-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
167 lines (154 loc) · 4.1 KB
/
docker-compose.yaml
File metadata and controls
167 lines (154 loc) · 4.1 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
services:
redis:
image: redis:8.6.1-trixie
volumes:
- redis_data:/data
ports:
- '6379:6379'
# Runs all migrations from scratch, after clearing the database(s).
migrations:
image: node:24.14.0-bullseye-slim
command: bash -c 'set -e
npm i && ( [ "$CI" = "true" ] && npm run db:clean -- --env staging || true )
&& for db in api-server-pg scylla clickhouse; do npm run db:create -- --db "$$db" --env staging; npm run db:update -- --db "$$db" --env staging; done'
working_dir: /src
env_file: ./.env.githubci
environment:
- MIGRATOR_DB_NAME
- CLICKHOUSE_DATABASE
volumes:
- .:/src
depends_on:
postgres:
condition: service_healthy
scylla:
condition: service_healthy
clickhouse:
condition: service_healthy
drop_dbs:
image: node:24.14.0-bullseye-slim
command: bash -c 'npm i && npm run db:drop -- --env staging'
working_dir: /src
env_file: ./.env.githubci
environment:
- CLICKHOUSE_DATABASE
- MIGRATOR_DB_NAME
volumes:
- .:/src
depends_on:
- postgres
postgres:
image: ankane/pgvector:v0.5.1
# image: postgres:15.3
volumes:
- pg_data:/var/lib/postgresql/data
ports:
- '5432:5432'
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres', '-d', 'postgres']
interval: 2s
start_period: 2s
environment:
POSTGRES_PASSWORD: postgres123
POSTGRES_USER: postgres
POSTGRES_DB: postgres
hma:
build:
context: ./hma
dockerfile: Dockerfile
environment:
- POSTGRES_PASSWORD=postgres123
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_HOST=postgres
ports:
- '9876:9876'
depends_on:
- postgres
scylla:
image: scylladb/scylla:5.2
volumes:
- scylla_data:/var/lib/scylla
ports:
- '9042:9042'
healthcheck:
test: ['CMD-SHELL', 'nodetool status || exit 1']
interval: 5s
timeout: 5s
retries: 28
start_period: 35s
# Runs the api server's tests
test:
build:
context: .
dockerfile: Dockerfile
target: server_base
command: bash -c 'npm run test:ci'
working_dir: /app
volumes:
- ./server/reports:/app/reports
env_file: ./.env.githubci
depends_on:
migrations:
condition: service_completed_successfully
redis:
condition: service_started
lint:
build:
context: .
dockerfile: Dockerfile
target: server_base
command: npm run lint
lint-client:
build:
context: client
target: client_base
command: npm run lint
volumes:
- ./client/eslint:/app/eslint
- ./client/.eslintrc.cjs:/app/.eslintrc.cjs
jaeger:
image: jaegertracing/all-in-one:1.76.0
ports:
- '16686:16686'
- '14268'
- '14250'
environment:
- LOG_LEVEL=info
otel-collector:
# We have to pin to this version of the collector, because versions beyond
# this do not support the Jaeger exporter. See here for details:
# https://github.com/open-telemetry/opentelemetry-specification/pull/2858
image: otel/opentelemetry-collector-contrib:0.71.0
volumes:
- ./otel-collector.yaml:/etc/otel-collector.yaml
command: ['--config=/etc/otel-collector.yaml']
ports:
- '1888:1888' # pprof extension
- '13133:13133' # health_check extension
- '4317:4317' # OTLP gRPC receiver
- '55670:55679' # zpages extension
depends_on:
- jaeger
clickhouse:
image: clickhouse/clickhouse-server:24.3
container_name: clickhouse
ports:
- '8123:8123' # HTTP interface
- '9000:9000' # Native TCP interface
volumes:
- clickhouse_data:/var/lib/clickhouse
environment:
CLICKHOUSE_DB: analytics
CLICKHOUSE_USER: default
CLICKHOUSE_PASSWORD: 'clickhouse'
healthcheck:
test: ['CMD-SHELL', 'clickhouse-client --host localhost --query "SELECT 1"']
interval: 5s
timeout: 3s
retries: 5
volumes:
pg_data:
scylla_data:
redis_data:
clickhouse_data: