2023-04-25 17:41:15 +03:00
|
|
|
version: "3.6"
|
2022-10-20 20:06:23 +03:00
|
|
|
services:
|
|
|
|
postgres:
|
2023-04-25 17:41:15 +03:00
|
|
|
image: postgres:15
|
2022-10-20 20:06:23 +03:00
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: postgrespassword
|
|
|
|
|
|
|
|
## Hasura is compatible with CockroachDB 22.2 onwards
|
|
|
|
cockroach:
|
2023-01-12 14:45:01 +03:00
|
|
|
image: cockroachdb/cockroach:v22.2.1
|
2022-10-20 20:06:23 +03:00
|
|
|
# starts an _insecure_, single-node CockroachDB intended for non-production uses only
|
|
|
|
# follow the CockroachDB Cloud Guide to connect to a production CockroachDB cluster
|
|
|
|
command:
|
|
|
|
- start-single-node
|
|
|
|
- --insecure
|
|
|
|
- --accept-sql-without-tls
|
|
|
|
ports:
|
2023-04-25 17:41:15 +03:00
|
|
|
- "26257:26257"
|
2022-10-20 20:06:23 +03:00
|
|
|
environment:
|
2023-04-25 17:41:15 +03:00
|
|
|
COCKROACH_USER: "root"
|
|
|
|
COCKROACH_DATABASE: "hasura"
|
2022-10-20 20:06:23 +03:00
|
|
|
volumes:
|
2023-04-25 17:41:15 +03:00
|
|
|
- "${PWD}/cockroach-data:/cockroach/cockroach-data"
|
2022-10-20 20:06:23 +03:00
|
|
|
|
|
|
|
graphql-engine:
|
2023-05-30 12:10:13 +03:00
|
|
|
image: hasura/graphql-engine:v2.26.0
|
2022-10-20 20:06:23 +03:00
|
|
|
ports:
|
2023-04-25 17:41:15 +03:00
|
|
|
- "8080:8080"
|
2022-10-20 20:06:23 +03:00
|
|
|
depends_on:
|
2023-04-25 17:41:15 +03:00
|
|
|
- "postgres"
|
|
|
|
- "cockroach"
|
2022-10-20 20:06:23 +03:00
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
## postgres database to store Hasura metadata
|
|
|
|
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
|
|
|
|
## enable the console served by server
|
2023-04-25 17:41:15 +03:00
|
|
|
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
|
2022-10-20 20:06:23 +03:00
|
|
|
## enable debugging mode. It is recommended to disable this in production
|
2023-04-25 17:41:15 +03:00
|
|
|
HASURA_GRAPHQL_DEV_MODE: "true"
|
2022-10-20 20:06:23 +03:00
|
|
|
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
|
|
|
|
## uncomment next line to run console offline (i.e load console assets from server instead of CDN)
|
2022-11-04 19:13:19 +03:00
|
|
|
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
|
2022-10-20 20:06:23 +03:00
|
|
|
## uncomment next line to set an admin secret
|
|
|
|
# HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
|
|
|
|
volumes:
|
|
|
|
postgres-data:
|
|
|
|
cockroach-data:
|