make nosedir on deploy
This commit is contained in:
parent
3762e26166
commit
a3bc0491dd
|
|
@ -7,6 +7,7 @@ set -euo pipefail
|
||||||
|
|
||||||
HOST="chris@nose-pluto.local"
|
HOST="chris@nose-pluto.local"
|
||||||
DEST="~/pluto"
|
DEST="~/pluto"
|
||||||
|
NOSE_DIR="~/nose"
|
||||||
SOCK="$HOME/.ssh/cm-%r@%h:%p"
|
SOCK="$HOME/.ssh/cm-%r@%h:%p"
|
||||||
|
|
||||||
# 1) Open a master connection (prompts once)
|
# 1) Open a master connection (prompts once)
|
||||||
|
|
@ -20,8 +21,11 @@ rsync -az --delete \
|
||||||
--exclude '.git/' \
|
--exclude '.git/' \
|
||||||
./ "$HOST:$DEST/"
|
./ "$HOST:$DEST/"
|
||||||
|
|
||||||
# 3) remote install (reuses the connection)
|
# 3) ensure $NOSE_DIR exists
|
||||||
|
ssh -o ControlPath="$SOCK" "$HOST" "mkdir -p $NOSE_DIR/{www,bin}"
|
||||||
|
|
||||||
|
# 4) remote deploy (reuses the connection)
|
||||||
ssh -o ControlPath="$SOCK" "$HOST" "cd $DEST && bun install --frozen-lockfile && sudo systemctl restart nose-pluto.service"
|
ssh -o ControlPath="$SOCK" "$HOST" "cd $DEST && bun install --frozen-lockfile && sudo systemctl restart nose-pluto.service"
|
||||||
|
|
||||||
# 4) close the master connection
|
# 5) close the master connection
|
||||||
ssh -O exit -o ControlPath="$SOCK" "$HOST"
|
ssh -O exit -o ControlPath="$SOCK" "$HOST"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user