mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
0cfab171eb
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6762 GitOrigin-RevId: 655be8b1158b6bb4bc7ccd73cf6d890506c9b6f6
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
version: '3.6'
|
|
services:
|
|
postgres:
|
|
image: postgres:14
|
|
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:
|
|
image: cockroachdb/cockroach-unstable:v22.2.0-beta.4
|
|
# 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:
|
|
- '26257:26257'
|
|
environment:
|
|
COCKROACH_USER: 'root'
|
|
COCKROACH_DATABASE: 'hasura'
|
|
volumes:
|
|
- '${PWD}/cockroach-data:/cockroach/cockroach-data'
|
|
|
|
graphql-engine:
|
|
image: hasura/graphql-engine:v2.15.0-beta.1-ce
|
|
ports:
|
|
- '8080:8080'
|
|
depends_on:
|
|
- 'postgres'
|
|
- 'cockroach'
|
|
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
|
|
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' # set to "false" to disable console
|
|
## enable debugging mode. It is recommended to disable this in production
|
|
HASURA_GRAPHQL_DEV_MODE: 'true'
|
|
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)
|
|
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
|
|
## uncomment next line to set an admin secret
|
|
# HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
|
|
volumes:
|
|
postgres-data:
|
|
cockroach-data:
|