mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
Note for accessing services across docker containers
I spent a few hours today trying to work out why I couldn't connect to my local Supabase DB from a local Supabase function. It dawned on me that the `SUPABASE_DB_URL` included the `localhost` string, which would attempt to connect to the DB on the same container as the functions are hosted. Swapping out `localhost` for `host.docker.internal` fixed the issue. Thought it would be worth documenting. Happy to amend or move to a more appropriate place if needs be.
This commit is contained in:
1 parent
91183b712c
commit
ab794c0857
1 file changed
+4
@@ -107,6 +107,10 @@ http://localhost:54321/auth/v1/ # Auth (GoTrue)
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
:::note
|
||||
If you are looking to access, for example, your database from an edge function within your local Supabase setup, you will need to replace `localhost` with `host.docker.internal` in any URLs.
|
||||
:::
|
||||
|
||||
## Database migrations
|
||||
|
||||
Database changes are managed through "migrations." Database migrations are a common way of tracking changes to your database over time.
|
||||
|
||||
Reference in new issue
Block a user