2022-08-27 19:08:42 +00:00
|
|
|
{ lib, docker, flyctl, formats, writeShellScriptBin, dockerImage }:
|
2022-08-27 03:54:29 +00:00
|
|
|
|
|
|
|
writeShellScriptBin "deploy" ''
|
|
|
|
set -euxo pipefail
|
|
|
|
export PATH="${lib.makeBinPath [(docker.override { clientOnly = true; }) flyctl]}:$PATH"
|
2022-08-27 19:08:42 +00:00
|
|
|
archive=${dockerImage}
|
2022-08-27 03:54:29 +00:00
|
|
|
image=$(docker load < $archive | awk '{ print $3; }')
|
|
|
|
flyctl deploy -i $image
|
|
|
|
''
|