Document git-based deployment flow and update scripts
- Add comprehensive deployment architecture documentation to DEPLOYMENT.md - Include ASCII diagram showing local → Gitea → Unraid flow - Document all three deployment scripts with examples - Update scripts to use root@192.168.2.61 for SSH authentication - Add automatic SSH config setup in deploy.sh for git server port 28 - Include troubleshooting section for common deployment issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
15
deploy.sh
15
deploy.sh
@@ -4,7 +4,7 @@
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
UNRAID_HOST="${UNRAID_HOST:-192.168.2.61}"
|
||||
UNRAID_HOST="${UNRAID_HOST:-root@192.168.2.61}"
|
||||
REMOTE_PATH="/mnt/user/docker/custom-dockers/discord-stock-bot"
|
||||
GIT_REPO="git@git.michaelsimard.ca:msimard/discord-stock-bot.git"
|
||||
|
||||
@@ -13,6 +13,19 @@ echo "Deploying discord-stock-bot to ${UNRAID_HOST}..."
|
||||
ssh ${UNRAID_HOST} bash << EOF
|
||||
set -e
|
||||
|
||||
# Ensure SSH config for git server (port 28)
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
if ! grep -q "^Host git.michaelsimard.ca" ~/.ssh/config 2>/dev/null; then
|
||||
echo "Configuring SSH for git.michaelsimard.ca (port 28)..."
|
||||
cat >> ~/.ssh/config << 'SSHCONFIG'
|
||||
|
||||
Host git.michaelsimard.ca
|
||||
Port 28
|
||||
SSHCONFIG
|
||||
chmod 600 ~/.ssh/config
|
||||
fi
|
||||
|
||||
# Clone or pull repository
|
||||
if [ -d "${REMOTE_PATH}/.git" ]; then
|
||||
echo "Repository exists, pulling latest changes..."
|
||||
|
||||
Reference in New Issue
Block a user