diff --git a/drupal-core/template.tf b/drupal-core/template.tf index 6fe158c..b745b0e 100644 --- a/drupal-core/template.tf +++ b/drupal-core/template.tf @@ -1339,6 +1339,8 @@ resource "coder_app" "ddev-web" { subdomain = true share = "owner" + # Healthy when ddev is running and the web server responds (any 2xx/3xx). + # Lights up as soon as `ddev start` completes, before Drupal is installed. healthcheck { url = "http://localhost:80" interval = 10 @@ -1346,6 +1348,27 @@ resource "coder_app" "ddev-web" { } } +resource "coder_app" "drupal-site" { + agent_id = coder_agent.main.id + slug = "drupal-site" + display_name = "Drupal Site" + order = 2 + url = "http://localhost:80" + icon = "https://api.iconify.design/heroicons:check-circle.svg?color=white" + subdomain = true + share = "owner" + + # Healthy only when Drupal returns 200. /user/login returns 500 when the + # database isn't set up (before drush si) and 200 when Drupal is fully + # installed — giving a "site is actually working" indicator distinct from + # "web server is up". + healthcheck { + url = "http://localhost:80/user/login" + interval = 10 + threshold = 3 + } +} + # Note: JetBrains IDEs (PhpStorm, GoLand, WebStorm, etc.) are supported via JetBrains Gateway # Users should install JetBrains Gateway locally and use the Coder plugin to connect # No explicit app definitions needed - coder-login module enables Gateway support