mongo-express-docker
mongo-express-docker copied to clipboard
Doesn't work with docker swarm
mongo-express fails to run when deploying a "multi" stack architecture including mongo services via a docker-compose file to a swarm.
None of our databases are deployed with their ports exposed for security reasons and all services should be able to be located via it's service name as we have no idea beforehand onto which node mongodb will be deployed. We use amazon EFS to store the actual data so rescheduling the mongodb to another instance is easily supported.
However, when setting "mongo" as the server for mongo-express it fails to startup as it never passes the test in the "docker-entrypoint.sh"
i.e. while ! exec 6<>/dev/tcp/$host/$port && [[ $tries -lt $max_tries ]]; do .....
Can you be more specific about what your configuration is, especially for mongo-express
itself? I've used this image quite successfully in Swarm many times via a configuration like the one in https://hub.docker.com/_/mongo#-via-docker-stack-deploy-or-docker-compose (https://github.com/docker-library/docs/blob/cb12e8673949d3026fad15ae2d924791c4df29a4/mongo/stack.yml) and haven't had any issues. :confused:
Closing as we never got more clarification and I've heard from a few people who have successfully run it with swarm.