
- Add runit service files for spotify-tracker daemon - Include log service configuration with svlogd - Create automated deploy.sh script for server setup - Add comprehensive deployment documentation - Service runs as dedicated spotify-tracker user - Includes service management commands and troubleshooting guide
1.5 KiB
1.5 KiB
Spotify Tracker Deployment Guide
Quick Setup
-
Clone and deploy:
git clone <your-repo-url> cd spotify-tracker chmod +x deploy.sh sudo ./deploy.sh
-
Configure Caddy:
spotify.tougie.live { reverse_proxy localhost:8888 }
-
Update Spotify App Settings:
- Go to https://developer.spotify.com/dashboard
- Set redirect URI to:
https://spotify.tougie.live
Service Management
# Check service status
sv status spotify-tracker
# Start/stop/restart service
sv start spotify-tracker
sv stop spotify-tracker
sv restart spotify-tracker
# View logs
tail -f /var/log/spotify-tracker/current
API Endpoints
After deployment, these endpoints will be available:
https://spotify.tougie.live/auth
- OAuth setup pagehttps://spotify.tougie.live/current
- Current track (JSON)https://spotify.tougie.live/phantombot
- Current track (text for PhantomBot)https://spotify.tougie.live/health
- Health check
Configuration
The service runs as user spotify-tracker
and stores:
- Config:
/home/spotify-tracker/.config/spotify-tracker/
- Logs:
/var/log/spotify-tracker/
- Binary:
/opt/spotify-tracker/target/release/spotify-tracker
Troubleshooting
- Check service status:
sv status spotify-tracker
- View logs:
tail -f /var/log/spotify-tracker/current
- Restart service:
sv restart spotify-tracker
- Check permissions: Ensure
spotify-tracker
user owns/opt/spotify-tracker