From 15c91d59702f5013f76ba69ed78839a27429a378 Mon Sep 17 00:00:00 2001
From: Einar Forselv <eforselv@gmail.com>
Date: Thu, 18 Apr 2019 04:44:10 +0200
Subject: [PATCH] Pass env vars and volumes from the backup container to the
 backup process container

---
 restic_volume_backup/cli.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/restic_volume_backup/cli.py b/restic_volume_backup/cli.py
index 9283307..b77c97b 100644
--- a/restic_volume_backup/cli.py
+++ b/restic_volume_backup/cli.py
@@ -34,20 +34,20 @@ def main():
         # TODO: Errors when repo already exists
         restic.init_repo(config.repository)
 
-        print(containers.this_container.environment)
-
         print("Starting backup container..")
         backup_runner.run(
             image=containers.this_container.image,
             command='restic-volume-backup start-backup-process',
-            volumes={},
-            enviroment={},
+            volumes=containers.this_container.volumes,
+            enviroment=containers.this_container.environment,
             labels={"restic-volume-backup.backup_process": 'True'},
         )
 
     # Separate command to avoid spawning infinite containers :)
     elif args.action == 'start-backup-process':
         print("start-backup-process")
+        import os
+        print(os.environ)
 
 
 def parse_args():