Re:Docker in Production: A retort
by notliketherest on Sunday November 06, 2016 @01:03AM
(#12883619)
Assuming you're also running your db in dockrr, why didn't attaching docker volumes work for you for database persistence ?
Because docker-compose had a very bad habit of destroying and rebuilding the volume-only container, unfortunately! This was of course back when running Docker on macOS was somewhat painful, so mounting the DB data directory directly as a volume into your host would nearly always fail to work successfully due to screwy permissions errors (it's quite a bit better now with Docker for Mac)
So, some dodgy code and a JSON file later, and our team uses the `dup` CLI to run everything with exactly zero hitches thus-far, and we've been using (across it's two incarnations) for... 18 months now?
We had some issues with docker-compose for our use-cases, such as persistent database even when recreating every container from scratch, so I hacked on some stuff that become "dup" [0] (nee. docker-up)
Ps. it's written in Nim, which was a lot of fun!
[0] https://github.com/girvo/dup