From b86e853b53ec84d2b746d403bbcfeb51177636e1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 3 Dec 2024 22:46:11 +0100 Subject: [PATCH] Test --- postgres/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/postgres/Dockerfile b/postgres/Dockerfile index c296766f0..65a5ffb27 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -74,12 +74,12 @@ RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif. RUN chmod 777 /docker-entrypoint-initdb.d/* && \ # Close gracefully - sed -i "2s|^|trap 'echo \"Received SIGTERM, shutting down PostgreSQL...\"; gosu postgres pg_ctl -D \"\$PGDATA\" -m fast stop; exit 0' SIGTERM\n|" /ha_entrypoint.sh + sed -i "1s|^|#!/usr/bin/env bashio\n|" /ha_entrypoint.sh && \ + sed -i "2s|^|trap 'echo \"Received SIGTERM, shutting down PostgreSQL...\"; gosu postgres pg_ctl -D \"\$PGDATA\" -m fast stop; exit 0' SIGTERM\n|" /ha_entrypoint.sh && \ + echo -e "\n# Simulate long-running process to allow signal handling\nwhile true; do\n sleep 1\ndone" >> /ha_entrypoint.sh WORKDIR /config -ENTRYPOINT [ "/usr/bin/env" ] -CMD [ "/ha_entrypoint.sh" ] -SHELL ["/bin/bash", "-o", "pipefail", "-c"] +ENTRYPOINT [ "/ha_entrypoint.sh" ] ############ # 5 Labels #