djaploy 1.2.4__tar.gz → 1.2.5__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-1.2.4 → djaploy-1.2.5}/PKG-INFO +1 -1
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/borg/infra/djaploy_hooks.py +24 -2
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/infra/djaploy_hooks.py +1 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy.egg-info/PKG-INFO +1 -1
- {djaploy-1.2.4 → djaploy-1.2.5}/pyproject.toml +1 -1
- {djaploy-1.2.4 → djaploy-1.2.5}/LICENSE +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/README.md +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/app.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/borg/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/borg/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/janitor/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/janitor/apps.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/janitor/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/janitor/infra/commands/createjanitoruser.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/janitor/infra/djaploy_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/nginx/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/nginx/apps.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/nginx/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/nginx/infra/djaploy_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/rclone/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/rclone/apps.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/rclone/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/rclone/infra/djaploy_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/sync_certs/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/sync_certs/apps.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/sync_certs/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/sync_certs/infra/djaploy_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/systemd/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/systemd/apps.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/systemd/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/systemd/infra/djaploy_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/tailscale/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/tailscale/apps.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/tailscale/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/tailscale/infra/djaploy_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/versioning/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/versioning/apps.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/versioning/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/apps/versioning/infra/djaploy_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/artifact.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/bin/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/bin/django_pyinfra.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/bin/gunicornherder.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/builtin_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/certificates.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/changelog.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/_utils.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/activate.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/configure.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/deploy.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/restore.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/rollback.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/status.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/commands/sync_certs.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/config.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/deploy.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/discovery.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/infra/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/infra/bluegreen.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/infra/templates.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/infra/utils.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/management/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/management/commands/__init__.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/management/commands/djaploy.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/management/commands/restore_backup.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/management/commands/sync_certs.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/management/commands/update_certs.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/management/commands/verify.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/management/utils.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/notifications.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/utils.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/version.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy/versioning.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy.egg-info/SOURCES.txt +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy.egg-info/dependency_links.txt +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy.egg-info/entry_points.txt +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy.egg-info/requires.txt +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/djaploy.egg-info/top_level.txt +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/setup.cfg +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/tests/test_bluegreen.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/tests/test_borg.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/tests/test_config.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/tests/test_deploy_scripts.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/tests/test_discovery.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/tests/test_gunicornherder.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/tests/test_hooks.py +0 -0
- {djaploy-1.2.4 → djaploy-1.2.5}/tests/test_versioning.py +0 -0
|
@@ -146,7 +146,7 @@ def _generate_backup_script(borg_config, app_user: str, repo_name: str,
|
|
|
146
146
|
if not isinstance(host_data, dict)
|
|
147
147
|
else host_data.get('deployment_strategy', 'zero_downtime')
|
|
148
148
|
)
|
|
149
|
-
if deployment_strategy
|
|
149
|
+
if deployment_strategy in ('zero_downtime', 'bluegreen'):
|
|
150
150
|
default_media = f"/home/{app_user}/apps/{app_name}/shared/media"
|
|
151
151
|
else:
|
|
152
152
|
default_media = f"/home/{app_user}/apps/{app_name}/media"
|
|
@@ -527,7 +527,7 @@ def restore_borg(host_data, restore_opts):
|
|
|
527
527
|
if not isinstance(host_data, dict)
|
|
528
528
|
else host_data.get('deployment_strategy', 'zero_downtime')
|
|
529
529
|
)
|
|
530
|
-
if deployment_strategy
|
|
530
|
+
if deployment_strategy in ('zero_downtime', 'bluegreen'):
|
|
531
531
|
default_media = f"/home/{app_user}/apps/{app_name}/shared/media"
|
|
532
532
|
else:
|
|
533
533
|
default_media = f"/home/{app_user}/apps/{app_name}/media"
|
|
@@ -540,6 +540,28 @@ def restore_borg(host_data, restore_opts):
|
|
|
540
540
|
db_only = restore_opts.get("db_only", False)
|
|
541
541
|
services = getattr(host_data, "services", None) or []
|
|
542
542
|
|
|
543
|
+
# For bluegreen, expand service names to per-slot services and include
|
|
544
|
+
# per-slot streaming services so they are also stopped during restore.
|
|
545
|
+
deployment_strategy = (
|
|
546
|
+
getattr(host_data, 'deployment_strategy', 'zero_downtime')
|
|
547
|
+
if not isinstance(host_data, dict)
|
|
548
|
+
else host_data.get('deployment_strategy', 'zero_downtime')
|
|
549
|
+
)
|
|
550
|
+
if deployment_strategy == 'bluegreen':
|
|
551
|
+
app_name = (
|
|
552
|
+
getattr(host_data, 'app_name', '')
|
|
553
|
+
if not isinstance(host_data, dict)
|
|
554
|
+
else host_data.get('app_name', '')
|
|
555
|
+
)
|
|
556
|
+
bluegreen_services = []
|
|
557
|
+
for svc in services:
|
|
558
|
+
bluegreen_services.append(f"{app_name}-blue")
|
|
559
|
+
bluegreen_services.append(f"{app_name}-green")
|
|
560
|
+
# Also stop streaming coordinator instances
|
|
561
|
+
bluegreen_services.append(f"{app_name}-streaming-blue")
|
|
562
|
+
bluegreen_services.append(f"{app_name}-streaming-green")
|
|
563
|
+
services = bluegreen_services
|
|
564
|
+
|
|
543
565
|
# Repo connection details come from the *source* borg config, but
|
|
544
566
|
# ssh_known_hosts_file must come from the *target* (the file lives on
|
|
545
567
|
# the machine running borg, not the machine the backup was taken from).
|
|
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
|
|
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
|
|
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
|