Skip to content

chore: Add dockerfile and docker-compose #50

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

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Conversation

swederik
Copy link
Member

@swederik swederik commented Jun 16, 2020

Similar to the dockerization branch and the PR here: #20

This adds:

  • Dockerfile for standalone usage using PouchDB in a single container (USE_POUCHDB=true)
  • docker-compose for two-container usage using CouchDB as a separate container

The dockerfile runs them using supervisord, and will conditionally start PouchDB if the flag is set. If you want to use PouchDB you should expose port 5984 as well.

Both of them seem to work fine for me, though we may need to add some startup script to create _users, _replications, etc... for normal CouchDB setups.

TODO:

  • Is this the right docker name? What are we using right now?
  • Make the CI workflow build and push new versions to Docker on merge, or optionally per PR

@swederik swederik requested a review from emelalkim June 16, 2020 08:58
Copy link
Contributor

@emelalkim emelalkim left a comment

Choose a reason for hiding this comment

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

Hi Erik,
It seems fine, I especially like the pouchdb addition.
I don't know much about supervisord, so I cannot really comment on that
But I have some security concerns. For security reasons it is not recommended for containers to run with sudo user, we are using node user for epad distribution (here is a link to dicomweb-server Dockerfile we use). and you are giving 777 mod to the scripts, is that required?
Finally, you don't have to use server-config.js, you can pass everything with environment variables defined in development.js, please use those instead for integrity

@emelalkim
Copy link
Contributor

Hi Erik, any update or comment on the recommended changes?

@swederik
Copy link
Member Author

swederik commented Aug 26, 2020

Yep I made the changes now, you can re-review and merge I think and I'll get around to adding the auto-push to dockerhub via CircleCI later

@emelalkim emelalkim merged commit 6d3790e into master Oct 7, 2020
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.

2 participants