Standalone Dashboard

Run the Rails Pulse dashboard as a separate process on the same infrastructure, keeping the dashboard available independently of your main app.

Running on Kubernetes or need full infrastructure isolation? This page covers running the dashboard as a separate process on the same server. For running Rails Pulse on completely separate infrastructure — including Kubernetes sidecar and isolated deployment patterns — see Separate Dashboard.

Overview

For production environments, you can run the Rails Pulse dashboard as a standalone process, completely separate from your main Rails app. This provides several benefits:

  • Dashboard remains accessible when main app is under heavy load
  • Separate resource allocation for monitoring vs application
  • Enhanced security — isolate dashboard access from your public app
  • Independent scaling — dashboard doesn’t scale with your app instances

Quick Start

# Option 1: Set DATABASE_URL environment variable (recommended for production)
export DATABASE_URL="postgresql://user:pass@host/db"
bundle exec rails_pulse_server

# Option 2: Use config/database.yml (recommended for development)
# Looks for 'rails_pulse' connection, falls back to primary
bundle exec rails_pulse_server

The standalone server starts on port 3001 by default.

Read-Only Mode: When running standalone, the dashboard is read-only and doesn’t track its own requests. Tracking is automatically disabled.

Healthcheck Endpoint

The standalone server includes a /health endpoint that verifies database connectivity:

curl http://localhost:3001/health
# Returns: {"status":"ok","mode":"dashboard","database":"connected","timestamp":"..."}

This is useful for load balancers, uptime monitors, and deployment health checks.

Deployment Options

Proxy the standalone server behind nginx on a dedicated subdomain:

server {
    server_name pulse.myapp.com;
    location / {
        proxy_pass http://localhost:3001;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Kamal Deployment

Deploy the dashboard as a Kamal accessory using the same application image:

# config/deploy.yml
accessories:
  rails_pulse:
    image: your-app-image  # Same image as your main app
    host: your-server
    cmd: bundle exec rails_pulse_server
    env:
      clear:
        DATABASE_URL: "postgresql://user:pass@host/db"
        RAILS_ENV: production
        SECRET_KEY_BASE: <%= ENV.fetch("SECRET_KEY_BASE") %>
    port: "3001:3001"
    healthcheck:
      path: /health
      port: 3001
      interval: 10s
      timeout: 5s

Authentication

The standalone dashboard respects your Rails Pulse authentication configuration. Ensure your config/initializers/rails_pulse.rb is present in the deployed image with the correct authentication_method configured.

See the Authentication documentation for setup instructions.

Next Steps

  • Database Setup — Configure a dedicated Rails Pulse database for use with the standalone server
  • Authentication — Secure your standalone dashboard