fix: per-event delete button, Docker network default, polling interval duration parsing
- Add per-event delete button (trash icon on hover) in event log entries - Set Docker network default to 'docker-watcher' in DB schema + migration for existing DBs - Parse Go duration strings (5m, 1h) to seconds in settings UI, convert back on save - Clear error when network is empty in deployer instead of hidden fallback
This commit is contained in:
@@ -286,6 +286,9 @@ func (d *Deployer) executeDeploy(
|
||||
d.logDeploy(deployID, "Image pulled successfully", "info")
|
||||
|
||||
// Step 2: Ensure network exists.
|
||||
if settings.Network == "" {
|
||||
return containerID, proxyRouteID, instanceID, fmt.Errorf("docker network not configured in settings")
|
||||
}
|
||||
networkID, err := d.docker.EnsureNetwork(ctx, settings.Network)
|
||||
if err != nil {
|
||||
return containerID, proxyRouteID, instanceID, fmt.Errorf("ensure network: %w", err)
|
||||
|
||||
@@ -109,6 +109,8 @@ func (s *Store) runMigrations() error {
|
||||
`ALTER TABLE settings ADD COLUMN traefik_cert_resolver TEXT NOT NULL DEFAULT 'letsencrypt'`,
|
||||
`ALTER TABLE settings ADD COLUMN traefik_network TEXT NOT NULL DEFAULT ''`,
|
||||
`ALTER TABLE settings ADD COLUMN traefik_api_url TEXT NOT NULL DEFAULT ''`,
|
||||
// Set default network for existing databases with empty network.
|
||||
`UPDATE settings SET network = 'docker-watcher' WHERE network = ''`,
|
||||
}
|
||||
|
||||
for _, m := range migrations {
|
||||
@@ -198,7 +200,7 @@ CREATE TABLE IF NOT EXISTS settings (
|
||||
id INTEGER PRIMARY KEY CHECK (id = 1),
|
||||
domain TEXT NOT NULL DEFAULT '',
|
||||
server_ip TEXT NOT NULL DEFAULT '',
|
||||
network TEXT NOT NULL DEFAULT '',
|
||||
network TEXT NOT NULL DEFAULT 'docker-watcher',
|
||||
subdomain_pattern TEXT NOT NULL DEFAULT 'stage-{stage}-{project}',
|
||||
notification_url TEXT NOT NULL DEFAULT '',
|
||||
npm_url TEXT NOT NULL DEFAULT '',
|
||||
|
||||
Reference in New Issue
Block a user