mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
59de1c3c33
This seems appropriate now that we've stabilized the new configuration. Of note are the configuration updates and the use of an environment variable to specify the connection URI. This upgrade also fixes the health checks. Regenerating the configuration lost the table descriptions, which seems to be because they were not present in the Chinook SQL. I have dragged the Chinook SQL in from ndc-postgres and kept it separate from the initialization of other tables. The auto-generated configuration is slightly different from the manually-created configuration in that the collection names are singular, not plural. This means that I had to change a lot of test metadata files too. V3_GIT_ORIGIN_REV_ID: 2b66fd3049aaf4daeb386915ea3b64a209b1f393
142 lines
3.5 KiB
YAML
142 lines
3.5 KiB
YAML
services:
|
|
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
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
reference_agent:
|
|
build: https://github.com/hasura/ndc-spec.git#v0.1.0-rc.18
|
|
ports:
|
|
- 8102:8100
|
|
|
|
auth_hook:
|
|
build: ./crates/hasura-authn-webhook/dev-auth-webhook
|
|
ports:
|
|
- "3050:3050"
|
|
|
|
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:
|
|
- 8100:8080
|
|
environment:
|
|
CONNECTION_URI: "postgresql://postgres:password@postgres"
|
|
OLTP_ENDPOINT: "http://jaeger:4317"
|
|
volumes:
|
|
- type: bind
|
|
source: ./crates/engine/tests/ndc-postgres-configuration
|
|
target: /etc/connector
|
|
read_only: true
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
custom_connector:
|
|
build:
|
|
context: .
|
|
target: built
|
|
entrypoint:
|
|
- ./target/release/custom-connector
|
|
ports:
|
|
- 8101:8101
|
|
healthcheck:
|
|
test: curl -fsS http://localhost:8101/schema
|
|
start_period: 5s
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 20
|
|
|
|
engine:
|
|
build:
|
|
context: .
|
|
target: built
|
|
entrypoint:
|
|
- ./target/release/engine
|
|
environment:
|
|
- METADATA_PATH
|
|
- AUTHN_CONFIG_PATH
|
|
- OLTP_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
|
|
|
|
dev_setup:
|
|
build:
|
|
context: .
|
|
target: builder
|
|
volumes:
|
|
- ./crates/tracing-util:/app/tracing-util
|
|
- ./crates/lang-graphql:/app/lang-graphql
|
|
- ./crates/open-dds:/app/open-dds
|
|
- ./crates/engine:/app/engine
|
|
- ./crates/hasura-authn-core:/app/hasura-authn-core
|
|
- ./crates/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:
|