최초 커밋
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
branch="${1:-main}"
|
||||
target_dir="${2:-/srv/egbim_homepage}"
|
||||
|
||||
mkdir -p "$target_dir"
|
||||
cd "$target_dir"
|
||||
|
||||
if [[ ! -d .git ]]; then
|
||||
git clone --branch "$branch" https://gitea.hmac.kr/b24014/egbim_homepage.git .
|
||||
else
|
||||
git fetch origin
|
||||
git checkout "$branch"
|
||||
git reset --hard "origin/$branch"
|
||||
fi
|
||||
|
||||
docker compose up -d --build
|
||||
Reference in New Issue
Block a user