12 lines
711 B
Bash
Executable File
12 lines
711 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Idempotent deploy: rsync site/ -> Unraid retireapp container root (PLAN Stage 6)
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
SSH="ssh -F /dev/null -o BatchMode=yes -o ConnectTimeout=10"
|
|
$SSH root@192.168.0.123 'mkdir -p /mnt/better/appdata/retireapp'
|
|
rsync -az --delete -e "$SSH" site/ root@192.168.0.123:/mnt/better/appdata/retireapp/
|
|
$SSH root@192.168.0.123 'chmod -R a+rX /mnt/better/appdata/retireapp
|
|
docker start retireapp >/dev/null 2>&1 || docker run -d --name retireapp --restart unless-stopped -p 8103:80 -v /mnt/better/appdata/retireapp:/usr/share/nginx/html:ro nginx:alpine >/dev/null
|
|
sleep 1
|
|
curl -sf http://127.0.0.1:8103/ | grep -q "retire-planner v1" && echo DEPLOY-OK'
|