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:
@@ -27,6 +27,11 @@ func apiRouter(tc *testContext) http.Handler {
|
||||
apiR.Get("/apps", tc.handlers.HandleAPIListApps())
|
||||
apiR.Get("/apps/{id}", tc.handlers.HandleAPIGetApp())
|
||||
apiR.Get("/apps/{id}/deployments", tc.handlers.HandleAPIListDeployments())
|
||||
|
||||
// Backup/Restore API
|
||||
apiR.Get("/apps/{id}/export", tc.handlers.HandleAPIExportApp())
|
||||
apiR.Get("/backup/export", tc.handlers.HandleAPIExportAllApps())
|
||||
apiR.Post("/backup/import", tc.handlers.HandleAPIImportApps())
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user