mongo-express-docker
mongo-express-docker copied to clipboard
[Bug] Docker entrypoint breaks possibility to use linux socket
Hello,
First thanks for providing this great software !
We wanted to link mogo-express to mongodb by unix socket (as our mongodb is open via socket only for performance and security reason), but when we set ME_CONFIG_MONGODB_URL
as a socket connection (ie: mongodb:///tmp/mongodb-27017.sock
) in docker log the message ... retrying to connect ...
keeps reapeating.
(we tried with mongodb://%2Ftmp%2Fmongodb-27017.sock
too).
After diging into the entrypoint it seems it cannot work at all with linux socket as it check for tcp connection, please see: https://github.com/mongo-express/mongo-express-docker/blob/master/docker-entrypoint.sh#L14
The native mongo-express seems to be able to works with socket, but this docker entrypoint limitation seems to defeat all socket use as it check only and wait for tcp connection.
Purpose of this issue is to change the entry point to check for socket connexion too.
Thanks.
Hi @Yivan, would you be able to check if you problem may relate to this? https://github.com/mongo-express/mongo-express-docker/issues/52
@taboca Hi thanks for comming back on this issue.
No it isn't linked. Problème on this issue is not a max try problem as this is socket connection on the same computer (and no other service use mongo db) so ti is not overload at all and is totaly available for connection.
Problem is the protocol is hardcoded as tcp please see: https://github.com/mongo-express/mongo-express-docker/blob/master/docker-entrypoint.sh#L14 , on in my case I would like to use unix filesocket (mongodb:///tmp/mongodb-27017.sock
). So this is the first condition exec 6<>/dev/tcp/$host/$port
which is the problem in my case.
Thanks!
Hello, no news on this one ? Like Said in my previous comment problem seems to come from https://github.com/mongo-express/mongo-express-docker/blob/master/docker-entrypoint.sh#L14