Last active
March 5, 2021 12:18
-
-
Save soorajshankar/c4906b5584aed953aa8885fea9f6df3a to your computer and use it in GitHub Desktop.
Deploy Hasura 2 - with 2 PostgreSQL and mssql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
postgres: | |
image: postgres:12 | |
restart: always | |
volumes: | |
- db_data:/var/lib/postgresql/data | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_PASSWORD: postgrespassword | |
msserver: | |
image: "mcr.microsoft.com/mssql/server:2019-latest" | |
ports: | |
- "1433:1433" | |
environment: | |
SA_PASSWORD: "testPassword123" | |
ACCEPT_EULA: "Y" | |
db: | |
image: postgres:12 | |
ports: | |
- "35432:5432" | |
environment: | |
POSTGRES_USER: user_sooraj | |
POSTGRES_PASSWORD: pass | |
POSTGRES_DB: db | |
volumes: | |
- db_dataa:/var/lib/postgresql/data | |
graphql-engine: | |
image: hasura/graphql-engine:v2.0.0-alpha.3 | |
ports: | |
- "8080:8080" | |
depends_on: | |
- "postgres" | |
- "db" | |
- "msserver" | |
extra_hosts: | |
- "dockerhost:192.168.43.136" | |
restart: always | |
environment: | |
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres | |
HASURA_GRAPHQL_SEC_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres | |
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console | |
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log | |
HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS: "true" | |
# HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES: "true" | |
## uncomment next line to set an admin secret | |
HASURA_GRAPHQL_ADMIN_SECRET: testpassword | |
HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: '/srv/console-assets' | |
# HASURA_GRAPHQL_ENABLED_APIS: metadata,graphql,pgdump,config | |
# HASURA_GRAPHQL_PRO_ENDPOINT: https://pro.staging-1.hasura-app.io | |
DB2: postgres://user_sooraj:pass@db:5432/db | |
volumes: | |
db_data: | |
db_dataa: | |
# Connect to second PG by env var DB2 | |
# Connect to metadata PG by HASURA_GRAPHQL_METADATA_DATABASE_URL | |
# Connect to mssql server by connection string (not env) | |
# DRIVER={ODBC Driver 17 for SQL Server};SERVER=msserver;Uid=SA;Pwd=testPassword123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment