mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
28 lines
715 B
Ruby
28 lines
715 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Controller for the application status, useful for debugging
|
|
class HealthController < ActionController::Base
|
|
respond_to :json
|
|
|
|
def status
|
|
require 'version'
|
|
|
|
render json: {
|
|
name: 'Fab-manager',
|
|
status: 'running',
|
|
dependencies: {
|
|
postgresql: HealthService.database?,
|
|
redis: HealthService.redis?,
|
|
elasticsearch: HealthService.elasticsearch?
|
|
},
|
|
up_to_date: {
|
|
migrations: HealthService.migrations?,
|
|
version: Version.up_to_date?
|
|
},
|
|
stats: HealthService.stats,
|
|
tagline: 'The platform to manage your fablab or your coworking space.',
|
|
url: 'https://www.fab-manager.com'
|
|
}
|
|
end
|
|
end
|