ClusterHQ / dvol

Version control for your development databases in Docker.
https://clusterhq.com/
Apache License 2.0
249 stars 15 forks source link

Version control for your development databases in Docker

Build Status

dvol lets you commit, reset and branch the containerized databases running on your laptop so you can easily save a particular state and come back to it later.

Installation

Step 1

Install Docker 1.8.0 or later.

Step 2

$ curl -sSL https://get.dvol.io |sh

This will pull the dvol docker image, run the dvol docker volume plugin, and set up a tiny wrapper script in /usr/local/bin/dvol.

Data model

Usage

dvol copies git as closely as possible, but only implements a subset of its commands.

Here are some examples:

You can see all available commands by running dvol --help.

If you want other commands to be implemented, please open an issue or even better a pull request!

Docker integration

Use a dvol volume in Docker by specifying docker run -v demo:/path --volume-driver=dvol. This will create a dvol volume called demo.

If a dvol volume doesn't exist when it is referenced, it is created on-demand.

Compose integration

You can also use dvol with Docker Compose, which makes for an awesome way to spin up reproducible microservices environments on your laptop. With dvol you can set volume_driver: dvol in order to automatically spin up all the dvol volumes for your app described with Docker compose with a single docker-compose up -d.

See this example for a very simple demo.

Demo

dvol clusterhq

Examples

Check out the examples directory.

Just run docker-compose up -d on any one of the docker-compose.yml files there.

Ideas? Feedback? Issues? Bugs?

We really appreciate your ideas, feature request, pulls, and issues/bug reports for dvol, because we believe in building useful and user friendly tools for our communities.

Please raise a ticket or feel free to send us a email at feedback@clusterhq.com.