forked from hasura/graphql-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
229 lines (216 loc) · 6.52 KB
/
docker-compose.yaml
File metadata and controls
229 lines (216 loc) · 6.52 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# this Docker Compose file loads `v3-engine` along with an `ndc-postgres`
# connector and a sample `postgres` database
# run it with `docker compose up`, then access Graphiql at localhost:3000
# or view traces in Jaeger at localhost:4002
services:
engine:
build:
dockerfile: Dockerfile
environment:
- METADATA_PATH=app/metadata.json
- AUTHN_CONFIG_PATH=app/auth_config.json
- OTLP_ENDPOINT=http://jaeger:4317
ports:
- 3000:3000
depends_on:
jaeger:
condition: service_started
auth_hook:
condition: service_started
pre_ndc_request_plugin_example:
condition: service_started
pre_ndc_response_plugin_example:
condition: service_started
pre_parse_plugin_example:
condition: service_started
extra_hosts:
- local.hasura.dev=${LOCALHOST_GATEWAY:-host-gateway}
volumes:
- ./static/auth/auth_config_v3.json:/app/auth_config.json
- ./static/metadata.json:/app/metadata.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:
- 5432: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
auth_hook:
build:
dockerfile: dev-auth-webhook.Dockerfile
# this tag will only be found on images built in CI,
# otherwise we build from Dockerfile
image: build.internal/dev-auth-webhook-x86_64-linux:ci
environment:
OTLP_ENDPOINT: "http://jaeger:4317"
RUST_LOG: debug
ports:
- "3050:3050"
depends_on:
jaeger:
condition: service_started
pre_ndc_request_plugin_example:
build:
dockerfile: pre-ndc-request-plugin-example.Dockerfile
# this tag will only be found on images built in CI,
# otherwise we build from Dockerfile
image: build.internal/pre-ndc-request-plugin-example-x86_64-linux:ci
environment:
RUST_LOG: info
ports:
- "5001:5001"
depends_on:
jaeger:
condition: service_started
pre_ndc_response_plugin_example:
build:
dockerfile: pre-ndc-response-plugin-example.Dockerfile
# this tag will only be found on images built in CI,
# otherwise we build from Dockerfile
image: build.internal/pre-ndc-response-plugin-example-x86_64-linux:ci
environment:
RUST_LOG: info
ports:
- "5002:5002"
depends_on:
jaeger:
condition: service_started
pre_parse_plugin_example:
build:
dockerfile: pre-parse-plugin-example.Dockerfile
# this tag will only be found on images built in CI,
# otherwise we build from Dockerfile
image: build.internal/pre-parse-plugin-example-x86_64-linux:ci
environment:
RUST_LOG: info
ports:
- "5003:5003"
depends_on:
jaeger:
condition: service_started
# browse traces at: http://localhost:16686/search
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
- 16686:16686
environment:
COLLECTOR_OTLP_ENABLED: "true"
COLLECTOR_ZIPKIN_HOST_PORT: "9411"
postgres_connector_ndc_v01:
image: ghcr.io/hasura/ndc-postgres:122d80f6c
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
postgres_connector:
image: ghcr.io/hasura/ndc-postgres:dev-main
ports:
- 8082: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
custom_connector:
build:
dockerfile: custom-connector.Dockerfile
# this tag will only be found on images built in CI
# otherwise we build from Dockerfile
image: build.internal/custom-connector-x86_64-linux:ci
ports:
- "8102:8102"
environment:
RUST_LOG: info
ENABLE_RELATIONSHIP_SUPPORT: "1" # Enabled
healthcheck:
test: curl -fsS http://localhost:8102/schema
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
custom_connector_no_relationships:
build:
dockerfile: custom-connector.Dockerfile
# this tag will only be found on images built in CI
# otherwise we build from Dockerfile
image: build.internal/custom-connector-x86_64-linux:ci
ports:
- "8103:8102"
environment:
RUST_LOG: info
ENABLE_RELATIONSHIP_SUPPORT: "0" # Disabled
healthcheck:
test: curl -fsS http://localhost:8102/schema
start_period: 5s
interval: 5s
timeout: 10s
retries: 20
custom_connector_ndc_v01:
# This is the v3-engine commit version before the custom connector got upgraded to ndc_models v0.2.0
image: ghcr.io/hasura/v3-custom-connector:bef8a750ca31b067952247ad348683a4faa843f5
ports:
- "8101:8101"
environment:
RUST_LOG: info
volumes:
postgres: