backup process container should belong to the current project

This commit is contained in:
Einar Forselv 2019-04-18 05:08:35 +02:00
parent 820a78a10f
commit e553125854
1 changed files with 10 additions and 8 deletions

View File

@ -23,13 +23,6 @@ def main():
start_backup_process(config, containers)
def start_backup_process(config, containers):
"""Start the backup process container"""
print("start-backup-process")
import os
print(os.environ)
def status(config, containers):
"""Outputs the backup config for the compse setup"""
print()
@ -61,10 +54,19 @@ def backup(config, containers):
command='restic-volume-backup start-backup-process',
volumes=containers.this_container.volumes,
enviroment=containers.this_container.environment,
labels={"restic-volume-backup.backup_process": 'True'},
labels={
"restic-volume-backup.backup_process": 'True',
"com.docker.compose.project": containers.this_container.project_name,
},
)
def start_backup_process(config, containers):
"""Start the backup process container"""
print("start-backup-process")
status(config, containers)
def parse_args():
parser = argparse.ArgumentParser(prog='restic_volume_backup')
parser.add_argument(