mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-28 06:35:24 +00:00
Support SWARM_MODE
This commit is contained in:
@@ -188,6 +188,11 @@ connecting to the Docker host. Combined with ``DOCKER_TLS_VERIFY``
|
|||||||
this can be used to talk to docker through TLS in cases
|
this can be used to talk to docker through TLS in cases
|
||||||
were we cannot map in the docker socket.
|
were we cannot map in the docker socket.
|
||||||
|
|
||||||
|
SWARM_MODE
|
||||||
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
If defined containers in swarm stacks are also evaluated.
|
||||||
|
|
||||||
Compose Labels
|
Compose Labels
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
@@ -4,6 +4,8 @@
|
|||||||
# DOCKER_TLS_VERIFY=1
|
# DOCKER_TLS_VERIFY=1
|
||||||
# DOCKER_CERT_PATH=''
|
# DOCKER_CERT_PATH=''
|
||||||
|
|
||||||
|
SWARM_MODE=true
|
||||||
|
|
||||||
RESTIC_REPOSITORY=/restic_data
|
RESTIC_REPOSITORY=/restic_data
|
||||||
RESTIC_PASSWORD=password
|
RESTIC_PASSWORD=password
|
||||||
|
|
||||||
|
@@ -12,6 +12,7 @@ class Config:
|
|||||||
self.password = os.environ.get('RESTIC_REPOSITORY')
|
self.password = os.environ.get('RESTIC_REPOSITORY')
|
||||||
self.cron_schedule = os.environ.get('CRON_SCHEDULE') or self.default_crontab_schedule
|
self.cron_schedule = os.environ.get('CRON_SCHEDULE') or self.default_crontab_schedule
|
||||||
self.cron_command = os.environ.get('CRON_COMMAND') or self.default_backup_command
|
self.cron_command = os.environ.get('CRON_COMMAND') or self.default_backup_command
|
||||||
|
self.swarm_mode = os.environ.get('SWARM_MODE') or False
|
||||||
|
|
||||||
# Log
|
# Log
|
||||||
self.log_level = os.environ.get('LOG_LEVEL')
|
self.log_level = os.environ.get('LOG_LEVEL')
|
||||||
@@ -31,3 +32,6 @@ class Config:
|
|||||||
|
|
||||||
if not self.password:
|
if not self.password:
|
||||||
raise ValueError("RESTIC_REPOSITORY env var not set")
|
raise ValueError("RESTIC_REPOSITORY env var not set")
|
||||||
|
|
||||||
|
|
||||||
|
config = Config()
|
||||||
|
Reference in New Issue
Block a user