Files
hantim-server/scripts/deploy.sh
T
timothykim c484109f1c merge dispatch and deploy into a single deploy.sh
deploy.sh reads SSH_ORIGINAL_COMMAND directly, validates it, and
runs the deploy. No more dispatch indirection.
2026-03-13 17:08:19 -04:00

17 lines
273 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
CMD="${SSH_ORIGINAL_COMMAND:-${1:-}}"
if ! [[ "$CMD" =~ ^deploy-[a-zA-Z0-9._-]+$ ]]; then
echo "Unknown command: $CMD"
exit 1
fi
APP="${CMD#deploy-}"
cd /opt/hantim
git pull
cd "docker/$APP"
docker compose pull
docker compose up -d