djaploy 0.2.2__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {djaploy-0.2.2 → djaploy-0.2.4}/PKG-INFO +1 -1
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/config.py +2 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/rclone.py +13 -4
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy.egg-info/PKG-INFO +1 -1
- {djaploy-0.2.2 → djaploy-0.2.4}/pyproject.toml +1 -1
- {djaploy-0.2.2 → djaploy-0.2.4}/LICENSE +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/README.md +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/__init__.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/artifact.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/bin/__init__.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/bin/django_pyinfra.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/certificates.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/deploy.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/management/__init__.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/management/commands/__init__.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/management/commands/configureserver.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/management/commands/deploy.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/management/commands/sync_certs.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/management/commands/update_certs.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/management/commands/verify.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/management/utils.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/__init__.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/base.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/cert_renewal.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/core.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/litestream.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/loader.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/nginx.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/sync_certs.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/systemd.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/modules/tailscale.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/utils.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy/version.py +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy.egg-info/SOURCES.txt +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy.egg-info/dependency_links.txt +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy.egg-info/entry_points.txt +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy.egg-info/requires.txt +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/djaploy.egg-info/top_level.txt +0 -0
- {djaploy-0.2.2 → djaploy-0.2.4}/setup.cfg +0 -0
|
@@ -3,6 +3,7 @@ Rclone module for djaploy - manages rclone-based backups
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
+
import tempfile
|
|
6
7
|
from pathlib import Path
|
|
7
8
|
from typing import Dict, Any, List
|
|
8
9
|
|
|
@@ -100,11 +101,15 @@ shell_type = unix
|
|
|
100
101
|
md5sum_command = none
|
|
101
102
|
sha1sum_command = none"""
|
|
102
103
|
|
|
103
|
-
# Deploy configuration file
|
|
104
|
+
# Deploy configuration file using temp file
|
|
105
|
+
with tempfile.NamedTemporaryFile(mode='w', suffix='.conf', delete=False) as f:
|
|
106
|
+
f.write(rclone_config)
|
|
107
|
+
temp_config_path = f.name
|
|
108
|
+
|
|
104
109
|
files.put(
|
|
105
110
|
name="Create rclone configuration",
|
|
111
|
+
src=temp_config_path,
|
|
106
112
|
dest=f"/home/{app_user}/.config/rclone/rclone.conf",
|
|
107
|
-
content=rclone_config,
|
|
108
113
|
user=app_user,
|
|
109
114
|
group=app_user,
|
|
110
115
|
mode="600",
|
|
@@ -146,11 +151,15 @@ sha1sum_command = none"""
|
|
|
146
151
|
databases=databases
|
|
147
152
|
)
|
|
148
153
|
|
|
149
|
-
# Deploy backup script
|
|
154
|
+
# Deploy backup script using temp file
|
|
155
|
+
with tempfile.NamedTemporaryFile(mode='w', suffix='.sh', delete=False) as f:
|
|
156
|
+
f.write(backup_script)
|
|
157
|
+
temp_script_path = f.name
|
|
158
|
+
|
|
150
159
|
files.put(
|
|
151
160
|
name="Create backup script",
|
|
161
|
+
src=temp_script_path,
|
|
152
162
|
dest=f"/home/{app_user}/backup.sh",
|
|
153
|
-
content=backup_script,
|
|
154
163
|
user=app_user,
|
|
155
164
|
group=app_user,
|
|
156
165
|
mode="755",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|