mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
b66c43b645
<!-- Thank you for submitting this PR! :) --> ## Description Set our `ndc-postgres` connector in tests to use new mutations versions so we can test Boolean Expressions. Also does some house-keeping, like ensuring we pull the latest `ndc-postgres` in CI and exposing `8080` from `ndc-postgres` to fix local dev flow. V3_GIT_ORIGIN_REV_ID: 4c92670e9976a3f75ec31e1224079799380ef6e2
99 lines
2.8 KiB
YAML
99 lines
2.8 KiB
YAML
services:
|
|
postgres:
|
|
image: postgis/postgis:16-3.4
|
|
platform: linux/amd64
|
|
command:
|
|
- -F # turn fsync off for speed
|
|
- -N 1000 # increase max connections from 100 so we can run more HGEs
|
|
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
|
|
|
|
postgres_connector:
|
|
image: ghcr.io/hasura/ndc-postgres:dev-main
|
|
ports:
|
|
- 8080:8080
|
|
environment:
|
|
CONNECTION_URI: "postgresql://postgres:password@postgres"
|
|
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
|
|
|
|
source_only:
|
|
build:
|
|
context: .
|
|
target: builder
|
|
volumes:
|
|
# So that updated files make their way back to the host machine
|
|
- ./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
|
|
- ./coverage:/app/coverage
|
|
|
|
test_setup:
|
|
build:
|
|
context: .
|
|
target: builder
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
postgres_connector:
|
|
condition: service_healthy
|
|
custom_connector:
|
|
condition: service_healthy
|
|
volumes:
|
|
# So that updated files make their way back to the host machine
|
|
- ./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
|
|
- ./benchmark.sh:/app/benchmark.sh
|
|
- ./coverage:/app/coverage
|
|
|
|
volumes:
|
|
postgres:
|