Mise a jour automatique programmee (crontab) par stack
- planification crontab par stack (autoupdate.json), incompatible avec l'exclusion
- scheduler a la minute ; pull puis down + up -d seulement si une image a change (mode autoapply)
- API PUT .../targets/{t}/auto et GET /api/cron (apercu des prochaines executions)
- interface : option dans le detail, badge sarcelle, vue de suivi "Mises a jour auto"
- TZ dans docker-compose / .env.example (tzdata embarque)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LNfwm6UCYFyvNQNSF5i9Gy
This commit is contained in:
1 parent
54cbab17cb
commit
51691d7b8a
16 files changed
+1010
-7
No files matched your search
@@ -71,6 +71,21 @@ export interface Stack {
|
||||
applied?: Applied;
|
||||
/** Exclue des mises à jour par un administrateur (reste analysée et affichée). */
|
||||
excluded?: boolean;
|
||||
/** Mise a jour automatique programmee (crontab). */
|
||||
auto?: AutoInfo;
|
||||
}
|
||||
|
||||
export interface AutoInfo {
|
||||
schedule: string;
|
||||
by?: string;
|
||||
since: string;
|
||||
/** Prochaine execution (absente : jamais). */
|
||||
next?: string;
|
||||
lastRun?: string;
|
||||
lastOk: boolean;
|
||||
lastMessage?: string;
|
||||
/** Echeance atteinte, connexion occupee : nouvel essai a la minute suivante. */
|
||||
pending?: boolean;
|
||||
}
|
||||
|
||||
export interface Scan {
|
||||
@@ -119,6 +134,8 @@ export interface Fleet {
|
||||
summary: Summary;
|
||||
/** Secondes entre deux analyses automatiques (0 : désactivées). */
|
||||
interval: number;
|
||||
/** Fuseau horaire des planifications. */
|
||||
tz?: string;
|
||||
/** Administrateur : clé publique SSH à autoriser sur les serveurs. */
|
||||
publicKey?: string;
|
||||
}
|
||||
@@ -214,6 +231,14 @@ export const api = {
|
||||
await request(`/api/servers/${q(serverId)}/targets/${q(targetId)}/exclude`, json({ dir, excluded: on }, "PUT"));
|
||||
},
|
||||
|
||||
/** Programme la mise a jour automatique d'une stack (crontab) ; schedule vide : la desactive. */
|
||||
autoStack: async (serverId: string, targetId: string, dir: string, schedule: string): Promise<void> => {
|
||||
await request(`/api/servers/${q(serverId)}/targets/${q(targetId)}/auto`, json({ dir, schedule }, "PUT"));
|
||||
},
|
||||
|
||||
/** Valide une planification et renvoie ses prochaines executions. */
|
||||
cronPreview: async (expr: string): Promise<string[]> => (await (await request(`/api/cron?expr=${q(expr)}`)).json()).next,
|
||||
|
||||
// --- Compte ------------------------------------------------------------------
|
||||
changePassword: async (current: string, next: string): Promise<void> => {
|
||||
await request("/api/account/password", json({ current, new: next }));
|
||||
|
||||
Reference in new issue
Block a user