From c8da217e875c2371a8d1d13a678e2a811d906922 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 11 Sep 2025 09:43:28 +0200 Subject: Docker healthcheck (#7945) * Docker healthcheck fix https://github.com/FreshRSS/FreshRSS/issues/7377 * Use echo for non-CLI error * curl_close is deprecated * Connection: close * Update cli/health.php Co-authored-by: Frans de Jonge --------- Co-authored-by: Frans de Jonge --- Docker/README.md | 10 +++++++++- Docker/freshrss/docker-compose.yml | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'Docker') diff --git a/Docker/README.md b/Docker/README.md index 095c189c7..a641921c1 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -338,7 +338,7 @@ services: TZ: Europe/Paris # Cron job to refresh feeds at specified minutes CRON_MIN: '2,32' - # 'development' for additional logs; default is 'production' + # Optional 'development' for additional logs; default is 'production' FRESHRSS_ENV: development # Optional advanced parameter controlling the internal Apache listening port LISTEN: 0.0.0.0:80 @@ -372,6 +372,14 @@ services: --language en --password ${ADMIN_PASSWORD} --user admin + # Optional healthcheck + healthcheck: + test: ["CMD", "cli/health.php"] + timeout: 10s + start_period: 60s + start_interval: 11s + interval: 75s + retries: 3 ``` ### Docker Compose with PostgreSQL diff --git a/Docker/freshrss/docker-compose.yml b/Docker/freshrss/docker-compose.yml index e1f66179b..e9ff40240 100644 --- a/Docker/freshrss/docker-compose.yml +++ b/Docker/freshrss/docker-compose.yml @@ -23,3 +23,11 @@ services: TZ: Europe/Paris CRON_MIN: '3,33' TRUSTED_PROXY: 172.16.0.1/12 192.168.0.1/16 + # # Optional healthcheck section: + # healthcheck: + # test: ["CMD", "cli/health.php"] + # timeout: 10s + # start_period: 60s + # start_interval: 11s + # interval: 75s + # retries: 3 -- cgit v1.2.3