Deploying GitLab 11.7.3-CE in Docker Swarm with Docker secrets for external PostgreSQL using password in gitlab.rb

Hello Dear community.
I am trying to Deploy GitLab (CE 11.7.3) in a Docker swarm using the following procedure. I followed all the steps in that section and I am facing a problem when using:

gitlab%20rb%20DB%20config

ERROR – : FATAL: password authentication failed for user “gitlab”

When writing the value of the secret in plain-text in gitlab.rb file (which convert to omnibus_config.rb at the root of the container ) it perfectly connects to the external PostgreSQL database. So yes the value in the secret is good.
I verified the Docker Secrets and the secret is existing and its value is perfectly set in the container (the same as the plain-text used).

From my understanding, the problem seems at the File.read() command in gitlab.rb file which does not seem to execute correctly when starting GitLab.

Did anyone face the same problem and how did you fix it?

Thank you

1 Like

Same for me. Did you find an solution without revealing the passwords in the omnibus_config.rb?

Probably a wrong line ending. this fixed it for me:
gitlab_rails['db_password'] = File.read('/run/secrets/gitlab_db_password').strip

1 Like