datatogether / coverage

Project for visualizing the status of digital data archiving efforts across various data repositories
http://api.archivers.co/coverage
GNU Affero General Public License v3.0
2 stars 3 forks source link

Reworked Dockerfile for flexibility #22

Closed ibnesayeed closed 7 years ago

ibnesayeed commented 7 years ago

This reworked Dockerfile is intended to keep the current behavior unchanged while bringing a lot of additional advantages. It has also fixed some issues that were present erlier.

patcon commented 7 years ago

ah cool! i was actually stepping on your toes today, as i was working on dev docs and noticed some really low-hanging issues with the dockerfile -- any chance you might be able to give it a quick look-over? :) https://github.com/datatogether/coverage/pull/23/files

our convo in slack was that gin wasn't necessary, but curious your thoughts on that -- if you have experience with it being very helpful, maybe we could link to a good setup resource on why/how people can use it?

ibnesayeed commented 7 years ago

I have seen #23 already. You can either revert 32863ceb1224fda4feaa1c421f51a816ae33007b in your PR or resolve the conflict later when merging this one.

As far as gin is concerned, this Dockerfile will not include that in the final build for production (in fact the final build has nothing but the ca-certs and the static coverage binary in the very minimal Alpine Linux). However, in the development mode it will be present and run by default, but the command can be overwritten to run the coverage binary instead. I have never used gin, but it was commented in the Dockerfile, so I looked at its documentation and realized that it can be helpful as it allows hot-reloading. That's why I added it in a way that it can be used optionally.

Corresponding documentation can be updated once these things are in place. I did not add anything in the docs yet because I though someone might be working on that, so it would cause unnecessary conflict.