feat: add Docker support with deployment scripts and database backup functionality

This commit is contained in:
syntaxbullet
2026-07-09 13:29:41 +02:00
parent 5a08350b6a
commit 1216a37049
12 changed files with 418 additions and 167 deletions

26
scripts/vps-rollback-n8n.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
SSH_USER="${SSH_USER:-syntaxbullet}"
VPS_HOST="${VPS_HOST:-srv1.bayerischer-mittelstandspreis.de}"
VPS_PORT="${VPS_PORT:-22}"
SSH_KEY="${SSH_KEY:-$HOME/.ssh/bmp-vps-deploy}"
APP_ROOT="${APP_ROOT:-/var/www/bmp-website}"
CONFIRM="${CONFIRM:-}"
if [[ "$CONFIRM" != "replace-bmp-with-n8n" ]]; then
echo "This stops the BMP website and starts the old n8n compose project." >&2
echo "Run with CONFIRM=replace-bmp-with-n8n when you intentionally want that rollback." >&2
exit 1
fi
SSH_TARGET="$SSH_USER@$VPS_HOST"
BMP_COMPOSE="$APP_ROOT/current/deploy/vps/docker-compose.yml"
N8N_COMPOSE="/root/n8n-docker/docker-compose.yml"
ssh -i "$SSH_KEY" -p "$VPS_PORT" "$SSH_TARGET" "
set -e
sudo docker compose -f '$BMP_COMPOSE' stop caddy app
sudo docker compose -f '$N8N_COMPOSE' start
sudo docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}'
"