2023-12-07 18:06:32 +00:00
< form wire : submit = 'submit' class = " flex flex-col " >
2023-09-22 13:29:19 +00:00
< div class = " flex items-center gap-2 " >
2023-09-24 08:32:41 +00:00
< h2 > Healthchecks </ h2 >
2025-08-26 08:27:31 +00:00
< x - forms . button canGate = " update " : canResource = " $resource " type = " submit " > Save </ x - forms . button >
2025-09-29 04:37:47 +00:00
@ if ( ! $resource -> health_check_enabled )
< x - modal - confirmation title = " Confirm Healthcheck Enable? " buttonTitle = " Enable Healthcheck "
submitAction = " toggleHealthcheck " : actions = " ['Enable healthcheck for this resource.'] "
warningMessage = " If the health check fails, your application will become inaccessible. Please review the <a href='https://coolify.io/docs/knowledge-base/health-checks' target='_blank' class='underline text-white'>Health Checks</a> guide before proceeding! "
step2ButtonText = " Enable Healthcheck " : confirmWithText = " false " : confirmWithPassword = " false "
isHighlightedButton >
</ x - modal - confirmation >
@ else
< x - forms . button canGate = " update " : canResource = " $resource " wire : click = " toggleHealthcheck " > Disable Healthcheck </ x - forms . button >
@ endif
2023-09-22 13:29:19 +00:00
</ div >
2025-09-29 04:47:30 +00:00
< div class = " mt-1 pb-4 " > Define how your resource ' s health should be checked .</ div >
2023-09-22 13:29:19 +00:00
< div class = " flex flex-col gap-4 " >
2024-04-29 11:33:28 +00:00
@ if ( $resource -> custom_healthcheck_found )
2025-09-29 04:47:30 +00:00
< x - callout type = " warning " title = " Caution " >
< p > A custom health check has been detected . If you enable this health check , it will disable the custom one and use this instead .</ p >
</ x - callout >
2024-04-29 11:33:28 +00:00
@ endif
2023-10-01 16:14:13 +00:00
< div class = " flex gap-2 " >
2025-09-29 03:05:02 +00:00
< x - forms . select canGate = " update " : canResource = " $resource " id = " resource.health_check_method " label = " Method " required >
< option value = " GET " > GET </ option >
< option value = " POST " > POST </ option >
</ x - forms . select >
2025-09-29 03:07:53 +00:00
< x - forms . select canGate = " update " : canResource = " $resource " id = " resource.health_check_scheme " label = " Scheme " required >
< option value = " http " > http </ option >
< option value = " https " > https </ option >
</ x - forms . select >
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $resource " id = " resource.health_check_host " placeholder = " localhost " label = " Host " required />
< x - forms . input canGate = " update " : canResource = " $resource " type = " number " id = " resource.health_check_port "
2023-10-01 16:14:13 +00:00
helper = " If no port is defined, the first exposed port will be used. " placeholder = " 80 " label = " Port " />
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $resource " id = " resource.health_check_path " placeholder = " /health " label = " Path " required />
2023-10-01 16:14:13 +00:00
</ div >
< div class = " flex gap-2 " >
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $resource " type = " number " id = " resource.health_check_return_code " placeholder = " 200 " label = " Return Code "
2024-04-29 11:33:28 +00:00
required />
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $resource " id = " resource.health_check_response_text " placeholder = " OK " label = " Response Text " />
2023-10-01 16:14:13 +00:00
</ div >
< div class = " flex gap-2 " >
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $resource " min = " 1 " type = " number " id = " resource.health_check_interval " placeholder = " 30 "
2025-06-25 08:56:35 +00:00
label = " Interval (s) " required />
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $resource " type = " number " id = " resource.health_check_timeout " placeholder = " 30 " label = " Timeout (s) "
2024-04-29 10:54:36 +00:00
required />
2025-08-26 08:27:31 +00:00
< x - forms . input canGate = " update " : canResource = " $resource " type = " number " id = " resource.health_check_retries " placeholder = " 3 " label = " Retries " required />
< x - forms . input canGate = " update " : canResource = " $resource " min = 1 type = " number " id = " resource.health_check_start_period " placeholder = " 30 "
2024-10-22 10:05:36 +00:00
label = " Start Period (s) " required />
2023-10-01 16:14:13 +00:00
</ div >
2023-09-22 13:29:19 +00:00
</ div >
2025-08-26 08:27:31 +00:00
</ form >