Not able to run Go project using run.sh on Mac, with PostgreSQL running on Docker

I recently started working on a Go project which was using PostgreSQL on Docker. Everytime running the project using “run.sh” gave me the following error.enter image description here

Here is the code on my run.sh file

   #!/bin/bash

export PORT=3070
export PUBLIC_URL=http://localhost:3540
#export FRONT_TOKEN_CATCH=http://m.com:8080/_tokenCatch/
export SECRET=secret
export DEBUG=true
export SKIP_ROLE_ON_ADMIN=true
export AUTO_MIGRATIONS=true
export MARKETDATA_SYNC=true
#export STOCKS_SEED_DIR=./models/stocks/seeds/

export DB_PG=postgres://postgres:[email protected]:5531/postgres?sslmode=disable

gin --appPort 3540 --port 3507 -i -x .git -x .postgress_data -x vendor --build ./cmd/server/ run

Source: StackOverflow