From ccd7794b5379c8eb0cff266e0163abb1ea570e28 Mon Sep 17 00:00:00 2001 From: Vladislav Date: Sun, 30 Mar 2025 21:58:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=AD=D1=89=D0=BA=D0=B5=D1=80=D0=B5=20=D1=87?= =?UTF-8?q?=D1=8E=D0=BF=D0=B5=D0=BF=20=D0=BA=D1=80=D0=BE=D0=BA=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=BB=D0=BE=20=D0=B1=D0=BE=D0=BC=D0=B1=D0=B0=D1=80=D0=B4?= =?UTF-8?q?=D0=B8=D0=BB=D0=BE=20=D1=8D=D1=82=D0=BE=20=D1=81=D0=B0=D0=BC?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D0=B2=D0=BD=D1=8B=D0=B9=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8?= =?UTF-8?q?=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/post-receive | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/post-receive b/scripts/post-receive index 010ea92..eb93590 100644 --- a/scripts/post-receive +++ b/scripts/post-receive @@ -3,7 +3,10 @@ TARGET="path to work repo" GIT_DIR="Path to .git repo" BRANCH="master" +LOG_FILE="/var/log/deploy.log" +exec > >(tee -a "$LOG_FILE") 2>&1 +echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting deploy..." git --work-tree="$TARGET" --git-dir="$GIT_DIR" checkout -f "$BRANCH" cd $TARGET @@ -19,3 +22,4 @@ docker-compose down # 3 docker-compose up -d +echo "[$(date '+%Y-%m-%d %H:%M:%S')] Deploy successful!" \ No newline at end of file