Cannot reach Postgres Flexible Server from Web App

I have a Django app to deploy with a pipeline in azure DevOps and deploy To Azure cloud resources.
The Django database is a Postgres Flexible Server in the same resource group.
Also I have a virtual network resource in the Group.
The pipeline install dependencies and then exec the tests from a command in a Makefile.
Pipeline step

Makefile

In the tests step the Django app cannot reach the Database server, the name doesn’t resolve to an IP, I try with the server Ip and get the same error.

Django error

I didn’t set any firewall rule neither private endpoints

  • Have you run the same commands on your local machine to deploy your app? If not, please try it. If the deployment locally is successful, the issue may be related to Azure pipeline. Set up a self-hosted agent on your local machine and deploy again. If it failed locally, check further on your app and scripts.

    – 

Leave a Comment