Skip to content

Fix issue with deploy causing shared nginx/postgres container to be re-created

Jürno Ader requested to merge fix-network-connect-issue into master

In some versions of ansible the way we use docker_container module to attach networks to an already existing container causes ansible to re-create the container entirely. As a result it loses connectivity to all the other projects and for nginx it also loses connectivity with the outside world. This effectiviely takes down the server and any other project running there too. We have noticed this happening with ansible-core 2.13 when installed as a system package but not when installed from pypi.

To resolve any potential issues we decided that it is safer to just connect the containers to project nginx and postgres networks via shell instead. This way we also avoid any future changes to the way ansible docker_container module works for networking and are more closer to the real docker behaviour.

Merge request reports