rebours/deploy.sh
ordinarthur 76209f1e5d deploy: switch from Coolify to direct VPS deploy (nginx + systemd)
- nginx.conf: add proxy for /api, /admin, /robots.txt, /sitemap.xml to Fastify:3001
- deploy.sh: one-command rsync + build + restart
- deploy/setup.sh: first-time VPS setup (node, pnpm, nginx, systemd)
- deploy/rebours.service: systemd unit for Fastify server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 09:52:48 +01:00

25 lines
526 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
VPS="ordinarthur@10.10.0.13"
APP_DIR="/var/www/html/rebours"
echo "🚀 Deploying rebours..."
# 1. Sync source code
rsync -avz --delete \
--exclude node_modules \
--exclude .env \
--exclude dist \
--exclude .git \
./ "$VPS:$APP_DIR/"
# 2. Install deps, migrate, build, restart
ssh "$VPS" "cd $APP_DIR && \
pnpm install --frozen-lockfile && \
pnpm prisma migrate deploy && \
pnpm build && \
sudo systemctl restart rebours"
echo "✅ Live → https://rebours.studio"