File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33class HealthController < ActionController ::API
4+ # Skip authentication and authorization for health checks
5+ skip_before_action :verify_authenticity_token , raise : false
6+
47 # Simple health check that doesn't check database
58 def index
69 render json : {
710 status : 'ok' ,
811 timestamp : Time . current . iso8601 ,
9- environment : Rails . env
10- }
12+ environment : Rails . env ,
13+ service : 'ProStaff API'
14+ } , status : :ok
1115 end
1216
1317 # Detailed health check with database verification
@@ -18,6 +22,7 @@ def show
1822 status : database_status ? 'ok' : 'degraded' ,
1923 timestamp : Time . current . iso8601 ,
2024 environment : Rails . env ,
25+ service : 'ProStaff API' ,
2126 database : database_status ? 'connected' : 'disconnected'
2227 } , status : database_status ? :ok : :service_unavailable
2328 end
Original file line number Diff line number Diff line change 1+ # Railway Configuration for ProStaff API (Rails)
2+ [build ]
3+ builder = " dockerfile"
4+ dockerfilePath = " Dockerfile.production"
5+
6+ [deploy ]
7+ startCommand = " bundle exec puma -C config/puma.rb"
8+ healthcheckPath = " /health"
9+ healthcheckTimeout = 300
10+ restartPolicyType = " on_failure"
11+ restartPolicyMaxRetries = 3
You can’t perform that action at this time.
0 commit comments