graphql-engine/install-manifests/enterprise/mysql/docker-compose.yaml
Rikin Kachhia b1c2998fc4 ci: update latest stable release as v2.39.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10809
GitOrigin-RevId: 09df4c35cffae8f1b11c16c5293805079141d85c
2024-05-13 11:46:22 +00:00

76 lines
3.1 KiB
YAML

version: "3.7"
services:
redis:
image: redis:7
restart: always
# ports:
# - 6379:6379
postgres:
image: postgres:15
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgrespassword
hasura:
image: hasura/graphql-engine:v2.39.0
restart: always
ports:
- 8080:8080
environment:
## Add your license key below
# HASURA_GRAPHQL_EE_LICENSE_KEY: ""
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
## The metadata database for this Hasura GraphQL project. Can be changed to a managed postgres instance
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
# HASURA_GRAPHQL_READ_REPLICA_URLS: postgres://postgres:postgrespassword@postgres:5432/postgres
## Optional settings
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
## enable required apis; metrics api exposes a prometheus endpoint, uncomment to enable
# HASURA_GRAPHQL_ENABLED_APIS: 'graphql,metadata,config,developer,pgdump,metrics'
## secure metrics endpoint with a secret, uncomment to enable
# HASURA_GRAPHQL_METRICS_SECRET: 'secret'
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: "true"
# HASURA_GRAPHQL_LOG_LEVEL: debug
## enable offline console assets if you wish to access console without internet connectivity
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: "/srv/console-assets"
HASURA_GRAPHQL_REDIS_URL: redis://redis:6379
HASURA_GRAPHQL_RATE_LIMIT_REDIS_URL: "redis://redis:6379"
HASURA_GRAPHQL_MAX_CACHE_SIZE: "200"
# Configures the connection to the Data Connector agent for MySQL by default
# You can also omit this and manually configure the same thing via the 'Data' tab, then 'Add Agent'
# in the Hasura console
HASURA_GRAPHQL_METADATA_DEFAULTS: '{"backend_configs":{"dataconnector":{"mysql8":{"uri":"http://data-connector-agent:8081/api/v1/mysql"}}}}'
depends_on:
data-connector-agent:
condition: service_healthy
data-connector-agent:
image: hasura/graphql-data-connector:v2.39.0
restart: always
ports:
- 8081:8081
environment:
QUARKUS_LOG_LEVEL: ERROR # FATAL, ERROR, WARN, INFO, DEBUG, TRACE
## https://quarkus.io/guides/opentelemetry#configuration-reference
QUARKUS_OPENTELEMETRY_ENABLED: "false"
## QUARKUS_OPENTELEMETRY_TRACER_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/api/v1/mysql/health"]
interval: 5s
timeout: 10s
retries: 5
start_period: 5s
database:
image: mysql
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
# (this is just an example, not intended to be a production configuration)
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
volumes:
db_data: