Prune deployed images

This commit is contained in:
Mike Cifelli 2024-04-03 11:40:36 -04:00
parent cf8c677c25
commit 684daf43cc
Signed by: mike
GPG Key ID: 6B08C6BE47D08E4C
2 changed files with 9 additions and 6 deletions

View File

@ -29,11 +29,10 @@ defmodule Chronoscope.NTS do
[] -> [] ->
{:ok, pid} = {:ok, pid} =
NTS.DynamicSupervisor DynamicSupervisor.start_child(
|> DynamicSupervisor.start_child({ NTS.DynamicSupervisor,
NTS.Client, {NTS.Client, host: host, port: port, name: {:via, Registry, {NTS.Registry, name}}}
host: host, port: port, name: {:via, Registry, {NTS.Registry, name}} )
})
GenServer.call(pid, :key_establishment) GenServer.call(pid, :key_establishment)
end end

View File

@ -27,6 +27,10 @@ defmodule Mix.Tasks.Deploy do
into: IO.stream() into: IO.stream()
) )
System.cmd("ssh", [host, "cd chronoscope && buildah build -t chronoscope:latest && podman auto-update"], into: IO.stream()) System.cmd(
"ssh",
[host, "cd chronoscope && buildah build -t chronoscope:latest && podman auto-update && podman image prune -f"],
into: IO.stream()
)
end end
end end