diff --git a/config/faaso.yml b/config/faaso.yml index 2f89fe7..2ede76b 100644 --- a/config/faaso.yml +++ b/config/faaso.yml @@ -1 +1 @@ -password: admin +password: adminfoo diff --git a/config/funkos b/config/funkos new file mode 100644 index 0000000..8e691f2 --- /dev/null +++ b/config/funkos @@ -0,0 +1,8 @@ + + handle_path /faaso/hello/* { + reverse_proxy /* http://faaso-hello-9zth8p:3000 { + health_uri /ping + fail_duration 30s + } + } + \ No newline at end of file diff --git a/src/funko.cr b/src/funko.cr index f37efda..cb799e4 100644 --- a/src/funko.cr +++ b/src/funko.cr @@ -99,7 +99,8 @@ module Funko sleep 0.1.seconds } else - containers.select { |container| container.@state == "running" }.sort! { |i, j| + # Sort them older to newer, so we stop the oldest + containers.sort! { |i, j| i.@created <=> j.@created }.each { |container| Log.info { "Removing instance" }