Can't connect from bakend to db by default setting

Please fill in the questionnaire below.

Technical Help Questionnaire

Have you read and followed the instructions at:

Answer: I have read

Self-Hosted Installation and Setup Questions

Delete this section if you are using Baserow.io.

How have you self-hosted Baserow.

by Baserow GitHub Guide

What are the specs of the service or server you are using to host Baserow.

Mac Book M1/ memory:16GB / CPU:10cores
Baserow is running on Docker.

Which version of Baserow are you using.

local server can’t move. so can’t confirm version… sorrry…

How have you configured your self-hosted installation?

By using ./dev.sh only.
so, I think no change any files.

What commands if any did you use to start your Baserow server?

./dev.sh

Describe the problem

when I do ./dev.sh , baserow-backend say Error: Failed to connect to the postgresql database at localhost without the postgresql database local ...
So, I can’t see local baserow pages.

Describe, step by step, how to reproduce the error or problem you are encountering.

  1. set up Dev Environments along Baserow GitHub page
$ git clone https://gitlab.com/baserow/baserow.git
$ cd baserow
$ ./dev.sh --build

Provide screenshots or include share links showing:

How many rows in total do you have in your Baserow tables?

No tables

Please attach full logs from all of Baserow’s services

  • backend
2024-02-27 00:40:28 Waiting for PostgreSQL to become available attempt  4/5 ...
2024-02-27 00:40:30 Error: Failed to connect to the postgresql database at localhost
2024-02-27 00:40:30 Please see the error below for more details:
2024-02-27 00:40:30 could not connect to server: Connection refused
2024-02-27 00:40:30     Is the server running on host "localhost" (127.0.0.1) and accepting
2024-02-27 00:40:30     TCP/IP connections on port 5432?
2024-02-27 00:40:30 could not connect to server: Cannot assign requested address
2024-02-27 00:40:30     Is the server running on host "localhost" (::1) and accepting
2024-02-27 00:40:30     TCP/IP connections on port 5432?
2024-02-27 00:40:30 
2024-02-27 00:40:30 Trying again without any DATABASE_OPTIONS:
2024-02-27 00:40:30 Error: Failed to connect to the postgresql database at localhost without the 
2024-02-27 00:40:30 Please see the error below for more details:
2024-02-27 00:40:30 could not connect to server: Connection refused
2024-02-27 00:40:30     Is the server running on host "localhost" (127.0.0.1) and accepting
2024-02-27 00:40:30     TCP/IP connections on port 5432?
  • db
2024-02-27 00:29:08 2024-02-26 15:29:08.731 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-02-27 00:29:08 2024-02-26 15:29:08.731 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-02-27 00:29:08 2024-02-26 15:29:08.735 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-02-27 00:29:08 2024-02-26 15:29:08.791 UTC [26] LOG:  database system was shut down at 2024-02-26 15:20:42 UTC
2024-02-27 00:29:08 2024-02-26 15:29:08.813 UTC [1] LOG:  database system is ready to accept connections

Hi, I noticed that you’re using the dev.sh, which spins up the Baserow dev environment. This environment is used for contributing and making changes to Baserow. If you just want to self-host Baserow locally, you should not use this environment.

That being said, it looks like your backend is trying to connect to the PostgreSQL running on localhost, while this is actually running in the db container. Do you have any additional environment variables set, or introduced changes to any of the Docker files?