supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.07k stars 209 forks source link

Deno.env.get('SUPABASE_URL') -> 'http://kong:8000' #2732

Closed k-nearest-neighbor closed 1 month ago

k-nearest-neighbor commented 1 month ago

When using supabase start or supabase functions serve the SUPABASE_URL env var inside the function which as far as I can tell is managed only by supabase is set to 'http://kong:8000'

(Maybe this is intended? I realize kong is supposed to be a gateway -- but when supabase start is running, kong is not resolving)

To Reproduce Steps to reproduce the behavior:

  1. supabase start or supabase functions serve
  2. Inside function index.ts console.log('suabaseUrl: ' + Deno.env.get('SUPABASE_URL'))

[Info] supabaseUrl: http://kong:8000

Expected behavior I believe this should be the api url? Like http://127.0.0.1:54321

System information

k-nearest-neighbor commented 1 month ago

I guess that is what it is supposed to be. 'kong' I guess is a hostname that resolves inside the containers. The documentation isn't super clear that you should expect SUPABASE_URL to be set to this when running locally