-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: self-hosted hasura for DataLayer graphql API #23
Changes from 2 commits
5989021
b278d13
dc103f4
0cec1ea
664ab3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,49 @@ services: | |
POSTGRES_PASSWORD: ${DATALAYER_POSTGRES_PASSWORD} | ||
networks: | ||
- datalayer | ||
healthcheck: | ||
test: ["CMD-SHELL", "pg_isready -U ${DATALAYER_PG_USER}"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
api-hasura: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets pick more descriptive namings here instead of instead of instead of instead of lmk wdyt : ) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree on making them more descriptive but i like the tech being on the name datalayer-graphql-api but we can go with your naming too, don't have any particular preference There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets do it in that way :) |
||
image: hasura/graphql-engine:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you sure you don't want to pin a version to this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice catch |
||
ports: | ||
- "${DATALAYER_HASURA_EXPOSED_PORT:-8082}:8080" | ||
restart: always | ||
env_file: | ||
- .env | ||
environment: | ||
HASURA_GRAPHQL_DATABASE_URL: postgres://${DATALAYER_PG_USER}:${DATALAYER_POSTGRES_PASSWORD}@datalayer-postgres:5432/${DATALAYER_PG_DATABASE} | ||
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://${DATALAYER_PG_USER}:${DATALAYER_POSTGRES_PASSWORD}@datalayer-postgres:5432/${DATALAYER_PG_DATABASE} | ||
HASURA_GRAPHQL_ENABLE_CONSOLE: ${DATALAYER_HASURA_ENABLE_CONSOLE:-true} | ||
HASURA_GRAPHQL_ADMIN_SECRET: ${DATALAYER_HASURA_ADMIN_SECRET:-secret} | ||
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: ${DATALAYER_HASURA_UNAUTHORIZED_ROLE:-public} | ||
HASURA_GRAPHQL_CORS_DOMAIN: ${DATALAYER_HASURA_CORS_DOMAIN:-*} | ||
HASURA_GRAPHQL_ENABLE_TELEMETRY: ${DATALAYER_HASURA_ENABLE_TELEMETRY:-false} | ||
HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: bigquery_string_numeric_input | ||
HASURA_GRAPHQL_BIGQUERY_STRING_NUMERIC_INPUT: true | ||
# HASURA_GRAPHQL_METADATA_DATABASE_EXTENSIONS_SCHEMA: ${DATALAYER_HASURA_METADATA_DATABASE_EXTENSIONS_SCHEMA:-chain_data_schema_1} | ||
## enable debugging mode. It is recommended to disable this in production | ||
HASURA_GRAPHQL_DEV_MODE: ${DATALAYER_HASURA_DEV_MODE:-true} | ||
HASURA_GRAPHQL_ENABLED_LOG_TYPES: "startup, http-log, webhook-log, websocket-log, query-log" | ||
HASURA_GRAPHQL_ENABLED_APIS: "graphql,metrics" | ||
HASURA_GRAPHQL_ADMIN_INTERNAL_ERRORS: "true" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we default this to false? would not want to expose prod info by accident There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you're right |
||
## 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 | ||
depends_on: | ||
datalayer-postgres: | ||
condition: service_healthy | ||
healthcheck: | ||
test: timeout 1s bash -c ':> /dev/tcp/127.0.0.1/8080' || exit 1 | ||
interval: 5s | ||
timeout: 2s | ||
retries: 50 | ||
start_period: 5s | ||
networks: | ||
- datalayer | ||
|
||
envio-postgres: | ||
image: postgres:16 | ||
restart: always | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some explanation of this might be useful--or do you think it would be clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll add a link to Hasura docs explaining each variable