feat(docker-watcher): phase 7 - deployer & health checker
Deploy orchestrator with full pipeline: pull → create container → start → network → NPM proxy → health check. Rollback on failure, multi-instance support, max_instances enforcement, webhook notifications. Fix NPM auth in rollback and error logging in removeInstance.
This commit is contained in:
@@ -387,12 +387,12 @@ func (d *Deployer) removeInstance(ctx context.Context, inst store.Instance, sett
|
||||
// Delete NPM proxy host.
|
||||
if inst.NpmProxyID > 0 {
|
||||
npmPassword, err := d.decryptNpmPassword(settings.NpmPassword)
|
||||
if err == nil {
|
||||
if authErr := d.npm.Authenticate(ctx, settings.NpmEmail, npmPassword); authErr == nil {
|
||||
if delErr := d.npm.DeleteProxyHost(ctx, inst.NpmProxyID); delErr != nil {
|
||||
log.Printf("deployer: delete proxy host %d: %v", inst.NpmProxyID, delErr)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
log.Printf("deployer: decrypt npm password for proxy cleanup: %v", err)
|
||||
} else if authErr := d.npm.Authenticate(ctx, settings.NpmEmail, npmPassword); authErr != nil {
|
||||
log.Printf("deployer: authenticate npm for proxy cleanup: %v", authErr)
|
||||
} else if delErr := d.npm.DeleteProxyHost(ctx, inst.NpmProxyID); delErr != nil {
|
||||
log.Printf("deployer: delete proxy host %d: %v", inst.NpmProxyID, delErr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user