From 5d0dfad522a767a1e02cdde117c2301585b3093b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 5 Dec 2024 12:01:48 +0100 Subject: [PATCH] Update Dockerfile --- postgres/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 1b071002c..053600694 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -72,7 +72,8 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh" RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh -RUN chmod 777 /docker-entrypoint-initdb.d/* +RUN chmod 777 /docker-entrypoint-initdb.d/* && \ + sed -i "/Termination signal received/a trap 'gosu postgres pg_ctl -D \"\$PGDATA\" -m fast stop' SIGTERM SIGINT" /ha_entrypoint.sh WORKDIR /config ENTRYPOINT [ "/usr/bin/env" ]