rename script folder
This commit is contained in:
21
scripts/deploy-nas.sh
Normal file
21
scripts/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"
|
||||
24
scripts/deploy.sh
Normal file
24
scripts/deploy.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
SRC="/repo"
|
||||
DST="/runtime"
|
||||
|
||||
cd "$SRC"
|
||||
git fetch --all --prune
|
||||
git pull --ff-only
|
||||
|
||||
# 릴리즈 백업(롤백용): 아래 5번과 연결
|
||||
TAG="$(date +%Y%m%d-%H%M%S)"
|
||||
mkdir -p "$DST/.releases/$TAG"
|
||||
rsync -a --delete \
|
||||
--exclude ".releases" \
|
||||
"$DST/" "$DST/.releases/$TAG/"
|
||||
|
||||
# 소스 → 운영 반영 (네가 이미 만든 deploy-nas.sh가 있으면 그걸 호출해도 됨)
|
||||
# 예: repo/scripts/deploy-nas.sh가 운영으로 복사/동기화하는 로직이라면:
|
||||
bash "$SRC/scripts/deploy-nas.sh"
|
||||
|
||||
cd "$DST"
|
||||
docker compose up -d --build backend travel-proxy frontend
|
||||
echo "DEPLOY_OK $TAG"
|
||||
15
scripts/healthcheck.sh
Normal file
15
scripts/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