2023-12-19 12:04:02 +03:00
|
|
|
version: "3.9"
|
|
|
|
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
|
2024-03-19 21:06:30 +03:00
|
|
|
source: ./crates/engine/tests/db_definition.sql
|
2023-12-19 12:04:02 +03:00
|
|
|
target: /docker-entrypoint-initdb.d/db_definition.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
|
2024-03-12 18:26:31 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
postgres_connector:
|
2024-02-21 15:22:55 +03:00
|
|
|
image: ghcr.io/hasura/ndc-postgres:dev-main-0452625e7
|
2024-03-21 19:48:53 +03:00
|
|
|
command:
|
|
|
|
- serve
|
|
|
|
- --configuration
|
|
|
|
- /config.json
|
2024-03-12 18:26:31 +03:00
|
|
|
ports:
|
|
|
|
- "8100:8100"
|
2023-12-19 12:04:02 +03:00
|
|
|
volumes:
|
2024-03-19 21:06:30 +03:00
|
|
|
- ./crates/engine/tests/pg_ndc_config.json:/config.json
|
2023-12-19 12:04:02 +03:00
|
|
|
depends_on:
|
|
|
|
postgres:
|
|
|
|
condition: service_healthy
|
2024-03-12 18:26:31 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
custom_connector:
|
|
|
|
build:
|
|
|
|
context: .
|
2024-03-21 19:48:53 +03:00
|
|
|
target: built
|
|
|
|
entrypoint:
|
|
|
|
- ./target/release/custom-connector
|
2024-03-12 18:26:31 +03:00
|
|
|
ports:
|
|
|
|
- "8101:8101"
|
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-12 18:26:31 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
source_only:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
target: builder
|
|
|
|
volumes:
|
|
|
|
# So that updated files make their way back to the host machine
|
|
|
|
- ./tracing-util:/app/tracing-util
|
|
|
|
- ./lang-graphql:/app/lang-graphql
|
|
|
|
- ./open-dds:/app/open-dds
|
|
|
|
- ./engine:/app/engine
|
|
|
|
- ./hasura-authn-core:/app/hasura-authn-core
|
|
|
|
- ./hasura-authn-webhook:/app/hasura-authn-webhook
|
|
|
|
- ./coverage:/app/coverage
|
2024-03-12 18:26:31 +03:00
|
|
|
|
2023-12-19 12:04:02 +03:00
|
|
|
test_setup:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
target: builder
|
|
|
|
depends_on:
|
2024-03-21 19:48:53 +03:00
|
|
|
postgres:
|
|
|
|
condition: service_healthy
|
|
|
|
postgres_connector:
|
|
|
|
condition: service_started
|
|
|
|
custom_connector:
|
|
|
|
condition: service_healthy
|
2023-12-19 12:04:02 +03:00
|
|
|
volumes:
|
|
|
|
# So that updated files make their way back to the host machine
|
|
|
|
- ./tracing-util:/app/tracing-util
|
|
|
|
- ./lang-graphql:/app/lang-graphql
|
|
|
|
- ./open-dds:/app/open-dds
|
|
|
|
- ./engine:/app/engine
|
|
|
|
- ./hasura-authn-core:/app/hasura-authn-core
|
|
|
|
- ./hasura-authn-webhook:/app/hasura-authn-webhook
|
|
|
|
- ./benchmark.sh:/app/benchmark.sh
|
|
|
|
- ./coverage:/app/coverage
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgres:
|