fix deploy script: correct bun path, .htaccess api exclusion, U8 backend syntax
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,11 @@ rsync -az --delete packages/client/dist/ "$HOST:$STATIC_DIR/"
|
||||
ssh "$HOST" "cat > $STATIC_DIR/.htaccess << 'HTACCESS'
|
||||
RewriteEngine On
|
||||
RewriteBase /celebrate-esc/
|
||||
|
||||
# Don't rewrite API requests — handled by web backend
|
||||
RewriteCond %{REQUEST_URI} ^/celebrate-esc/api [NC]
|
||||
RewriteRule . - [L]
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . index.html [L]
|
||||
@@ -87,7 +92,7 @@ After=postgresql.service
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=%h/services/celebrate-esc/server
|
||||
ExecStart=/home/serve/.local/share/mise/installs/bun/1.3.0/bin/bun run --env-file=../.env src/index.ts
|
||||
ExecStart=/usr/bin/bun run --env-file=../.env src/index.ts
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
@@ -101,7 +106,7 @@ systemctl --user restart celebrate-esc.service"
|
||||
|
||||
# ── 9. Set up web backend routing ────────────────────────────────────
|
||||
echo "→ configuring web backend routing..."
|
||||
ssh "$HOST" "uberspace web backend set /celebrate-esc/api --http --port $PORT --remove-prefix 2>/dev/null || true"
|
||||
ssh "$HOST" "uberspace web backend add /celebrate-esc/api PORT $PORT --remove-prefix --force 2>/dev/null || true"
|
||||
|
||||
# ── 10. Verify ────────────────────────────────────────────────────────
|
||||
echo "→ verifying deployment..."
|
||||
|
||||
Reference in New Issue
Block a user