forked from hasura/graphql-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.docker-compose.yaml
94 lines (89 loc) · 2.56 KB
/
ci.docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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
source: ./crates/engine/tests/db_definition.sql
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
postgres_connector:
image: ghcr.io/hasura/ndc-postgres:dev-main-0452625e7
command:
- serve
- --configuration
- /config.json
ports:
- "8100:8100"
volumes:
- ./crates/engine/tests/pg_ndc_config.json:/config.json
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_started
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: