mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Merge pull request #1926 from danez/healthcheck-pg
Add healthcheckscript for postgres
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
## 15.7-47 (24-06-2025)
|
||||
|
||||
- Fix healthcheck to run with correct user and database
|
||||
|
||||
## 15.7-46 (23-06-2025)
|
||||
|
||||
- Version 45 was erroneous : you need to restore prior to version 45 then update to 46 again. If you don't have a backup please create an issue in the github repo
|
||||
|
||||
@@ -121,4 +121,4 @@ HEALTHCHECK \
|
||||
--retries=5 \
|
||||
--start-period=90s \
|
||||
--timeout=25s \
|
||||
CMD pg_isready --dbname="${POSTGRES_DB}" --username="${POSTGRES_USER}" || exit 1
|
||||
CMD /usr/local/bin/healthcheck.sh
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
"slug": "postgres",
|
||||
"udev": true,
|
||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/postgres",
|
||||
"version": "15.7-46"
|
||||
"version": "15.7-47"
|
||||
}
|
||||
|
||||
7
postgres_15/rootfs/usr/local/bin/healthcheck.sh
Executable file
7
postgres_15/rootfs/usr/local/bin/healthcheck.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
POSTGRES_USER="$(bashio::config "POSTGRES_USER" "postgres")"
|
||||
POSTGRES_DB="$(bashio::config "POSTGRES_DB" "$POSTGRES_USER")"
|
||||
|
||||
pg_isready --dbname="${POSTGRES_DB}" --username="${POSTGRES_USER}" || exit $?;
|
||||
@@ -1,3 +1,7 @@
|
||||
## 17.4-9 (24-06-2025)
|
||||
|
||||
- Fix healthcheck to run with correct user and database
|
||||
|
||||
## 17.4-8 (23-06-2025)
|
||||
|
||||
- Version 5, 6 and 7 had an issue : you need to restore prior to version 45 then update to 46 again. If you don't have a backup please create an issue in the github repo
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
"slug": "postgres_latest",
|
||||
"udev": true,
|
||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/postgres",
|
||||
"version": "17.4-8"
|
||||
"version": "17.4-9"
|
||||
}
|
||||
|
||||
7
postgres_17/rootfs/usr/local/bin/healthcheck.sh
Executable file
7
postgres_17/rootfs/usr/local/bin/healthcheck.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
POSTGRES_USER="$(bashio::config "POSTGRES_USER" "postgres")"
|
||||
POSTGRES_DB="$(bashio::config "POSTGRES_DB" "$POSTGRES_USER")"
|
||||
|
||||
pg_isready --dbname="${POSTGRES_DB}" --username="${POSTGRES_USER}" || exit $?;
|
||||
Reference in New Issue
Block a user