Not able to connect to MongoDB from Countly Docker image
I pulled countly server docker image and i ran that.
It is working perfectly. But when I am changing the config.js file /opt/countly/frontend/express in this path with the separate mongodb server details it is throwing 502 error.
May I know why i am getting this error.
And what is the correct step to just run the countly-server docker image but not with the localhost mongodb serve but with a different mongodb server details. That is installed on a different server
Comments
Hi Prasanjit!
Thank you for reaching out to us, and we apologize for the delayed response!
So, ideally in docker setup we don't make any changes inside the container, instead, we do it via environment section. For reference, please see our Guide here: https://support.count.ly/hc/en-us/articles/360037814511-Docker-and-Kubernetes
We have docker-compose file which has an environment section you can use:
https://raw.githubusercontent.com/Countly/countly-server/master/docker-compose.yml
You can connect to any of the MongoDB by just passing the connection string in this variable:
COUNTLY_CONFIG__MONGODB=<mongodb_connection_string>
We hope this helps!
Please feel free to let us know if you have any further questions.
We wish you a great day!
Best Regards,
Gia
Please sign in to leave a comment.