webhook 설정 오류 수정
- deployer 배포 webhook 오류 설정 수정
This commit is contained in:
@@ -1,21 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="/volume1/docker/webpage"
|
||||
SRC="/repo"
|
||||
DST="/runtime" # (= /volume1/docker/webpage 가 마운트된 곳)
|
||||
|
||||
cd "$ROOT"
|
||||
cd "$SRC"
|
||||
|
||||
echo "[1/5] git fetch + pull"
|
||||
git fetch --all --prune
|
||||
git pull --ff-only
|
||||
# 레포에서 운영으로 반영할 항목들만 복사/동기화 (필요한 것만 적기)
|
||||
# backend, travel-proxy, deployer, nginx, scripts, docker-compose.yml, .env 등
|
||||
rsync -a --delete \
|
||||
--exclude ".git" \
|
||||
--exclude ".releases" \
|
||||
"$SRC/backend/" "$DST/backend/"
|
||||
rsync -a --delete \
|
||||
--exclude ".git" \
|
||||
"$SRC/travel-proxy/" "$DST/travel-proxy/"
|
||||
rsync -a --delete \
|
||||
--exclude ".git" \
|
||||
"$SRC/deployer/" "$DST/deployer/"
|
||||
rsync -a --delete \
|
||||
--exclude ".git" \
|
||||
"$SRC/nginx/" "$DST/nginx/"
|
||||
rsync -a --delete \
|
||||
--exclude ".git" \
|
||||
"$SRC/scripts/" "$DST/scripts/"
|
||||
|
||||
echo "[2/5] docker compose build"
|
||||
docker compose build --pull
|
||||
# compose 파일 / env 파일
|
||||
rsync -a "$SRC/docker-compose.yml" "$DST/docker-compose.yml"
|
||||
if [ -f "$SRC/.env" ]; then
|
||||
rsync -a "$SRC/.env" "$DST/.env"
|
||||
fi
|
||||
|
||||
echo "[3/5] docker compose up"
|
||||
docker compose up -d
|
||||
|
||||
echo "[4/5] status"
|
||||
docker compose ps
|
||||
|
||||
echo "[5/5] done"
|
||||
echo "SYNC_OK"
|
||||
|
||||
@@ -4,6 +4,8 @@ set -euo pipefail
|
||||
SRC="/repo"
|
||||
DST="/runtime"
|
||||
|
||||
git config --global --add safe.directory "$SRC"
|
||||
|
||||
cd "$SRC"
|
||||
git fetch --all --prune
|
||||
git pull --ff-only
|
||||
@@ -20,5 +22,5 @@ rsync -a --delete \
|
||||
bash "$SRC/scripts/deploy-nas.sh"
|
||||
|
||||
cd "$DST"
|
||||
docker compose up -d --build backend travel-proxy frontend
|
||||
docker-compose up -d --build backend travel-proxy frontend
|
||||
echo "DEPLOY_OK $TAG"
|
||||
|
||||
Reference in New Issue
Block a user