summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.go63
-rw-r--r--pkg/deployer/instance.go7
2 files changed, 68 insertions, 2 deletions
diff --git a/main.go b/main.go
index bd2e3ae..7b6362d 100644
--- a/main.go
+++ b/main.go
@@ -23,7 +23,69 @@ type Config struct {
ProxyContainerName string `env:"PROXY_CONTAINER_NAME"`
}
+const startupMessage = `
+ , .
+ , . . .
+ . . . .
+ what's the worst that i can say?...
+ . .
+ . . .
+ . .
+ . ...things are better if i stay...
+ . . .
+ . ,
+ . , . . ,
+ . . .
+ ! ,
+ ! .
+ , . ^
+ / \ .
+ . /___\ ,
+ . |= =| ,
+ . | |
+ | | ,
+, | |
+ | | .
+ | |
+ . . | | ,
+ , | | .
+ | |
+ | | .
+ /|##!##|\
+ . / |##!##| \
+ / |##!##| \ ,
+ | / ^ | ^ \ |
+ . | / ( | ) \ | ,
+ , . |/ ( | ) \|
+ (( ))
+ (( : )) .
+ (( : ))
+ , (( )) .
+ . (( )) ,
+ ( )
+ .
+ . . .
+ , . ,
+
+ _ __
+ ___| |_ / _|
+ / __| __| |_
+ _ | (__| |_| _|
+ (_)_ __ ___| \___|\__|_|_ ___ ___ _ __
+ | | '_ \/ __| __/ _` + "`" + ` | '_ \ / __/ _ \ '__|
+ | | | | \__ \ || (_| | | | | (_| __/ |
+ |_|_| |_|___/\__\__,_|_| |_|\___\___|_|
+
+____^/\___^--____/\____O______________/\/\--
+ /\^ ^ ^ ^ ^^ ^ '\
+ -- - -- -
+ -- __ ___-- ^ ^
+
+`
+
func main() {
+ slog.Info(startupMessage)
+
var config Config
if err := env.Parse(&config); err != nil {
@@ -54,4 +116,5 @@ func main() {
slog.Info("starting http server")
err = http.ListenAndServe(":8080", web.NewMux(&registryClient, &dockerDeployer))
slog.Error("http server closing", "reason", err.Error())
+ slog.Info("so long and goodnight; so long and goodnight...")
}
diff --git a/pkg/deployer/instance.go b/pkg/deployer/instance.go
index 99171f4..797a54f 100644
--- a/pkg/deployer/instance.go
+++ b/pkg/deployer/instance.go
@@ -74,18 +74,21 @@ func (d *DockerDeployer) StopInstance(ctx context.Context, deployKey, team strin
Force: true,
})
if err != nil {
+ slog.Error("failed to remove container", "container", c.ID, "cause", err)
return fmt.Errorf("docker error")
}
slog.Info("container removed early", "container", c.ID)
}
- networks, err := d.client.NetworkList(ctx, client.NetworkListOptions{})
+ networks, err := d.client.NetworkList(ctx, client.NetworkListOptions{
+ Filters: filters,
+ })
if err != nil {
return fmt.Errorf("docker error")
}
for _, n := range networks.Items {
if err = d.forceRemoveNetwork(ctx, n.ID); err != nil {
- slog.Warn("failed to remove network", "network", n.ID)
+ slog.Warn("failed to remove network", "network", n.ID, "cause", err)
continue
}
slog.Info("network removed early", "network", n.ID)