feat: add snapshot/rollback system with download capability

- Add AppSnapshot entity with type (pre_deploy/manual), status tracking, and file paths
- Add SnapshotsService with create, capture, rollback, prune (max 10), and download logic
- Add SnapshotsController with REST endpoints for CRUD, rollback, and file downloads
- Add K8s methods: exportDatabaseDump, archiveWpContent, restoreWpContent
- Auto-create pre-deploy snapshots before each deployment for rollback safety
- Support downloading current live state (source, wp-content, database) without snapshots
- Add snapshot management UI in app detail page with create, rollback, download, delete
- Wire circular dependencies with forwardRef between Deployments and Snapshots modules
This commit is contained in:
keyhan
2026-04-08 01:55:00 +03:30
parent ac5278d73b
commit d3a5240528
11 changed files with 1286 additions and 3 deletions
+2
View File
@@ -11,6 +11,7 @@ import { KubernetesModule } from './kubernetes/kubernetes.module';
import { BuildModule } from './build/build.module';
import { TicketsModule } from './tickets/tickets.module';
import { BillingModule } from './billing/billing.module';
import { SnapshotsModule } from './snapshots/snapshots.module';
import configuration from './config/configuration';
@Module({
@@ -60,6 +61,7 @@ import configuration from './config/configuration';
BuildModule,
TicketsModule,
BillingModule,
SnapshotsModule,
],
})
export class AppModule {}