Postgres docker in droplet resets user password on its own

I’m running 2 web apps and postgres in docker containers inside a digitalocean droplet and every once in a little while postgres docker resets user password but data remains. This makes application fails calling postgres db. I’d have to access ssh and run ALTER USER user_name WITH PASSWORD ‘new_password’; to fix it every time them it’d run fine for a day or two sometimes more.

Here is the log before the error occurs:

Has anyone seen any similar problems or any idea what’s going on?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Oh god, this is exactly what’s happening to me too! I was using a “postgres” and “password” user just for testing though and I thought I received some automated attack that changed multiple times the user pwd.

Hi there @engineersdope,

This is quite interesting, I manage an environment with a few PostgreSQL instances all running in separate Docker containers and I’ve not hit this problem.

Do you use Docker Compose to deploy your containers or any other automated way?

Also, do you see anything strange in the logs of your PostgreSQL containers?

Regards, Bobby