@@ -44,6 +44,7 @@ const OBELISK_TOML_PATH: &str = formatcp!("{VOLUME_MOUNT_PATH}/obelisk.toml");
4444const OBELISK_BIN_PATH : & str = "/obelisk/obelisk" ;
4545const REGION : Region = Region :: Ams ;
4646const WEBHOOK_PORT : u16 = 9090 ;
47+ const DEPLOYED_HEALTHCHECK_PATH : & str = "/obeliskhealthcheck" ;
4748
4849fn allocate_ip ( app_name : & str ) -> Result < ( ) , AppInitModifyError > {
4950 activity_fly_http:: ips:: allocate (
@@ -308,9 +309,10 @@ impl Guest for Component {
308309 // All preparation is done, start the final VM.
309310 launch_final_vm ( & app_name) ?;
310311
311- // TODO Add /obeliskhealthcheck to the exposed server.
312312 for _ in 0 ..max_healthcheck_attempts {
313- match http_get:: get_resp ( & format ! ( "https://{app_name}.fly.dev" ) ) {
313+ match http_get:: get_resp ( & format ! (
314+ "https://{app_name}.fly.dev{DEPLOYED_HEALTHCHECK_PATH}"
315+ ) ) {
314316 Ok ( http_get:: Response {
315317 status_code,
316318 body : _,
@@ -383,6 +385,12 @@ sqlite.pragma = {{ "cache_size" = "3000" }}
383385enabled = true
384386level = "WARN,obelisk=info"
385387
388+ [[webhook_endpoint]]
389+ name = "webhook_healthcheck"
390+ location.oci = "docker.io/getobelisk/components_flyio_webhook_healthcheck:2025-10-01@sha256:6fbc11b80b441ae6e642327b1ec0ceba85b2868d85dbce2d99d0d7b14a525c8c"
391+ http_server = "{WEBHOOK_SERVER_NAME}"
392+ routes = ["{DEPLOYED_HEALTHCHECK_PATH}"]
393+
386394[[http_server]]
387395name = "{WEBHOOK_SERVER_NAME}"
388396listening_addr = "0.0.0.0:{WEBHOOK_PORT}"
0 commit comments