Hi guys,
we have a setup of a plain MongoDB replica set with 3 nodes running in docker containers. I’m adding PBM to make backups of the databases. So far I have 3 images of PBM set up and running. I’m looking for a simple possibility to pass a config.yaml to the PBM to configure a local storage which is already mapped into the container instead of typing “pbm config --file /config/perconaConfig.yaml”. Once done the configuration is stored in the admin db in the pbmConfig collection. But our MongoDB set up is designed to start up empty on first use of the product in a new project.
Long story short: Is there a place to put the config.yaml that PBM container loads it automatically? If not, is there a docker compose way to this such like an environment variable?
Here is the docker compose.yaml of one PBM node of 3:
mongo-backup1:
hostname: mongo-backup1
image: percona/percona-backup-mongodb:1.8.1
depends_on:
- mongo1
volumes:
- “/etc/timezone:/etc/timezone:ro”
- “/etc/localtime:/etc/localtime:ro”
- “./…/mongo-volume/backupConfig:/config”
- “./…/mongo-volume/backup:/data/local_backups”
environment:
PBM_MONGODB_URI: “mongodb://${MONGODB_ROOT_USER}:${MONGODB_ROOT_PASSWORD}@mongo1.${SERVER_NAME}:27017”
Many thanks, regards, Daniel