Skip to content

Commit

Permalink
fix(postgres): fix invalid healthcheck (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
akantcheff authored Nov 22, 2023
1 parent fc868c4 commit 258e16e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion postgres/15/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ VOLUME /opt/bonita/dump
COPY 0_init-databases.sql /docker-entrypoint-initdb.d/0_init-databases.sql
COPY 1_update-postgresql-conf.sh /docker-entrypoint-initdb.d/1_update-postgresql-conf.sh
COPY 2_restore_dump.sh /docker-entrypoint-initdb.d/2_restore_dump.sh
COPY healthcheck.sh /usr/local/bin/healthcheck.sh
COPY --chmod=755 healthcheck.sh /usr/local/bin/healthcheck.sh

HEALTHCHECK --interval=5s --retries=120 CMD ["/usr/local/bin/healthcheck.sh"]
7 changes: 4 additions & 3 deletions postgres/15/healthcheck.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ if [ -f /var/lib/postgresql/restore.inProgress ]; then
exit 1
fi

user="${POSTGRES_USER:-bonita}"
db="${POSTGRES_DB:-$user}"
export PGPASSWORD="${POSTGRES_PASSWORD:-bpm}"
host="$(hostname -i || echo '127.0.0.1')"
user="bonita"
db="bonita"
export PGPASSWORD="bpm"

args=(
# force postgres to not use the local unix socket (test "external" connectivity)
Expand Down

0 comments on commit 258e16e

Please sign in to comment.