deploy-rails-client

Deploy the shot-client-next frontend to Fly.io using RAILS BACKEND configuration (shot-client-next app). Use this skill ONLY when specifically deploying to the legacy Rails backend at shot-counter.fly.dev.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill automates the deployment of the shot-client-next frontend to Fly.io, specifically optimized for legacy Ruby on Rails backend configurations. It streamlines the CI/CD process by managing environment variables, build verification, and Fly.io CLI commands to ensure seamless integration with ActionCable and legacy API endpoints at shot-counter.fly.dev.

Use Cases

  • 1. Legacy System Maintenance: Deploying frontend updates that must remain compatible with an existing Ruby on Rails backend infrastructure.
  • 2. Automated Cloud Deployment: Streamlining the Fly.io deployment workflow for Next.js applications using predefined configuration files and shell scripts.
  • 3. Environment-Specific Configuration: Ensuring correct WebSocket (ActionCable) and API URL settings are automatically applied during the build and deployment phase.
  • 4. Developer Productivity: Reducing manual errors by automating multi-step CLI deployment processes, including build checks, deployment execution, and health verification.
namedeploy-rails-client
descriptionDeploy the shot-client-next frontend to Fly.io using RAILS BACKEND configuration (shot-client-next app). Use this skill ONLY when specifically deploying to the legacy Rails backend at shot-counter.fly.dev.

Deploy Rails Frontend Client to Fly.io

⚠️ IMPORTANT: This deploys to the LEGACY RAILS backend configuration

This skill deploys the Next.js frontend configured to connect to the Ruby on Rails backend at shot-counter.fly.dev.

  • Fly.io App: shot-client-next
  • Config File: fly.toml
  • Backend: Rails (shot-counter.fly.dev) - LEGACY
  • WebSocket: ActionCable at wss://shot-counter.fly.dev/cable
  • Environment: No NEXT_PUBLIC_BACKEND_TYPE (defaults to Rails)

⚠️ When NOT to Use This Skill

DO NOT use this skill for:

  • Regular production deployments (use deploy-phoenix-client instead)
  • User says "deploy the frontend" without specifying Rails
  • User says "deploy to production"

ONLY use this skill when:

  • User explicitly says "deploy to Rails client"
  • User explicitly says "deploy with Rails backend"
  • Testing Rails backend compatibility
  • User specifically mentions shot-client-next app

Quick Deployment

cd /Users/isaacpriestley/tech/isaacpriestley/chi-war/shot-client-next
./deploy_rails.sh

Manual Deployment Steps

# Navigate to shot-client-next
cd /Users/isaacpriestley/tech/isaacpriestley/chi-war/shot-client-next

# Verify build succeeds
npm run build

# Deploy to Fly.io with Rails configuration
fly deploy --app shot-client-next -c fly.toml

# Monitor deployment
fly logs --app shot-client-next

# Verify health
curl https://shot-client-next.fly.dev

Environment Variables (fly.toml)

These are configured in the build args:

  • NEXT_PUBLIC_API_BASE_URL=https://shot-counter.fly.dev
  • NEXT_PUBLIC_SERVER_URL=https://shot-counter.fly.dev
  • NEXT_PUBLIC_WEBSOCKET_URL=wss://shot-counter.fly.dev
  • NO NEXT_PUBLIC_BACKEND_TYPE (defaults to Rails)

Post-Deployment Verification

After deployment, verify:

  1. WebSocket connection uses ActionCable /cable endpoint
  2. Check browser console for ActionCable connection messages
  3. API calls go to shot-counter.fly.dev
  4. Rails backend is running and responding
  • deploy-phoenix-client - Deploy frontend with Phoenix backend (PRIMARY/PRODUCTION)
  • deploy-shot-elixir - Deploy the Phoenix/Elixir backend