From b2c5178f293942aa939c011a4effb48bb1659b4d Mon Sep 17 00:00:00 2001 From: Louis Garret <44805843+LouisGarret@users.noreply.github.com> Date: Fri, 28 Aug 2026 10:33:11 +0200 Subject: [PATCH] Add lgarret/health-check-bundle 1.0 recipe (#2035) --- .../1.0/config/packages/health_check.yaml | 11 ++++++++ .../1.0/config/routes/health_check.yaml | 3 +++ lgarret/health-check-bundle/1.0/manifest.json | 26 +++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 lgarret/health-check-bundle/1.0/config/packages/health_check.yaml create mode 100644 lgarret/health-check-bundle/1.0/config/routes/health_check.yaml create mode 100644 lgarret/health-check-bundle/1.0/manifest.json diff --git a/lgarret/health-check-bundle/1.0/config/packages/health_check.yaml b/lgarret/health-check-bundle/1.0/config/packages/health_check.yaml new file mode 100644 index 00000000..5e59a05b --- /dev/null +++ b/lgarret/health-check-bundle/1.0/config/packages/health_check.yaml @@ -0,0 +1,11 @@ +health_check: + path: '/health' + secret: '%env(HEALTH_CHECK_SECRET)%' + header: 'Authorization' + timeout: 5 + cache: + enabled: true + ttl: 300 + checks: + doctrine: true + asset_mapper: true diff --git a/lgarret/health-check-bundle/1.0/config/routes/health_check.yaml b/lgarret/health-check-bundle/1.0/config/routes/health_check.yaml new file mode 100644 index 00000000..efdf9682 --- /dev/null +++ b/lgarret/health-check-bundle/1.0/config/routes/health_check.yaml @@ -0,0 +1,3 @@ +health_check: + resource: . + type: health_check diff --git a/lgarret/health-check-bundle/1.0/manifest.json b/lgarret/health-check-bundle/1.0/manifest.json new file mode 100644 index 00000000..5edc78fe --- /dev/null +++ b/lgarret/health-check-bundle/1.0/manifest.json @@ -0,0 +1,26 @@ +{ + "bundles": { + "Lgarret\\HealthCheckBundle\\HealthCheckBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "HEALTH_CHECK_SECRET": "!ChangeMe!" + }, + "post-install-output": [ + " * The health check endpoint is exposed at /health.", + "", + " * Replace the HEALTH_CHECK_SECRET placeholder in .env with a real value.", + " Callers sending it in the Authorization header get the detailed check results;", + " everyone else only sees the global status.", + "", + " * If your firewall covers every path, grant it anonymous access in config/packages/security.yaml:", + " access_control:", + " - { path: ^/health$, roles: PUBLIC_ACCESS }", + "", + " * Enable, disable and tune the checks in config/packages/health_check.yaml.", + "", + " * Docs: https://github.com/LouisGarret/health-check-bundle" + ] +}