Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: multiple supabase instances(postgres) public port creates connection issues and mixing up logs #5362

Open
shsunmoonlee opened this issue Mar 17, 2025 · 1 comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@shsunmoonlee
Copy link

Error Message and Logs

Even when you don't put in coolify network the following issue occurs. If you deploy multiple supabase instances with default setting, and make them all publicly available on different ports, there will be connection issues and one supabase db monitor is displaying another supabase db's logs.

Q1. what's the best practice? change the DB URL in docker compose of supabase whgen you create?
DB_URL=postgresql://postgres:[password]@[IP]:[PORT]/postgres

Does this approach work? I thought supabase-db-[uuid] is automatically added, so this is not necessary right?

services:
  # Old:
  # supabase-db:
  #   image: supabase/postgres:...
  
  # New: rename the service
  supabase-db-[YOUR_APP_NAME]:
    image: supabase/postgres:15.6.1.146
    # ...

DB_URL=postgresql://postgres:${SERVICE_PASSWORD_POSTGRES}@${SERVICE_FQDN_SUPABASEDB}:5432/postgres
DB_URL=postgresql://postgres:${SERVICE_PASSWORD_POSTGRES}@supabase-db:5432/postgres

Q2. how do you achieve custom domain without having to use cloudflare tunnels without having to make port public?
before
DB_URL=postgresql://postgres:[password]@[IP]:[PORT]/postgres

after
DB_URL=postgresql://postgres:[password]@supabase.[your_domain]/postgres
supabase.[your_domain] usually points to dashboard.
so perhaps it should be postgres.[your_domain].

@djsisson @andrasbacsai This could be a great feature as common use cases like generating types requires running command directly against pg_url

Steps to Reproduce

Even when you don't put in coolify network the following issue occurs. If you deploy multiple supabase instances with default setting, and make them all publicly available on different ports, there will be connection issues and one supabase db monitor is displaying another supabase db's logs.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.389

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 22.04

Additional Information

No response

@shsunmoonlee shsunmoonlee added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Mar 17, 2025
@shsunmoonlee shsunmoonlee changed the title [Bug]: [Bug]: multiple supabase instances public port creates connection issues and mixing up logs Mar 17, 2025
@shsunmoonlee shsunmoonlee changed the title [Bug]: multiple supabase instances public port creates connection issues and mixing up logs [Bug]: multiple supabase instances(postgres) public port creates connection issues and mixing up logs Mar 17, 2025
@djsisson
Copy link
Contributor

@shsunmoonlee see my answer in the other post

#5160 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

2 participants