diff --git a/backend/main.go b/backend/main.go index 4bbeb6e..f96b0fd 100644 --- a/backend/main.go +++ b/backend/main.go @@ -42,14 +42,16 @@ func main() { port := os.Getenv("BACKEND_DOCKER_PORT") hostname := os.Getenv("DATABASE_HOSTNAME") + postgres_port := os.Getenv("POSTGRES_DOCKER_PORT") if environ == "DEV" { port = os.Getenv("BACKEND_PORT") hostname = "localhost" + postgres_port = os.Getenv("POSTGRES_PORT") } dsn := core.DSN{ Hostname: hostname, - Port: os.Getenv("POSTGRES_PORT"), + Port: postgres_port, DBName: os.Getenv("POSTGRES_DB"), User: os.Getenv("POSTGRES_USER"), Password: os.Getenv("POSTGRES_PASSWORD"),