Spotify-tracker/README-deployment.md
RTSDA 3c37d91bc4 Add complete runit service configuration and deployment scripts
- 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
2025-08-20 09:26:24 -04:00

1.5 KiB

Spotify Tracker Deployment Guide

Quick Setup

  1. Clone and deploy:

    git clone <your-repo-url>
    cd spotify-tracker
    chmod +x deploy.sh
    sudo ./deploy.sh
    
  2. Configure Caddy:

    spotify.tougie.live {
      reverse_proxy localhost:8888
    }
    
  3. Update Spotify App Settings:

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 page
  • https://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

  1. Check service status: sv status spotify-tracker
  2. View logs: tail -f /var/log/spotify-tracker/current
  3. Restart service: sv restart spotify-tracker
  4. Check permissions: Ensure spotify-tracker user owns /opt/spotify-tracker