medusa
medusa copied to clipboard
Docs: in /create-medusa-app - Supabase IPv4 connection deprecated
Preliminary Checks
- [X] This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/medusajs/medusa/issues
Issue Summary
It looks like a connection to Supabase with direct DB access via IPv4 and pgBouncer doesn't work anymore (since January 26th 2024): https://github.com/orgs/supabase/discussions/17817
I tried to install Medusa following this guide: https://docs.medusajs.com/create-medusa-app#step-1-run-create-medusa-app
But the command from the Medusa example doesn't work anymore:
npx create-medusa-app@latest --db-url postgresql://postgres:<password>@<host>.supabase.co:5432/postgres
The new URI format is:
postgres://postgres.<host>:<password>@aws-0-eu-central-1.pooler.supabase.com:5432/postgres
But it didn't work when I tried it like this:
npx create-medusa-app@latest --db-url postgres://postgres.<host>:<password>@aws-0-eu-central-1.pooler.supabase.com:5432/postgres
I tried some other formats but neither works. I've tested the connection with other DB tools and all works.
Any ideas?
How can this issue be resolved?
- Probably this command should be supported:
npx create-medusa-app@latest --db-url postgres://postgres.<host>:<password>@aws-0-eu-central-1.pooler.supabase.com:5432/postgres
...
Are you interested in working on this issue?
- [ ] I would like to fix this issue
I would like to work on this issue.
I would like to work on this issue.
Any updates? it's very anticipated fix for me personally
Hey guys, will take some time to look at this maybe early next week. Thank you for your patience!
Hey guys @salaxieb @shahednasser
It works if .env is configured with connection string URI found in supabase dashboard as follows
DATABASE_URL="postgres://[USERNAME]:[YOUR-PASSWORD]@aws-0-ap-south-1.pooler.supabase.com:5432/postgres
Hey guys, just an update: while investigating this it seems like it's an inconsistent problem, maybe due to connection errors or something else. On one run I faced errors, but all other runs I was able to finish it successfully.
As the create-medusa-app
command isn't focused on supabase, we can't go too deep on looking for a consistent fix. So, for now I'll update the docs with the new URL format, but no further actions will be taken on the command itself.
For those facing errors, they can run the setup with the --skip-db
option, then change the DB URL after the setup and re-run migrations.
EDIT: Also just wanna point out that the database URL must be wrapped with double quotes. Will include this in the docs as well
Thank you Shahed for your reply! 🙌
Le mar. 9 avr. 2024 à 15:33, Shahed Nasser @.***> a écrit :
Hey guys, just an update: while investigating this it seems like it's an inconsistent problem, maybe due to connection errors or something else. On one run I faced errors, but all other runs I was able to finish it successfully.
As the create-medusa-app command isn't focused on supabase, we can't go too deep on looking for a consistent fix. So, for now I'll update the docs with the new URL format, but no further actions will be taken on the command itself.
For those facing errors, they can run the setup with the --skip-db option, then change the DB URL after the setup and re-run migrations.
— Reply to this email directly, view it on GitHub https://github.com/medusajs/medusa/issues/6535#issuecomment-2045191370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZOTEWHXSF2CTF5WAUXEHZLY4PUZRAVCNFSM6AAAAABD6DS5I2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVGE4TCMZXGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>