supabase / realtime

Broadcast, Presence, and Postgres Changes via WebSockets
https://supabase.com/realtime
Apache License 2.0
6.83k stars 315 forks source link

allow default self-hosted tenant name to be configurable via ENV #1222

Open sbeardsley opened 1 week ago

sbeardsley commented 1 week ago

What kind of change does this PR introduce?

self-hosted seed update to allow tenant_name to be configurable via environment variable.

What is the current behavior?

The current behavior requires the container name to be "realtime-dev". If it isn't then it will not match the default tenant. In cases where the container name will be different (i.e. kubernetes deployments) it is impossible to use default tenant.

What is the new behavior?

The new behavior allows to configure the default tenant_name via an environment variable named TENANT_NAME with fallback behavior to the original "realtime-dev".

Additional context

This was an issue for the supabase-kubernetes project. I have submitted a PR there as well to overwrite the seeds.exs file in https://github.com/supabase-community/supabase-kubernetes/pull/91

Ultimately it would be better to have this be configuration change upstream in this repo.

vercel[bot] commented 1 week ago

@sbeardsley is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.