dokku / dokku-graphite

a graphite, grafana, statsd, carbon plugin for dokku
MIT License
56 stars 13 forks source link

feat: support a separate data root for Docker bind mounts #19

Closed josegonzalez closed 6 years ago

josegonzalez commented 6 years ago

This does not fix the :backup subcommand, which uses a temporary directory mounted to /backup.

We run Dokku, and therefore dokku redis, in its own Docker container. In order to make this work we map a path from the host into the container as /var/lib/dokku/services/redis. Unfortunately the path on the host is user-configurable, and generally won't be the same as the path in the container. This means that when we run docker commands (e.g. to spin up Redis containers), the directory used for bind mounts (the -v option) needs to be different.

This commit allows us to do this, but keeps the existing behaviour (the redis root for Docker binds is the same as the redis root for other uses) by default.

Refs https://github.com/dokku/dokku-redis/pull/103