Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495#!/usr/bin/env fish# Deploy custom landing page to at.aesthetic.computer PDS# Usage: fish deploy-landing-page.fish
set LANDING_PAGE_LOCAL "../landing-page.html"set PDS_SERVER "root@138.197.35.160"set WEB_ROOT "/var/www/at.aesthetic.computer"set SSH_KEY "$HOME/.ssh/aesthetic_pds"
echo "๐ Deploying custom landing page to at.aesthetic.computer"echo ""
# Check if landing page existsif not test -f $LANDING_PAGE_LOCAL echo "โ Error: landing-page.html not found at $LANDING_PAGE_LOCAL" exit 1end
echo "๐ค Uploading landing page to PDS server..."
# SSH into server and create web root if it doesn't existssh -i $SSH_KEY $PDS_SERVER "mkdir -p $WEB_ROOT"
# Upload the landing pagescp -i $SSH_KEY $LANDING_PAGE_LOCAL "$PDS_SERVER:$WEB_ROOT/index.html"
if test $status -ne 0 echo "โ Failed to upload landing page" exit 1end
echo "โ
Landing page uploaded successfully"echo ""echo "๐ง Configuring Caddy to serve custom landing page..."
# SSH into server and update Caddyfilessh -i $SSH_KEY $PDS_SERVER ' # Backup existing Caddyfile cp /pds/Caddyfile /pds/Caddyfile.backup # Create new Caddyfile with custom landing page cat > /pds/Caddyfile << "EOF"{ email mail@aesthetic.computer}
# Main PDS subdomain with custom landing pageat.aesthetic.computer { # Serve custom landing page for root handle / { root * /var/www/at.aesthetic.computer file_server } # Proxy all other requests to PDS handle { reverse_proxy localhost:3000 }}
# Wildcard for user handles*.at.aesthetic.computer { reverse_proxy localhost:3000}
# Legacy pds subdomain (if used)pds.aesthetic.computer { reverse_proxy localhost:3000}
*.pds.aesthetic.computer { reverse_proxy localhost:3000}EOF # Reload Caddy docker exec caddy caddy reload --config /etc/caddy/Caddyfile'
if test $status -eq 0 echo "" echo "โ
Deployment complete!" echo "" echo "๐ Landing page: https://at.aesthetic.computer" echo "๐ Health check: https://at.aesthetic.computer/xrpc/_health" echo "๐ PDS admin: https://pds.aesthetic.computer" echo "" echo "Note: The landing page is served by Caddy at the root URL" echo " All /xrpc/* routes still go to the PDS backend"else echo "" echo "โ Deployment failed" exit 1end