microsoft / ghcrawler

Crawl GitHub APIs and store the discovered orgs, repos, commits, ...
MIT License
373 stars 90 forks source link

docker/{mongo,common-services}.yml missing volumes for persistent services #134

Closed grooverdan closed 6 years ago

grooverdan commented 6 years ago

As far as I can tell the mongodb, redis and rabbitmq docker compose images would benefit from persistent volumes to save a large (re)initialisation time if they are restarted.

Seems easy to add: https://docs.docker.com/compose/compose-file/#volumes

Volumes required:

mongodb: /data/db /data/configdb ref: https://github.com/docker-library/mongo/blob/master/3.6/Dockerfile#L85

redis: /data ref: https://github.com/docker-library/redis/blob/master/4.0/Dockerfile#L70

rabbitmq: /var/lib/rabbitmq ref: https://github.com/docker-library/rabbitmq/blob/master/3.7/debian/Dockerfile#L132

metabase: /var/opt/metabase/ from: metabase/Dockerfile

jeffmcaffer commented 6 years ago

I do recall conversations around using persistent volumes but to not recall the reasoning. @iamwillbar might know. In theory I don't see a problem.

iamwillbar commented 6 years ago

This makes sense, metabase declares a volume but I can't recall why we didn't for the others.