From 7dc34ef1275eeffad4f5b6a1a606b626608ad9d8 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sat, 5 Oct 2024 21:18:26 +0900 Subject: [PATCH] add /up route and fly health check --- config/routes.rb | 2 ++ fly.toml | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/config/routes.rb b/config/routes.rb index 79a76a13..27cc8101 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,5 +7,7 @@ end resources :stats, only: [:index] + get "up" => "rails/health#show" + root "feeds#new" end diff --git a/fly.toml b/fly.toml index b5bf3c5b..becff4af 100644 --- a/fly.toml +++ b/fly.toml @@ -26,6 +26,20 @@ console_command = "/rails/bin/rails console" cpus = 2 memory_mb = 1024 +[checks] + [checks.rails] + processes = ["app"] + grace_period = "30s" + interval = "15s" + method = "get" + path = "/up" + port = 3000 + timeout = "10s" + type = "http" + [checks.rails.headers] + Host = "feedyour.email" + X-Forwarded-Proto = "https" + [[statics]] guest_path = "/rails/public" url_prefix = "/"