56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
# 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. **Copies files** from here to the pi (in ~/phone by default)
|
|
2. **Bootstrap (optional)**: If `--bootstrap` flag is passed it will bootstrap the pi with everything it needs
|
|
3. **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
|
|
|
|
```bash
|
|
bun scripts/deploy.ts
|
|
# or bun deploy.ts --bootstrap
|
|
>>>>>>> Stashed changes
|
|
```
|
|
|
|
### 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
|
|
|
|
### Local Requirements
|
|
|
|
- Bun runtime
|
|
<<<<<<< HEAD
|
|
<<<<<<< Updated upstream
|
|
- # SSH access to `yellow-phone.local`
|
|
- SSH access to `phone.local`
|
|
> > > > > > > 1c717a5b4772147c3b7ce20f512452f13c8cc510
|
|
- # Local `pi/` directory with files to deploy
|
|
- SSH access to `phone.local`
|
|
> > > > > > > Stashed changes
|