Something went wrong. Try again.
standard.site frontend
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273#!/usr/bin/env bashset -euo pipefail
# One-time server setup for vibecode.rodeo on Ubuntu.# Run as root on a fresh DigitalOcean droplet.
APP_USER="vibecode"APP_DIR="/opt/vibecode"TANGLED_URL="https://tangled.org/did:plc:udtezrjybbshf2se24lykure"
# Install dependencies.apt-get updateapt-get install -y curl git nginx certbot python3-certbot-nginx
# Install Dart SDK.if ! command -v dart &> /dev/null; then echo "Installing Dart SDK..." apt-get install -y apt-transport-https sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' apt-get update apt-get install -y dartfi
# Create app user.if ! id "$APP_USER" &>/dev/null; then useradd --system --create-home --home-dir "$APP_DIR" "$APP_USER"fi
# Clone or update app code.if [ -d "$APP_DIR/.git" ]; then echo "Updating existing repository..." cd "$APP_DIR" git pull "$TANGLED_URL" mainelse echo "Cloning repository from Tangled..." git clone "$TANGLED_URL" "$APP_DIR" chown -R "$APP_USER:$APP_USER" "$APP_DIR"fi
git config --global --add safe.directory "$APP_DIR" 2>/dev/null || true
cd "$APP_DIR"
git config --global --add safe.directory "$APP_DIR" 2>/dev/null || true
# Ensure vibecode owns the app directory before installing deps.chown -R "$APP_USER:$APP_USER" "$APP_DIR"
# Install Dart dependencies.sudo -u "$APP_USER" /usr/lib/dart/bin/dart pub get
# Install systemd service.cp deploy/vibecode.service /etc/systemd/system/vibecode.servicesystemctl daemon-reloadsystemctl enable vibecode
# Install nginx config.cp deploy/nginx.conf /etc/nginx/sites-available/vibecodeif [ ! -e /etc/nginx/sites-enabled/vibecode ]; then ln -s /etc/nginx/sites-available/vibecode /etc/nginx/sites-enabled/vibecodefirm -f /etc/nginx/sites-enabled/defaultnginx -tsystemctl reload nginx
echo ""echo "Setup complete. Next steps:"echo " 1. Copy config/site.example.yaml to config/site.yaml and fill it in."echo " 2. Run 'vibecode init' to create the publication record."echo " 3. Obtain TLS certificate: certbot --nginx -d vibecode.rodeo"echo " 4. Start the service: systemctl start vibecode"