skip to Main Content

Can’t figure out what is the correct postgres url when hosting with Coolify. Everything is up and running. I have only changed the service name to db and kong domain to https://mywebsite.com:8000

Coolify is hosted on ubuntu vps_1 and through Coolify I deployed Supabase on ubuntu vps_2

What’s the correct postgres url?

npx supabase db push --db-url "postgres://user:[email protected]:5432/postgres"

docker-compose.yml

.env.example

My environment variables:

POSTGRES_DB=postgres
POSTGRES_HOST=supabase-db
POSTGRES_PORT=5432
SERVICE_PASSWORD_POSTGRES=***

2

Answers


  1. your url is correct
    npx supabase db push –db-url "postgres://user:[email protected]:5432/postgres"
    but you need to add port mapping in the compose file under the supabase-db image
    like

    ports:
         - '5432:5050'
         - '9001:9001'
    

    this worked for me

    thought the port is soppose to map to database port to 5050
    it did not but worked in the default port 5432.so do this exactly and use the same url with port 5432

    Login or Signup to reply.
  2. Edit the docker-compose file using the button: Edit Docker Compose

    the button is located beside Service Stack

    In the supabase-db section add the mapping:

    ports:
      - '5433:5432'
    

    This will expose the 5433
    Example of JDBC connection:

    jdbc:postgresql://user:pass@<your_ip>:5433/postgres
    

    Remember to enable the 5433 port in your firewall if you have one.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search