dokku / dokku-mariadb

a mariadb plugin for dokku
MIT License
75 stars 26 forks source link

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

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