mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 08:02:15 +03:00
8064c292b5
Upgrade engine to ndc v0.1.3. Also updates custom connector. --------- Co-authored-by: Samir Talwar <samir.talwar@hasura.io> Co-authored-by: Gil Mizrahi <gil@hasura.io> V3_GIT_ORIGIN_REV_ID: 80959d4702ef785b7809d6432e092b6477ef88c1
163 lines
4.1 KiB
YAML
163 lines
4.1 KiB
YAML
# this Docker Compose file is used for local testing
|
|
|
|
services:
|
|
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
|
|
|
|
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
|
|
source: ./crates/engine/tests/db_definition.sql
|
|
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
|
|
read_only: true
|
|
- type: bind
|
|
source: ./crates/engine/tests/finish.sql
|
|
target: /docker-entrypoint-initdb.d/03-finish.sql
|
|
read_only: true
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- psql -U "$${POSTGRES_USER:-postgres}" finished < /dev/null
|
|
start_period: 2s
|
|
interval: 2s
|
|
timeout: 1s
|
|
retries: 5
|
|
|
|
reference_agent:
|
|
build: https://github.com/hasura/ndc-spec.git#v0.1.3
|
|
ports:
|
|
- 8102:8100
|
|
|
|
auth_hook:
|
|
build:
|
|
dockerfile: dev-auth-webhook.Dockerfile
|
|
environment:
|
|
OTLP_ENDPOINT: "http://jaeger:4317"
|
|
RUST_LOG: debug
|
|
ports:
|
|
- "3050:3050"
|
|
depends_on:
|
|
jaeger:
|
|
condition: service_started
|
|
|
|
jaeger:
|
|
image: jaegertracing/all-in-one:1.55
|
|
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:
|
|
COLLECTOR_OTLP_ENABLED: "true"
|
|
COLLECTOR_ZIPKIN_HOST_PORT: "9411"
|
|
|
|
postgres_connector:
|
|
image: ghcr.io/hasura/ndc-postgres:dev-main
|
|
ports:
|
|
- 8080:8080
|
|
environment:
|
|
CONNECTION_URI: "postgresql://postgres:password@postgres"
|
|
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "http://jaeger:4317"
|
|
OTEL_SERVICE_NAME: "ndc-postgres"
|
|
RUST_LOG: info
|
|
volumes:
|
|
- type: bind
|
|
source: ./crates/engine/tests/ndc-postgres-configuration
|
|
target: /etc/connector
|
|
read_only: true
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
jaeger:
|
|
condition: service_started
|
|
|
|
custom_connector:
|
|
build:
|
|
dockerfile: debug.Dockerfile
|
|
entrypoint:
|
|
- ./bin/custom-connector
|
|
ports:
|
|
- 8101:8101
|
|
environment:
|
|
RUST_LOG: info
|
|
healthcheck:
|
|
test: curl -fsS http://localhost:8101/schema
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
dev_setup:
|
|
build:
|
|
context: .
|
|
target: builder
|
|
volumes:
|
|
- ./crates/utils/tracing-util:/app/tracing-util
|
|
- ./crates/lang-graphql:/app/lang-graphql
|
|
- ./crates/open-dds:/app/open-dds
|
|
- ./crates/engine:/app/engine
|
|
- ./crates/auth/hasura-authn-core:/app/hasura-authn-core
|
|
- ./crates/auth/hasura-authn-webhook:/app/hasura-authn-webhook
|
|
ports:
|
|
- 3000:3000
|
|
depends_on:
|
|
jaeger:
|
|
condition: service_started
|
|
auth_hook:
|
|
condition: service_started
|
|
postgres:
|
|
condition: service_healthy
|
|
postgres_connector:
|
|
condition: service_healthy
|
|
custom_connector:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres:
|