hasura / hasura/graphql-engine

[Azure] [MSSQL] Can't self-host with MSSQL without maintaining a Postgres database

Open
#8,548 0 comments 0 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.7.0

### Environment

OSS

### What is the expected behaviour?

The OSS should be able to be self-hosted with MSSQL, without maintaining a Postgres database.

### Keywords

mssql, azure, oss, self-host

### What is the current behaviour?

I have been unable to create an Azure Container Instance using only a MSSQL database. The closest I have come is to create the Container Instance with the `HASURA_GRAPHQL_DATABASE_URL` environment variable pointing to a valid Postgres database. This allows me to login to the instance, where I can then configure a connection to my MSSQL database. However, as soon as I delete the Postgres database to save money, I'm unable to login to the instance anymore. I have to have both the Postgres and MSSQL database running at all times. When the Postgres database no longer exists, the management console will log out automatically and ask for the admin secret to login again. However, supplying the correct admin secret doesn't work, and the console won't login.

### How to reproduce the issue?

1. Follow the [Hasura guide](https://hasura.io/docs/latest/graphql/core/deployment/deployment-guides/azure-container-instances-postgres/) to deploy a Container Instance to Azure with a Postgres database.
2. Verify that you can login to the console hosted in the Container Instance.
3. Configure a database connection to an existing MS SQL database.
4. Attempt to delete the Postgres database
5. Refresh the console, and verify that you have been logged out. Console is asking for the Admin Secret, but even the correct answer will not login anymore.
6. Verify in the logs that the container is attempting to locate the Postgres database still.
7. Recreate the Postgres database with the same configurations and note that the Console starts working again.

### If the bug is confirmed, would you be willing to submit a PR?

I'm not familiar with Docker enough to feel comfortable with this work item.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.