feat: add server upgrade action — force-pull latest images and re-provision
All checks were successful
CI / build (push) Successful in 1m19s
CI / docker (push) Successful in 48s

Restart only stops/starts existing containers with the same image. The new
upgrade action removes server + UI containers, force-pulls the latest
Docker images, then re-provisions (preserving app containers, volumes, and
networks). Available to both vendor (tenant detail) and tenant admin
(dashboard).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-11 10:45:45 +02:00
parent d5eead888d
commit e2e5c794a2
11 changed files with 122 additions and 5 deletions

View File

@@ -18,6 +18,14 @@ export function useRestartServer() {
});
}
export function useUpgradeServer() {
const qc = useQueryClient();
return useMutation<void, Error, void>({
mutationFn: () => api.post('/tenant/server/upgrade'),
onSuccess: () => qc.invalidateQueries({ queryKey: ['tenant', 'dashboard'] }),
});
}
export function useTenantLicense() {
return useQuery<TenantLicenseData>({
queryKey: ['tenant', 'license'],

View File

@@ -62,6 +62,14 @@ export function useRestartServer() {
});
}
export function useUpgradeServer() {
const qc = useQueryClient();
return useMutation<void, Error, string>({
mutationFn: (id) => api.post(`/vendor/tenants/${id}/upgrade`),
onSuccess: (_, id) => qc.invalidateQueries({ queryKey: ['vendor', 'tenants', id] }),
});
}
export function useRenewLicense() {
const qc = useQueryClient();
return useMutation<LicenseResponse, Error, string>({