Closed jchue closed 3 years ago
I'm gonna venture a guess that your password file contains a trailing newline
@aptalca Thanks for the quick response. No, I don't think so.
I'm also able to authenticate via Adminer.
That shows a trailing newline. You want the next line starting with root
on the same line as the password with no break.
Follow the instructions on the docker docs for creating docker secrets.
Ah, you're right. Sorry about that, and thanks.
printf "password" > postgres_password.secret
works.
Expected Behavior
Should be able to prepend
FILE__
to an environment variable to derive it from a file (i.e., for Docker secrets). The container should pick up the contents and set the environment variable at runtime. I am currently using this for the Postgres password.Current Behavior
Authentication with Postgres fails during initial migration steps and Netbox fails to start up.
/run/secrets/postgres_password
file (and verified its contents) within the container.Steps to Reproduce
docker-compose.yml
file with secrets attached to both the Netbox and the Postgres containers.docker-compose up
.Environment
OS: Ubuntu 20.04.2 LTS CPU architecture: x86_64 How docker service was installed: Official Docker repo -
sudo apt-get install docker-ce docker-ce-cli containerd.io
- Steps hereCommand used to create docker container (run/create/compose/screenshot)
Docker logs