Support SWARM_MODE

This commit is contained in:
Einar Forselv
2020-03-07 02:55:22 +01:00
parent 0bab85f5cf
commit 61ec487e24
3 changed files with 11 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ class Config:
self.password = os.environ.get('RESTIC_REPOSITORY')
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.swarm_mode = os.environ.get('SWARM_MODE') or False
# Log
self.log_level = os.environ.get('LOG_LEVEL')
@@ -31,3 +32,6 @@ class Config:
if not self.password:
raise ValueError("RESTIC_REPOSITORY env var not set")
config = Config()