Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
2.5 kB · 77 lines
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778#!/usr/bin/env fish# Deploy Aesthetic Computer PDS to DigitalOcean# This script wraps the bash deployment script with vault environment loading
# Get script directoryset SCRIPT_DIR (dirname (status --current-filename))set VAULT_DIR (cd "$SCRIPT_DIR/../../../../aesthetic-computer-vault" && pwd)set AT_DIR (cd "$SCRIPT_DIR/../.." && pwd)
echo "╔════════════════════════════════════════════════════════╗"echo "║ Aesthetic Computer PDS Deployment (Fish) ║"echo "╚════════════════════════════════════════════════════════╝"echo ""
# Load vault environment using bash-style formatif test -f "$VAULT_DIR/at/deploy.env" echo "✓ Loading deployment config from vault..." # Parse bash-style env file for Fish for line in (cat "$VAULT_DIR/at/deploy.env" | grep -v '^#' | grep -v '^$') set -l parts (string split '=' -- $line) if test (count $parts) -ge 2 set -gx $parts[1] (string join '=' -- $parts[2..-1]) end endelse echo "✗ Vault deployment config not found: $VAULT_DIR/at/deploy.env" exit 1end
# Check for SMTP configurationif test -z "$SMTP_URL" echo "" echo "⚠️ SMTP not configured!" echo "" echo "You need to configure SMTP for email verification." echo "Edit: $VAULT_DIR/at/deploy.env" echo "" echo "Recommended: Use Resend (free tier, 3k emails/month)" echo " 1. Sign up: https://resend.com" echo " 2. Get API key" echo " 3. Add to deploy.env:" echo " SMTP_URL=smtps://resend:YOUR_KEY@smtp.resend.com:465/" echo "" read -P "Continue without SMTP? (y/N) " -n 1 confirm echo "" if test "$confirm" != "y" -a "$confirm" != "Y" exit 1 endend
# Export variables for bash scriptexport DO_TOKENexport SPACES_KEYexport SPACES_SECRETexport PDS_HOSTNAMEexport PDS_ADMIN_EMAILexport SPACES_REGIONexport SPACES_BUCKETexport SPACES_ENDPOINTexport DROPLET_NAMEexport DROPLET_SIZEexport DROPLET_IMAGEexport DROPLET_REGIONexport SMTP_URLexport SMTP_FROM_ADDRESSexport BACKUP_BUCKETexport ALERT_EMAIL
# Run the bash deployment scriptecho ""echo "→ Starting deployment..."echo ""
# Set auto-confirm for non-interactive modeset -x AUTO_CONFIRM yes
bash "$SCRIPT_DIR/deploy.sh" $argv