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.1-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.1-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 # Regenerate GraphQL types and fail if the working tree drifts. # Mirrors the `check_generated_graphql` CI job. # node_modules is in a dedicated volume so the install doesn't clobber the host's node_modules. codegen-check: build: context: . dockerfile: Dockerfile target: server_base working_dir: /src command: bash -c 'set -e && git config --global --add safe.directory /src && npm ci && npm run generate && [[ -z "$(git status --porcelain)" ]]' volumes: - .:/src - codegen_node_modules:/src/node_modules backend: build: context: . dockerfile: Dockerfile target: server_base client: build: context: client target: client_base volumes: - ./client/eslint:/app/eslint - ./client/.eslintrc.cjs:/app/.eslintrc.cjs - ./client/eslint.config.mjs:/app/eslint.config.mjs 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: codegen_node_modules: