Skip to content

Commit

Permalink
make healthchecks silent
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 committed Dec 28, 2022
1 parent 4750fb2 commit 7514100
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Containers/apache/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

curl -skfI localhost:8000 || exit 1
nc -z localhost 8000 || exit 1
if [ "$APACHE_PORT" != '443' ]; then
nc -z localhost "$APACHE_PORT" || exit 1
else
Expand Down
3 changes: 2 additions & 1 deletion Containers/clamav/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Probably from this file: https://github.com/Cisco-Talos/clamav/blob/main/Dockerfile
# Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/0.105/alpine/Dockerfile
FROM clamav/clamav:0.105.1-7

RUN apk add --update --no-cache tzdata
COPY clamav.conf /tmp/
RUN cat /tmp/clamav.conf >> /etc/clamav/clamd.conf
HEALTHCHECK --start-period=6m CMD clamdcheck.sh &> /dev/null || exit 1
2 changes: 1 addition & 1 deletion Containers/fulltextsearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ FROM elasticsearch:7.17.8

RUN elasticsearch-plugin install --batch ingest-attachment

HEALTHCHECK CMD curl -skfI localhost:9200 || exit 1
HEALTHCHECK CMD nc -z localhost 9200 || exit 1
2 changes: 1 addition & 1 deletion Containers/onlyoffice/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile
FROM onlyoffice/documentserver:7.2.2.56

HEALTHCHECK CMD curl -skfI localhost || exit 1
HEALTHCHECK CMD nc -z localhost 80 || exit 1
2 changes: 1 addition & 1 deletion Containers/postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
USER postgres
ENTRYPOINT ["start.sh"]

HEALTHCHECK CMD psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "select now()" || exit 1
HEALTHCHECK CMD psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "select now()" &> /dev/null|| exit 1
2 changes: 1 addition & 1 deletion Containers/redis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd
USER redis
ENTRYPOINT ["start.sh"]

HEALTHCHECK CMD redis-cli -a $REDIS_HOST_PASSWORD PING || exit 1
HEALTHCHECK CMD redis-cli -a $REDIS_HOST_PASSWORD PING &> /dev/null || exit 1

0 comments on commit 7514100

Please sign in to comment.