Add remote-docker-compose

main
mat ess 2022-11-28 21:24:21 -05:00
parent 9e2ac0a65e
commit c650f86a1b
1 changed files with 16 additions and 1 deletions

View File

@ -26,10 +26,25 @@
}"
'';
};
remote-docker-compose = pkgs.writeShellApplication {
name = "remote-docker-compose";
runtimeInputs = [ to-docker-compose ];
text = ''
host=$1
shift
cmd="docker compose -f - $*"
# shellcheck disable=SC2029
to-docker-compose | ssh "$host" "$cmd"
'';
};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ jsonnet to-docker-compose ];
buildInputs = with pkgs; [
jsonnet
to-docker-compose
remote-docker-compose
];
};
};
};