Skip to content

Commit 9501ba8

Browse files
committed
refactor: Use the webhook_healthcheck instead of /
1 parent 6f74685 commit 9501ba8

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • workflow/deployer-workflow/impl-flyio/src

workflow/deployer-workflow/impl-flyio/src/lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const OBELISK_TOML_PATH: &str = formatcp!("{VOLUME_MOUNT_PATH}/obelisk.toml");
4444
const OBELISK_BIN_PATH: &str = "/obelisk/obelisk";
4545
const REGION: Region = Region::Ams;
4646
const WEBHOOK_PORT: u16 = 9090;
47+
const DEPLOYED_HEALTHCHECK_PATH: &str = "/obeliskhealthcheck";
4748

4849
fn 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" }}
383385
enabled = true
384386
level = "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]]
387395
name = "{WEBHOOK_SERVER_NAME}"
388396
listening_addr = "0.0.0.0:{WEBHOOK_PORT}"

0 commit comments

Comments
 (0)