Browse Source

Add storage box env file

jherve 1 tháng trước cách đây
mục cha
commit
6d61ba8cde
1 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 7 2
      start.py

+ 7 - 2
start.py

@@ -24,6 +24,7 @@ def main():
     ssh_auth_sock = os.getenv("SSH_AUTH_SOCK")
     config_path = Path.cwd() / "data" / "borgmatic.d"
     credentials_path = Path.cwd() / "data" / "credentials"
+    storage_box_env = credentials_path / "storage_box_env"
     ssh_config_path = Path.home() / ".ssh"
     volumes = [
         f"{config_path}:/etc/borgmatic.d/",
@@ -56,10 +57,14 @@ def main():
         "--detach",
         "--name",
         container_name,
-        "-e SSH_AUTH_SOCK",
-        "-e TZ=Europe/Paris",
+        "-e",
+        "SSH_AUTH_SOCK",
+        "-e",
+        "TZ=Europe/Paris",
         "-e",
         f"SSH_KEY_NAME={ssh_key_name}",
+        "--env-file",
+        storage_box_env,
         "--security-opt=label=disable"
     ] + volume_args + [image_name]
     print(args)