-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
84 lines (75 loc) · 2.45 KB
/
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
# Based on the template from https://raw.githubusercontent.com/hasura/graphql-engine/stable/install-manifests/docker-compose/docker-compose.yaml
version: "3.9"
services:
reference-agent:
# image: "hasura/dc-reference-agent:${HASURA_VERSION}"
build: ./reference
## NOTE: If you want to modify the reference-agent you can use the build config for Docker Compose
# ports:
# - 8100:8100
postgres:
image: "postgres:13"
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgrespassword
engine:
depends_on:
- postgres
- reference-agent
image: "hasura/graphql-engine:${HASURA_VERSION}"
# image: "hasura/graphql-engine:${HASURA_VERSION}.ubuntu.amd64" # Intel specific image
# image: "hasura/graphql-engine:${HASURA_VERSION}.ubuntu.arm64" # ARM specific image
restart: always
ports:
- 8080:8080
environment:
HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
HASURA_GRAPHQL_METADATA_DATABASE_URL: "postgres://postgres:postgrespassword@postgres:5432/postgres"
PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: "startup, http-log, webhook-log, websocket-log, query-log"
### socat can provide a proxied local native hge for testing
# engine:
# image: alpine/socat
# depends_on:
# - postgres
# - reference-agent
# ports:
# - 8080:8080
# command: tcp-listen:8080,fork,reuseaddr tcp-connect:host.docker.internal:8888
replace-metadata:
depends_on:
- engine
image: "curlimages/curl:7.83.1"
volumes:
- ./metadata:/hasura-metadata
command:
- 'http://engine:8080/v1/metadata'
- '--fail'
- '-X'
- 'POST'
- '-H'
- 'Accept: */*'
- '-H'
- 'Content-Type: application/json'
- '--data-binary'
- '@/hasura-metadata/metadata-api.json'
restart: on-failure
tests:
depends_on:
- reference-agent
image: "hasura/dc-agent-tests:${HASURA_VERSION}"
command: [ "tests-dc-api", 'test', '--agent-base-url', 'http://reference-agent:8100' ]
restart: on-failure
swagger-ui:
# TODO: Point at the reference agent
image: "swaggerapi/swagger-ui:v4.10.3"
volumes:
- ./agent.openapi.json:/app/swagger.json
ports:
- 8300:8080
volumes:
db_data: