Gitlab swarm external postgresql

I use gitlab as a container with swarm.
Having already started postgres as a separate container, I predicted not to use that of the docker image.
At the first start everything is ok. Tables created correctly.
Every time I restart the gitlab container, I get the following error:

Checking for an omnibus managed postgresql: Checking for an omnibus managed postgresql:
Not currently installed postgresql in the omnibus instance found

and the container goes into failed and exits.
“task: non-zero exit (137): dockerexec: unhealthy container”
Below the gitlab configuration part.

postgresql[‘enable’] = false
gitlab_rails[‘db_username’] = “gitlab”
gitlab_rails[‘db_password’] = “”
gitlab_rails[‘db_host’] = “postgres”
gitlab_rails[‘db_database’] = “gitlabdb”
gitlab_rails[‘db_adapter’] = ‘postgresql’
gitlab_rails[‘db_encoding’] = ‘utf8’

What can I do?

Thank you