diff --git a/deploy/deploy-web.sh b/deploy/deploy-web.sh deleted file mode 100755 index fef9342..0000000 --- a/deploy/deploy-web.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Deploy the web UI to the anchor host. -# Usage: ./deploy/deploy-web.sh [user@host] -# -# Builds web/dist/, syncs it to /var/www/waste-web/ on the anchor host, -# then reloads nginx. The anchor binary and config.js are left untouched. - -set -euo pipefail - -HOST="${1:-root@waste.dev.xplwd.com}" -REMOTE_WEB="/var/www/waste-web" -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" - -echo "→ Building web UI…" -cd "$REPO_ROOT/web" -npm ci --silent -npm run build - -echo "→ Syncing dist/ to $HOST:$REMOTE_WEB/" -rsync -az --delete \ - --exclude='config.js' \ - "$REPO_ROOT/web/dist/" \ - "$HOST:$REMOTE_WEB/" - -echo "→ Reloading nginx…" -ssh "$HOST" "nginx -t && systemctl reload nginx" - -echo "✓ Deployed to https://waste.dev.xplwd.com" diff --git a/deploy/nginx-waste.conf b/deploy/nginx-waste.conf deleted file mode 100644 index e23c594..0000000 --- a/deploy/nginx-waste.conf +++ /dev/null @@ -1,44 +0,0 @@ -server { - listen 443 ssl; - server_name waste.dev.xplwd.com; - - # TLS managed by certbot / your cert provider - ssl_certificate /etc/letsencrypt/live/waste.dev.xplwd.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/waste.dev.xplwd.com/privkey.pem; - - root /var/www/waste-web; - index index.html; - - # Runtime config (host-specific; not in git) - location = /config.js { - try_files $uri =204; - add_header Cache-Control "no-cache"; - } - - # WebSocket signaling → waste anchor - location /ws { - proxy_pass http://127.0.0.1:8080; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header Host $host; - proxy_read_timeout 3600s; - } - - # SPA — serve index.html for all non-asset paths - location / { - try_files $uri $uri/ /index.html; - add_header Cache-Control "no-cache"; - } - - # Immutable hashed assets - location /assets/ { - add_header Cache-Control "public, max-age=31536000, immutable"; - } -} - -server { - listen 80; - server_name waste.dev.xplwd.com; - return 301 https://$host$request_uri; -} diff --git a/web/config.example.js b/web/config.example.js deleted file mode 100644 index 17192c3..0000000 --- a/web/config.example.js +++ /dev/null @@ -1,7 +0,0 @@ -// Copy to config.js (gitignored) on the anchor host. -// Served at /config.js; loaded before the React bundle in index.html. -window.WASTE_CONFIG = { - signalURL: 'wss://waste.dev.xplwd.com/ws', - // Uncomment to pre-fill the network name on this invite URL: - // defaultNetwork: 'friends', -}