feat(docker): scan/inspect passifs des stacks Compose (tâche 2 SJ-4)
- 4 tables Docker (settings/compose_roots/compose_stacks/stack_services)
+ migration 0004 (timestamps journal monotones)
- templates docker/scan-compose + inspect-compose ; renderTemplate bascule
sur délimiteurs <% %> pour les templates docker/ afin de préserver les
Go-templates {{.ID}} intacts
- dockerScan: parseDockerScan (TDD) + scanDockerStacks (persiste stacks
candidats, complète la détection par labels)
- action docker_scan branchée dans execute (route dédiée, archivage report/log)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
CREATE TABLE `docker_compose_roots` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`machine_id` text NOT NULL,
|
||||
`path` text NOT NULL,
|
||||
`enabled` integer DEFAULT 1 NOT NULL,
|
||||
`scan_depth` integer,
|
||||
`created_at` text NOT NULL,
|
||||
`updated_at` text NOT NULL,
|
||||
FOREIGN KEY (`machine_id`) REFERENCES `machines`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `docker_compose_stacks` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`machine_id` text NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`working_dir` text NOT NULL,
|
||||
`compose_files_json` text NOT NULL,
|
||||
`project_name` text,
|
||||
`env_file` text,
|
||||
`status` text NOT NULL,
|
||||
`detected_by` text,
|
||||
`last_scan_at` text,
|
||||
`last_update_at` text,
|
||||
`created_at` text NOT NULL,
|
||||
`updated_at` text NOT NULL,
|
||||
FOREIGN KEY (`machine_id`) REFERENCES `machines`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `docker_settings` (
|
||||
`machine_id` text PRIMARY KEY NOT NULL,
|
||||
`enabled` integer DEFAULT 0 NOT NULL,
|
||||
`scan_depth` integer DEFAULT 4 NOT NULL,
|
||||
`prune_mode` text DEFAULT 'safe' NOT NULL,
|
||||
`last_scan_at` text,
|
||||
`last_pull_check_at` text,
|
||||
`updated_at` text NOT NULL,
|
||||
FOREIGN KEY (`machine_id`) REFERENCES `machines`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `docker_stack_services` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`stack_id` text NOT NULL,
|
||||
`service_name` text NOT NULL,
|
||||
`image_ref` text,
|
||||
`current_image_id` text,
|
||||
`current_digest` text,
|
||||
`candidate_image_id` text,
|
||||
`candidate_digest` text,
|
||||
`version_label` text,
|
||||
`status` text,
|
||||
`updated_at` text NOT NULL,
|
||||
FOREIGN KEY (`stack_id`) REFERENCES `docker_compose_stacks`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,13 @@
|
||||
"when": 1780669200000,
|
||||
"tag": "0003_magical_psylocke",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 4,
|
||||
"version": "6",
|
||||
"when": 1780684150263,
|
||||
"tag": "0004_thin_ted_forrester",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user