- 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>
25 lines
526 B
Bash
Executable File
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"
|