When I'm trying to user any other database except Postgres as HASURA_GRAPHQL_METADATA_DATABASE_URL, it doesn't seem to work and gives me the following error
"{"detail":{"info":{"code":"postgres-error","error":"connection error","internal":"invalid connection option \"Driver\"\n","path":"$"},"kind":"catalog_migrate"},"level":"error","timestamp":"2022-09-22T17:36:45.756+0000","type":"startup"}"
It seems to automatically expect the metadata database to be PostgreSQL.
I couldn't find anywhere in the Hasura documentation where this is mentioned. Although in the documentation whenever they talk about metadata database they seem to use PostgreSQL,
References:-
- https://hasura.io/docs/latest/deployment/postgres-requirements/#postgres-permissions
- https://hasura.io/docs/latest/deployment/graphql-engine-flags/reference/#graphql-engine-command-flags--environment-variables
Can we only use PostgreSQL for storing metadata in Hasura ? or is there any hack which i'm not aware of ?
PS: My Dockerfile for reference
# Hasura GraphQL Engine Image
FROM hasura/graphql-engine:latest as hasura
# Install packages required to run hasura
FROM debian as base
RUN apt-get -y update && apt-get install -y libpq-dev && apt-get install -y unixodbc-dev && apt-get install -y libmariadb-dev && apt-get -y auto-remove && apt-get -y clean && rm -rf /var/lib/apt/lists/* && rm -rf /usr/share/doc/ && rm -rf /usr/share/man/ && rm -rf /usr/share/locale/
# set working directory
WORKDIR /app
# copy hasura binary into the working directory
COPY --from=hasura bin/graphql-engine ./graphql-engine
# change user to be non-root
USER 10000
# Expose port 8080 for accessing console
EXPOSE 8080
# set hasura related environment variables
ENV HASURA_GRAPHQL_ENABLE_CONSOLE=true
ENV HASURA_GRAPHQL_DEV_MODE=true
ENV HASURA_GRAPHQL_DATABASE_URL='<my_sql_server_url>' # placeholder value
ENV HASURA_GRAPHQL_METADATA_DATABASE_URL='<my_sql_server_url>' # placeholder value
# execute the entrypoint script
CMD ["/app/graphql-engine", "serve"]