# Deployment Script This directory contains a deployment script for the Phone project to a Raspberry Pi. ## File: deploy.ts A Bun-based deployment script that automates copying files to a Raspberry Pi and managing systemd services. ### Configuration - **Target Host**: `phone.local` - **Target Directory**: `/home/corey/phone` ### What It Does 1. **Creates directory** on the Pi at the configured path 2. **Copies files** from local `pi/` directory to the Pi 3. **Sets permissions** to make all TypeScript files executable 4. **Bootstrap (optional)**: If `--bootstrap` flag is passed, runs `bootstrap.ts` on the Pi with sudo 5. **Service management**: - Checks if `phone-ap.service` and `phone-web.service` exist - If they exist, restarts both services - If they don't exist and bootstrap wasn't run, warns the user ### Usage **Standard deployment** (just copy files and restart services): ```bash bun deploy.ts ``` **First-time deployment** (copy files + run bootstrap): ```bash bun deploy.ts --bootstrap ``` ### Services The script manages two systemd services: - `phone-ap.service` - Access point service - `phone-web.service` - Web interface service ### Access After deployment, the Pi is accessible at: - **Web URL**: http://phone.local - **WiFi Network**: phone-setup ### Requirements - Bun runtime - SSH access to `phone.local` - Local `pi/` directory with files to deploy