integration: worker image, bridge, compose, Makefile, deploy scripts
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
# Deploy lvmh to alarm over ssh (tailnet). Source is rsynced; compose builds there.
|
||||
set -euo pipefail
|
||||
|
||||
REMOTE="${1:-alarm}"
|
||||
REMOTE_DIR="${2:-/zdata/root/dockerFiles/lvmh}"
|
||||
|
||||
if ! ssh "$REMOTE" "test -f $REMOTE_DIR/.env" 2>/dev/null; then
|
||||
echo "ERROR: $REMOTE:$REMOTE_DIR/.env missing. Create it first (see .env.example):"
|
||||
echo " ssh $REMOTE 'mkdir -p $REMOTE_DIR && cat > $REMOTE_DIR/.env' <<EOF
|
||||
LVMH_TOKEN=...
|
||||
ZAI_RENAUD_API_KEY=...
|
||||
EOF"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rsync -az --delete \
|
||||
--exclude .git --exclude node_modules --exclude web/dist \
|
||||
--exclude .env --exclude .scratch --exclude .pi \
|
||||
./ "$REMOTE:$REMOTE_DIR/"
|
||||
|
||||
ssh "$REMOTE" "cd $REMOTE_DIR && docker compose build lvmh && docker compose up -d && docker compose ps"
|
||||
echo "Deployed: http://$REMOTE:8686"
|
||||
Reference in New Issue
Block a user