danielfsousa / express-rest-boilerplate

⌛️ Express starter for building RESTful APIs
MIT License
2.34k stars 619 forks source link

Mongo Container is not starting on prod #265

Closed dmshkv closed 4 years ago

dmshkv commented 4 years ago

Hey, guys! Actively using the boilerplate, thank you, it is really good!

Locally application starts the MongoDB as service, everything is fine. But on production my image contains only app itself.

So I'm using the next deployment scheme: Build machine:

  1. Build docker image for app
  2. Push to registry. Server:
  3. Pull image
  4. Run container.

But server only runs App container, not mongo. Is there the short way to start app with mongo on prod by the scheme i'm using?

danielfsousa commented 4 years ago

Docker-compose is not meant to be used on production. Sure you can have mongo containers in production, you can take a look at container orchestrators like kubernetes, but It's easier to use a managed mongodb like mongodb atlas or mongolab

Edit: dokku is a good one too