nhost / hasura-auth

Authentication for Hasura.
https://nhost.io
MIT License
373 stars 111 forks source link

[Guidance] How do I self-host hasura-auth and hasura-storage on my server but connect to Hasura Cloud? #448

Closed ammarfaris closed 7 months ago

ammarfaris commented 7 months ago

Hi there, Thanks for your amazing work at Nhost. I would like to ask if it is possible to self-host hasura-auth and hasura-storage on my server but connect to Hasura Cloud (i.e. the hasura instance is not self-hosted because I want to try to leverage caching,adding read-replicas, monitoring, rate-limiting, etc offered by Hasura Cloud).

Looking at the environment variables: https://github.com/nhost/hasura-auth/blob/main/docs/environment-variables.md

I found HASURA_GRAPHQL_GRAPHQL_URL and HASURA_GRAPHQL_ADMIN_SECRET ;

looking at your sample docker self-host setup i saw that for "auth" process: you have this internal link (i'm assuming it's an internal link via port 8080) => HASURA_GRAPHQL_GRAPHQL_URL: http://graphql-engine:8080/v1/graphql

I tried changing the url and admin secret to provide my Hasura Cloud credentials, but it did not work, and I received the following errors:


nhost-selfhost-traefik-1    | time="2023-11-28T06:26:18Z" level=error msg="service \"storage-nhost-selfhost\" error: unable to find the IP address for the container \"/nhost-selfhost-storage-1\": the server is ignored" providerName=docker container=storage-nhost-selfhost-xxxxxxxxxxxxxxxxxxx

nhost-selfhost-traefik-1    | time="2023-11-28T06:26:38Z" level=error msg="service \"auth-nhost-selfhost\" error: unable to find the IP address for the container \"/nhost-selfhost-auth-1\": the server is ignored" providerName=docker container=auth-nhost-selfhost-xxxxxxxxxxxxxxxxxxxxxxxx

Any guidance on connecting self-host hasura-auth and hasura-storage to Hasura Cloud?

p/s: would love to have nhost adding caching and rate-limiting though, thanks!

dbarrosop commented 7 months ago

Please, don't open issues to ask questions. Feel free to ask in our discord or gh discussions in the nhost/nhost channels.

dbarrosop commented 7 months ago

p/s: would love to have nhost adding caching and rate-limiting though, thanks!

I'd suggest looking at stellate

ammarfaris commented 7 months ago

Please, don't open issues to ask questions. Feel free to ask in our discord or gh discussions in the nhost/nhost channels.

Oh okay, sorry for that 🙏🏼

dbarrosop commented 7 months ago

No worries, no big deal :)

And don't hesitate to join our discord or ask in gh discussions if you want to know more about how to use nhost + stellate. If you really care about caching and performance you are going to get much better performance for a most cost-efficient solution with nhost+stellate.

You have details on how to join here