From 0545bffa176f2b05db93794b35da53b064bc74f5 Mon Sep 17 00:00:00 2001 From: Damien Sorel Date: Thu, 23 Apr 2026 23:13:03 +0200 Subject: [PATCH 1/2] Add MariaDB healthcheck --- compose.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index 43b68f4..7252446 100644 --- a/compose.yaml +++ b/compose.yaml @@ -15,7 +15,8 @@ services: ports: - ${piwigo_port}:80 depends_on: - - piwigo-db + piwigo-db: + condition: service_healthy volumes: - ./piwigo-data/piwigo:/var/www/html/piwigo/ - ./piwigo-data/scripts:/usr/local/bin/scripts/ @@ -29,6 +30,12 @@ services: # Defined in .env - MARIADB_PASSWORD=${db_user_password} - TZ=${timezone} + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + start_period: 10s + interval: 10s + timeout: 5s + retries: 3 networks: - piwigo-network volumes: From ce137cb75c3741353591d1fc3c1eae482113606a Mon Sep 17 00:00:00 2001 From: Damien Sorel Date: Sat, 23 May 2026 15:41:48 +0200 Subject: [PATCH 2/2] Add server healthcheck --- compose.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compose.yaml b/compose.yaml index 7252446..b78a7e5 100644 --- a/compose.yaml +++ b/compose.yaml @@ -10,6 +10,12 @@ services: - TZ=${timezone} - PIWIGO_UID=${PIWIGO_UID} - PIWIGO_GID=${PIWIGO_GID} + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:80/index.php || exit 1"] + start_period: 30s + interval: 10s + timeout: 5s + retries: 3 networks: - piwigo-network ports: @@ -31,7 +37,7 @@ services: - MARIADB_PASSWORD=${db_user_password} - TZ=${timezone} healthcheck: - test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + test: ["CMD-SHELL", "healthcheck.sh --connect --innodb_initialized"] start_period: 10s interval: 10s timeout: 5s