docker-duplicity
docker-duplicity copied to clipboard
Feature request: Servicing multiple postgres instances
For files, I like that I can use this image and have different services just volume mount to the source directory. Example:
# someservice.yaml
services:
someservice:
volumes:
../data/someservice/config:/config
# i can just add these lines here to have them backed up
backup:
volumes:
- ../data/someservice/config:/mnt/backup/src/someservice/config:ro
This means I only need one docker-duplicity image, and people can choose what services they want to be backed up with just a few lines.
I am trying to have the same setup for postgres, but its a bit more complex.
Since each service may have its own postgres instance, I wonder what I can do that is similar? If compose secrets supported renaming (they don't, but I am using here to illustrate my ultimate goal), I would have something like:
# same as above, but adding
backup:
environment:
- SOMESERVICE_PGHOST=someservice
- SOMESERVICE_PGUSER=someservice_pguser
- SOMESERVICE_PGDB=someservice_pgdb
secrets:
- SOMESERVICE_PGPASS:PGPASS
I hope this makes some sense and we can start a discussion / show an example of how to do that kind of pattern