chore: initial backend + travel-proxy dockerized setup for NAS deployment
This commit is contained in:
21
script/deploy-nas.sh
Normal file
21
script/deploy-nas.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="/volume1/docker/webpage"
|
||||
|
||||
cd "$ROOT"
|
||||
|
||||
echo "[1/5] git fetch + pull"
|
||||
git fetch --all --prune
|
||||
git pull --ff-only
|
||||
|
||||
echo "[2/5] docker compose build"
|
||||
docker compose build --pull
|
||||
|
||||
echo "[3/5] docker compose up"
|
||||
docker compose up -d
|
||||
|
||||
echo "[4/5] status"
|
||||
docker compose ps
|
||||
|
||||
echo "[5/5] done"
|
||||
15
script/healthcheck.sh
Normal file
15
script/healthcheck.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE="http://127.0.0.1"
|
||||
|
||||
echo "backend health:"
|
||||
curl -fsS "${BASE}:18000/health" | sed 's/^/ /'
|
||||
|
||||
echo "backend latest:"
|
||||
curl -fsS "${BASE}:18000/api/lotto/latest" | head -c 200; echo
|
||||
|
||||
echo "travel regions:"
|
||||
curl -fsS "${BASE}:19000/api/travel/regions" | head -c 200; echo
|
||||
|
||||
echo "OK"
|
||||
Reference in New Issue
Block a user