You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
440 B
Bash
19 lines
440 B
Bash
12 months ago
|
#!/usr/bin/env bash
|
||
|
set -e
|
||
|
|
||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||
|
cd $SCRIPT_DIR/..
|
||
|
|
||
|
echo "Building Nix environment in docker"
|
||
|
IMAGE=$(docker build . -q -f ./deploy/Dockerfile)
|
||
|
|
||
|
echo "Beginning deploy"
|
||
|
docker run \
|
||
|
--name "nixos-deploy" \
|
||
|
--rm \
|
||
|
--mount type=bind,src=$(pwd)/deploy/.ssh/,dst=/root/.ssh/,readonly=true \
|
||
|
--mount type=volume,src=nixCache,dst=/nix/ \
|
||
|
-it $IMAGE \
|
||
|
deploy
|
||
|
|