I run Hasura on a virtual machine as self-hosted on Docker. I am experiencing the following problem: I follow the guide to authenticate with Amazon Cognito, but when I add the HASURA_GRAPHQL_JWT_SECRET variable to my docker-compose.yaml file, the console does not start. When I remove this variable and run it again, the console works.
Here is my docker-compose.yaml file:
services:
postgres:
image: postgres:15
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgrespassword
graphql-engine:
image: hasura/graphql-engine:v2.40.0
ports:
- "8080:8080"
restart: always
environment:
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
HASURA_GRAPHQL_METADATA_DEFAULTS: '{"backend_configs":{"dataconnector":{"athena":{"uri":"http://data-connector-agent:8081/api/v1/athena"},"mariadb":{"uri":"http://data-connector-agent:8081/api/v1/mariadb"},"mysql8":{"uri":"http://data-connector-agent:8081/api/v1/mysql"},"oracle":{"uri":"http://data-connector-agent:8081/api/v1/oracle"},"snowflake":{"uri":"http://data-connector-agent:8081/api/v1/snowflake"}}}}'
HASURA_GRAPHQL_JWT_SECRET: '{"claims_format": "stringified_json","jwk_url": "https://cognito-idp.eu-central-1.amazonaws.com/eu-central-1_*********/.well-known/jwks.json","type": "RS256"}'
depends_on:
data-connector-agent:
condition: service_healthy
data-connector-agent:
image: hasura/graphql-data-connector:v2.40.0
restart: always
ports:
- 8081:8081
environment:
QUARKUS_LOG_LEVEL: ERROR
QUARKUS_OPENTELEMETRY_ENABLED: "false"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/api/v1/athena/health"]
interval: 5s
timeout: 10s
retries: 5
start_period: 5s
volumes:
db_data:
New contributor
Görkem DURGUN is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.