feat(deploy): add deploy-verify-permissions recipe + upload/run deploy-server.sh before verification + run migrations in deploy

This commit is contained in:
Pontoporeia
2026-05-11 02:28:11 +02:00
parent 3136fa7113
commit 72f7192156
8 changed files with 5290 additions and 444 deletions

View File

@@ -7,9 +7,18 @@
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
APP_DIR="$REPO_ROOT/app"
SCHEMA="$APP_DIR/storage/schema.sql"
PROD_DB="$APP_DIR/storage/xamxam.db"
# Detect layout: local dev has app/ subdir, server has files at repo root
if [ -d "$REPO_ROOT/app/storage" ]; then
SCHEMA="$REPO_ROOT/app/storage/schema.sql"
PROD_DB="$REPO_ROOT/app/storage/xamxam.db"
elif [ -f "$REPO_ROOT/storage/schema.sql" ]; then
SCHEMA="$REPO_ROOT/storage/schema.sql"
PROD_DB="$REPO_ROOT/storage/xamxam.db"
else
echo "ERROR: cannot find storage/schema.sql" >&2
exit 1
fi
init_db() {
local db="$1"