lets-chat
lets-chat copied to clipboard
Not able to run on Kubernetes with Mongo URL in settings file
Hi. When I deploy the application by binding Mongo to LCB_DATABASE_URI everything work fine. But when I try to do it via database.uri in /usr/src/app/config/settings.yml file - the value is not picked and application fails as it tries to use default LCB_DATABASE_URI value "mongodb://mongo/letschat".
My settings.yml database: uri: mongodb://db/letschat
Error
MongoError: failed to connect to server [mongo:27017] on first connect
at null.
I don't think it's reading your settings.yml
because it's in the wrong location. Try putting it in /usr/src/app/
Tried it and getting same. Note that according to documentation and docker file it should be in /usr/src/app/config
Ah, I'm very mistaken then. It's been a while I apologize.
@sibartlett originally set up the docker volume so he might be able to help you out here.
BTW, you can see what I did here - https://katacoda.com/aptem/scenarios/kubernetes. As workaround for now I put both env variable and settings file, so it will boot. But if I remove env variable - it fails.