Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Jan 6, 2025
1 parent a113388 commit 64c0e3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webtrees/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ENV APACHE_RUN_USER=www-data \
# Global variables
ENV WEBTREES_HOME="/var2/www/webtrees"
WORKDIR $WEBTREES_HOME
# hadolint ignore=DL4006
# hadolint ignore=DL4006, SC2016
RUN \
# Change data location
grep -rl "/var/www/webtrees" /etc | xargs sed -i 's|/var/www/webtrees|/var2/www/webtrees|g' \
Expand Down Expand Up @@ -128,6 +128,9 @@ LABEL \
# 6 Healthcheck #
#################

# Avoid spamming logs with Apache
RUN if [ -d /etc/apache2/sites-available ]; then for file in /etc/apache2/sites-*/*.conf; do sed -i '/<VirtualHost/a # Match requests with the custom User-Agent "HealthCheck" \n SetEnvIf User-Agent "HealthCheck" dontlog \n # Exclude matching requests from access logs \n CustomLog ${APACHE_LOG_DIR}/access.log combined env=!dontlog' "$file"; done; fi

ENV HEALTH_PORT="80" \
HEALTH_URL=""
HEALTHCHECK \
Expand Down

0 comments on commit 64c0e3c

Please sign in to comment.