feat: add backup/restore of app configurations
All checks were successful
Check / check (pull_request) Successful in 3m25s
All checks were successful
Check / check (pull_request) Successful in 3m25s
Add export and import functionality for app configurations:
- Export single app or all apps as versioned JSON backup bundle
- Import from backup file with name-conflict detection (skip duplicates)
- Fresh SSH keys and webhook secrets generated on import
- Preserves env vars, labels, volumes, and port mappings
- Web UI: export button on app detail, backup/restore page on dashboard
- REST API: GET /api/v1/apps/{id}/export, GET /api/v1/backup/export,
POST /api/v1/backup/import
- Comprehensive test coverage for service and handler layers
This commit is contained in:
@@ -432,6 +432,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Backup -->
|
||||
<div class="card p-6 mb-6">
|
||||
<h2 class="section-title mb-4">Backup</h2>
|
||||
<p class="text-sm text-gray-500 mb-3">Export this app's configuration (settings, env vars, labels, volumes, ports) as a JSON file for backup or migration.</p>
|
||||
<a href="/apps/{{.App.ID}}/export" class="btn-secondary">
|
||||
<svg class="w-4 h-4 mr-1 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>
|
||||
</svg>
|
||||
Export Config
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Danger Zone -->
|
||||
<div class="card border-2 border-error-500/20 bg-error-50/50 p-6">
|
||||
<h2 class="text-lg font-medium text-error-700 mb-4">Danger Zone</h2>
|
||||
|
||||
Reference in New Issue
Block a user