I am unable to run docker image dpage/pgadmin4 on azure web app (Linux) which is available on docker hub.

I have installed Docker in my Linux machine and was able to run that docker image locally. Then I created Web app in Azure with options as given below:

  • OS: Linux
  • Publish: Docker Image
  • App service plan: Linux app service

After creating web app, I added two env variables in App Settings section:

PGADMIN_DEFAULT_EMAIL : [email protected]
PGADMIN_DEFAULT_PASSWORD : SuperSecret

Finally login screen is visible but when I enter above credentials, it doesn't work and keeps redirecting to login page.

Update: If login is working properly, screen appears as shown below. !(pgadmin initial screen)

1 Answers

0
Charles Xu On

For your issue, I do the test and find that it's really a strange thing. When I deploy the docker image dpage/pgadmin4 in Azure service Web App for Container through Azure CLI and set the app settings, there is no problem to log in with the user and password. But when I deploy it through the Azure portal, then I meet the same thing with you.

Not sure what is the reason, but the solution is that set the environment variables PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD through the Azure CLI like below:

az webapp config appsettings set --resource-group <resource-group-name> --name <app-name> --settings PGADMIN_DEFAULT_EMAIL="[email protected]" PGADMIN_DEFAULT_PASSWORD="SuperSecret"

If you really want to know the reason, then you can make feedback to Microsoft. Maybe it's a bug or some special settings.

Update

The screenshot of the test on my side here:

enter image description here