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
@@ -11,6 +11,8 @@
|
||||
// POST /api/servers/{id}/test (administrateur) test de la connexion SSH, de docker et de docker compose
|
||||
// POST /api/servers/{id}/targets/{t}/apply {"dir"} mise à jour d'une stack : pull, down, up -d (administrateur)
|
||||
// PUT /api/servers/{id}/targets/{t}/exclude {"dir","excluded"} exclut une stack des mises à jour ou la réactive (administrateur)
|
||||
// PUT /api/servers/{id}/targets/{t}/auto {"dir","schedule"} programme (crontab) ou desactive ("") la mise a jour auto d'une stack (administrateur)
|
||||
// GET /api/cron?expr=... validation d'une planification et prochaines executions
|
||||
// POST /api/account/password, PATCH /api/account compte local
|
||||
// GET|POST /api/admin/users, PATCH|DELETE /api/admin/users/{id} comptes (administrateur)
|
||||
package api
|
||||
@@ -98,6 +100,8 @@ func (h *Handler) Register(mux *http.ServeMux) {
|
||||
mux.HandleFunc("POST /api/servers/{id}/test", h.testServer)
|
||||
mux.HandleFunc("POST /api/servers/{id}/targets/{target}/apply", h.apply)
|
||||
mux.HandleFunc("PUT /api/servers/{id}/targets/{target}/exclude", h.exclude)
|
||||
mux.HandleFunc("PUT /api/servers/{id}/targets/{target}/auto", h.autoUpdate)
|
||||
mux.HandleFunc("GET /api/cron", h.cronPreview)
|
||||
if h.Accounts != nil {
|
||||
mux.HandleFunc("POST /api/account/password", h.changePassword)
|
||||
mux.HandleFunc("PATCH /api/account", h.patchAccount)
|
||||
@@ -155,6 +159,7 @@ func (h *Handler) getFleet(w http.ResponseWriter, r *http.Request) {
|
||||
"servers": h.Fleet.Snapshot(),
|
||||
"summary": h.Fleet.Summary(),
|
||||
"interval": int(h.Interval.Seconds()),
|
||||
"tz": tzName(),
|
||||
}
|
||||
if h.isAdmin(r) {
|
||||
resp["publicKey"] = h.PublicKey
|
||||
|
||||
Reference in new issue
Block a user