Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature request: Servicing multiple postgres instances #718

Open
jedahan opened this issue Nov 2, 2023 · 0 comments
Open

Feature request: Servicing multiple postgres instances #718

jedahan opened this issue Nov 2, 2023 · 0 comments

Comments

@jedahan
Copy link

jedahan commented Nov 2, 2023

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant