2024-05-03 00:39:42 +03:00
|
|
|
# this Docker Compose file is used for local testing
|
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
services:
|
2024-05-03 00:39:42 +03:00
|
|
|
engine:
|
|
|
|
build:
|
|
|
|
dockerfile: debug.Dockerfile
|
|
|
|
entrypoint:
|
|
|
|
- ./bin/engine
|
|
|
|
environment:
|
|
|
|
- METADATA_PATH
|
|
|
|
- AUTHN_CONFIG_PATH
|
|
|
|
- OTLP_ENDPOINT=http://jaeger:4317
|
|
|
|
ports:
|
|
|
|
# Binding to localhost:3001 avoids conflict with dev_setup
|
|
|
|
- 3001:3000
|
|
|
|
depends_on:
|
|
|
|
reference_agent:
|
|
|
|
condition: service_started
|
|
|
|
jaeger:
|
|
|
|
condition: service_started
|
|
|
|
auth_hook:
|
|
|
|
condition: service_started
|
|
|
|
volumes:
|
|
|
|
- ./auth_config.json:/app/auth_config.json
|
|
|
|
- ./crates/engine/tests/schema.json:/app/crates/engine/tests/schema.json
|
|
|
|
- ./crates/open-dds/examples/reference.json:/app/crates/open-dds/examples/reference.json
|
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
postgres:
|
|
|
|
image: postgis/postgis:16-3.4
|
|
|
|
platform: linux/amd64
|
|
|
|
restart: always
|
|
|
|
command:
|
|
|
|
- -F # turn fsync off for speed
|
|
|
|
- -N 1000 # increase max connections from 100 so we can run more HGEs
|
|
|
|
ports:
|
|
|
|
- 64001:5432
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: "password"
|
|
|
|
volumes:
|
|
|
|
- type: volume
|
|
|
|
source: postgres
|
|
|
|
target: /var/lib/postgresql/data
|
|
|
|
- type: bind
|
2024-03-19 21:06:30 +03:00
|
|
|
source: ./crates/engine/tests/db_definition.sql
|
2024-04-03 11:03:18 +03:00
|
|
|
target: /docker-entrypoint-initdb.d/01-db_definition.sql
|
|
|
|
read_only: true
|
|
|
|
- type: bind
|
|
|
|
source: ./crates/engine/tests/chinook-postgres.sql
|
|
|
|
target: /docker-entrypoint-initdb.d/02-chinook.sql
|
2023-12-19 12:04:02 +03:00
|
|
|
read_only: true
|
2024-04-22 16:42:32 +03:00
|
|
|
- type: bind
|
|
|
|
source: ./crates/engine/tests/finish.sql
|
|
|
|
target: /docker-entrypoint-initdb.d/03-finish.sql
|
|
|
|
read_only: true
|
2023-12-19 12:04:02 +03:00
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
- CMD-SHELL
|
2024-04-22 16:42:32 +03:00
|
|
|
- psql -U "$${POSTGRES_USER:-postgres}" finished < /dev/null
|
|
|
|
start_period: 2s
|
|
|
|
interval: 2s
|
|
|
|
timeout: 1s
|
|
|
|
retries: 5
|
2024-03-21 19:48:53 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
reference_agent:
|
2024-04-11 10:41:06 +03:00
|
|
|
build: https://github.com/hasura/ndc-spec.git#v0.1.2
|
2023-12-19 12:04:02 +03:00
|
|
|
ports:
|
|
|
|
- 8102:8100
|
2024-03-21 19:48:53 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
auth_hook:
|
2024-04-11 10:41:06 +03:00
|
|
|
build:
|
|
|
|
dockerfile: dev-auth-webhook.Dockerfile
|
|
|
|
environment:
|
|
|
|
OTLP_ENDPOINT: "http://jaeger:4317"
|
2024-04-16 17:55:54 +03:00
|
|
|
RUST_LOG: debug
|
2023-12-19 12:04:02 +03:00
|
|
|
ports:
|
|
|
|
- "3050:3050"
|
2024-04-11 10:41:06 +03:00
|
|
|
depends_on:
|
|
|
|
jaeger:
|
|
|
|
condition: service_started
|
2024-03-21 19:48:53 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
jaeger:
|
2024-03-28 11:52:02 +03:00
|
|
|
image: jaegertracing/all-in-one:1.55
|
2023-12-19 12:04:02 +03:00
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- 5775:5775/udp
|
|
|
|
- 6831:6831/udp
|
|
|
|
- 6832:6832/udp
|
|
|
|
- 5778:5778
|
|
|
|
- 4002:16686
|
|
|
|
- 14250:14250
|
|
|
|
- 14268:14268
|
|
|
|
- 14269:14269
|
|
|
|
- 4317:4317 # OTLP gRPC
|
|
|
|
- 4318:4318 # OTLP HTTP
|
|
|
|
- 9411:9411
|
|
|
|
environment:
|
2024-03-21 19:48:53 +03:00
|
|
|
COLLECTOR_OTLP_ENABLED: "true"
|
|
|
|
COLLECTOR_ZIPKIN_HOST_PORT: "9411"
|
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
postgres_connector:
|
2024-04-03 11:03:18 +03:00
|
|
|
image: ghcr.io/hasura/ndc-postgres:dev-main
|
2023-12-19 12:04:02 +03:00
|
|
|
ports:
|
2024-04-16 09:50:45 +03:00
|
|
|
- 8080:8080
|
2024-04-03 11:03:18 +03:00
|
|
|
environment:
|
|
|
|
CONNECTION_URI: "postgresql://postgres:password@postgres"
|
2024-04-11 10:41:06 +03:00
|
|
|
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "http://jaeger:4317"
|
|
|
|
OTEL_SERVICE_NAME: "ndc-postgres"
|
2024-05-14 18:10:42 +03:00
|
|
|
RUST_LOG: info
|
2023-12-19 12:04:02 +03:00
|
|
|
volumes:
|
2024-04-03 11:03:18 +03:00
|
|
|
- type: bind
|
|
|
|
source: ./crates/engine/tests/ndc-postgres-configuration
|
|
|
|
target: /etc/connector
|
|
|
|
read_only: true
|
2023-12-19 12:04:02 +03:00
|
|
|
depends_on:
|
|
|
|
postgres:
|
|
|
|
condition: service_healthy
|
2024-04-11 10:41:06 +03:00
|
|
|
jaeger:
|
|
|
|
condition: service_started
|
2024-03-21 19:48:53 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
custom_connector:
|
|
|
|
build:
|
2024-04-22 16:42:32 +03:00
|
|
|
dockerfile: debug.Dockerfile
|
2024-03-21 19:48:53 +03:00
|
|
|
entrypoint:
|
2024-04-22 16:42:32 +03:00
|
|
|
- ./bin/custom-connector
|
2023-12-19 12:04:02 +03:00
|
|
|
ports:
|
|
|
|
- 8101:8101
|
2024-05-14 18:10:42 +03:00
|
|
|
environment:
|
|
|
|
RUST_LOG: info
|
2023-12-19 12:04:02 +03:00
|
|
|
healthcheck:
|
2024-03-21 19:48:53 +03:00
|
|
|
test: curl -fsS http://localhost:8101/schema
|
2023-12-19 12:04:02 +03:00
|
|
|
start_period: 5s
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 20
|
2024-03-21 19:48:53 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
dev_setup:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
target: builder
|
|
|
|
volumes:
|
2024-05-01 12:04:24 +03:00
|
|
|
- ./crates/utils/tracing-util:/app/tracing-util
|
2024-03-19 21:06:30 +03:00
|
|
|
- ./crates/lang-graphql:/app/lang-graphql
|
|
|
|
- ./crates/open-dds:/app/open-dds
|
|
|
|
- ./crates/engine:/app/engine
|
2024-05-01 12:04:24 +03:00
|
|
|
- ./crates/auth/hasura-authn-core:/app/hasura-authn-core
|
|
|
|
- ./crates/auth/hasura-authn-webhook:/app/hasura-authn-webhook
|
2023-12-19 12:04:02 +03:00
|
|
|
ports:
|
|
|
|
- 3000:3000
|
2024-03-21 19:48:53 +03:00
|
|
|
depends_on:
|
|
|
|
jaeger:
|
|
|
|
condition: service_started
|
|
|
|
auth_hook:
|
|
|
|
condition: service_started
|
|
|
|
postgres:
|
|
|
|
condition: service_healthy
|
|
|
|
postgres_connector:
|
2024-04-03 11:03:18 +03:00
|
|
|
condition: service_healthy
|
2024-03-21 19:48:53 +03:00
|
|
|
custom_connector:
|
|
|
|
condition: service_healthy
|
2023-12-19 12:04:02 +03:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgres:
|