Files
platform/bin/deploy.sh
2019-10-15 15:33:43 +02:00

23 lines
421 B
Bash
Executable File

#!/usr/bin/env bash
if [ $# = 0 ]; then
echo "usage: deploy.sh name ..."
exit 1
fi
if [ ! -f $1/deployment.nix ]; then
echo "error: $1 does not contain a deployment"
exit 1
fi
mkdir -p $1/gcroots
echo "--- Securing certifiates"
nix-build -o $1/gcroots/certs $1/build.nix
echo "--- Updating deployment"
nixops modify -d $1 $1/deployment.nix
echo "--- Deploying $1"
nixops deploy -d $* --allow-reboot