mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
b012f2ebc7
[GDC-718]: https://hasurahq.atlassian.net/browse/GDC-718?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7743 GitOrigin-RevId: 6c3577c1d4ffd2212a72b6e1a24e0e384f2db046
85 lines
2.4 KiB
YAML
85 lines
2.4 KiB
YAML
# 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:
|