From 49e4f7476817f4991e4cf3861fedfbd9cc661cd3 Mon Sep 17 00:00:00 2001 From: Peter Foster Date: Sun, 25 Jan 2026 04:33:07 +0000 Subject: [PATCH] chore: Restore deploy-local.sh script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- deploy-local.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 deploy-local.sh diff --git a/deploy-local.sh b/deploy-local.sh new file mode 100755 index 0000000..919ead1 --- /dev/null +++ b/deploy-local.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Deploy RealCV from local git repo to website +set -e + +cd /git/RealCV + +echo "Building application..." +dotnet publish src/RealCV.Web -c Release -o ./publish --nologo + +echo "Stopping service..." +sudo systemctl stop realcv + +echo "Backing up config..." +cp /var/www/realcv/appsettings.Production.json /tmp/appsettings.Production.json 2>/dev/null || true + +echo "Deploying files..." +sudo rm -rf /var/www/realcv/* +sudo cp -r ./publish/* /var/www/realcv/ + +echo "Restoring config..." +sudo cp /tmp/appsettings.Production.json /var/www/realcv/ 2>/dev/null || true + +echo "Setting permissions..." +sudo chown -R www-data:www-data /var/www/realcv + +echo "Starting service..." +sudo systemctl start realcv + +echo "Done! Checking status..." +sleep 2 +sudo systemctl is-active realcv && echo "Service is running."