Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch application base to alpine, remove expose of database port, re… #53

Merged
merged 2 commits into from
Jun 3, 2018

Conversation

Danpiel
Copy link

@Danpiel Danpiel commented Jun 3, 2018

Hello @synzen, made couple fixes to the setup, here is the list

  • Added restart policies to both containers, the endless restart loop due to some error in configuration can drain Discord API limits and result bot ban, limiting to 5 restarts for mongodb and 10 restarts for application
  • Removed ports which bind port to host, and added expose of mongodb port to linked application, so database is accessible only from application. To make a direct access to mongodb can add
ports:
- random_host_port:27017

and use your preferred port without application and database reconfiguration

  • Explicit set of version and images from mongodb and node, also node is set to alpine, which uses less space
  • Removed - (dash) in service definition, this can cause issues between docker-compose versions, due to different name handling

Copy link
Owner

@synzen synzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent to have input from somewhere to has had more than 1 day of experience with Docker! Works perfectly, but only after I put change

expose: 27017

to

expose:
  - 27017

I'm assuming you forgot to give it a new line?

@synzen synzen merged commit 7285686 into synzen:dev Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants