Thanks, I tried with and without the POSTGRES_USER line commented out, still not joy. The documentation says it should default to default when not declared.
Thank you so much, your comment set me in the right direction. Turns out the tutorial I followed which had the data volume empty was the culprit*. So when I actually mapped it to something, it started working.
I'm blaming the tutorial, but it was totally my fault!
Thanks, I tried with and without the POSTGRES_USER line commented out, still not joy. The documentation says it should default to default when not declared.
As others have said, remove the # to uncommit the line.
Commits are a special type of line in many languages that allow us humans to stick info (generally for humans) inside the code that the interpreter skips over. From the machines perspective this block looks like:
environment:
POSTGRES_PASSWORD: HDFnWzVZ5bGI
Note that the entire line is missing.
As a side note. Please change the password as it's been posted to the Internet.
Thanks, I tried with and without the POSTGRES_USER line commented out, still not joy. The documentation says it should default to default when not declared.
As for the password, don't worry I changed it right away.
I assume there is nothing in the database? Delete the file under volumes and relaunch. At a guess your database for initialized without a user and is now just in that state.
Just took a quick look at my config file and I have
POSTGRES_USER: postgres
Note specifically the colon and lack of quotes.
It's also worth noting I'm using postgres:16-bullseye as my image. Something wasn't working right with latest when I was setting it up a few months ago, but I don't think it was the user. Regardless, worth a shot if the previous change doesn't help.