How to deploy docker file on other server How to deploy docker file on other server docker docker

How to deploy docker file on other server


It seems like you dont have a mongoDB running. Do you have a local Mongo installation or is it containerized too?

If yes, make sure that a Mongo instance is also running on your server.


In server.js you have:

mongoose.connect("mongodb://localhost/product_quantities"); 

In your config.js you're exporting the prod and dev urls for the mongodb connection string but doesn't seem like you use that anywhere in your code so you are always loading the localhost connection string.

In your code you need to use the values from the config.js and in the dockerfile, set the environment value for MONGODB_ADDRESS