From f8ac55142354844e46be96c023e5cf6f07f62ffa Mon Sep 17 00:00:00 2001 From: magdev Date: Sat, 6 May 2023 15:59:49 +0200 Subject: [PATCH] added simple healthcheck route --- app/controllers/healthcheck_controller.rb | 9 +++++++++ app/views/healthcheck/index.html.erb | 1 + config/routes.rb | 1 + 3 files changed, 11 insertions(+) create mode 100755 app/controllers/healthcheck_controller.rb create mode 100644 app/views/healthcheck/index.html.erb diff --git a/app/controllers/healthcheck_controller.rb b/app/controllers/healthcheck_controller.rb new file mode 100755 index 0000000..1bc0ce6 --- /dev/null +++ b/app/controllers/healthcheck_controller.rb @@ -0,0 +1,9 @@ +class HealthcheckController < ApplicationController + unloadable + + skip_before_action :check_if_login_required + + def index + render :layout => false, :action => 'index' + end +end diff --git a/app/views/healthcheck/index.html.erb b/app/views/healthcheck/index.html.erb new file mode 100644 index 0000000..d86bac9 --- /dev/null +++ b/app/views/healthcheck/index.html.erb @@ -0,0 +1 @@ +OK diff --git a/config/routes.rb b/config/routes.rb index 67d9340..20723fa 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,6 @@ if Redmine::Plugin.installed? :baupm_core RedmineApp::Application.routes.draw do get '/manifest.json', :controller => 'manifest', :action => 'index', :as => 'manifest_json' + get '/healthcheck', :controller => 'healthcheck', :action => 'index', :as => 'healthcheck' end end