From 548dbc09fe7e90ebb1b0d022372a7378932ac0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9otime=20L=C3=A9v=C3=AAque?= Date: Fri, 22 Dec 2023 15:27:41 +0100 Subject: [PATCH] refactor(docker-entrypoint): remove unused DEBUG related references As the configuration is now defined at build time and overriden at runtime strictly through environment variables, it s not necessary anymore to capture config file changes as they become immutable. --- docker-entrypoint.sh | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 3eb60e3..56fb8df 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -15,11 +15,6 @@ TZ="${TZ:-UTC}" PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-256M}" UPLOAD_MAX_FILESIZE="${UPLOAD_MAX_FILESIZE:-8M}" -# If TRUE, outputs pre and post-change config files, if a /debug folder has also been mounted. -# i.e. - '/opt/docker/configs/linkstack/debug:/debug:rw' -# Useful for comparing (and fixing) changes, if necessary. -DEBUG="TRUE" - # Read Current LLC Version # When version.json has CR/LF, it fx up, so have to add tr to remove the line endings. v="$(cat /htdocs/version.json | tr -d '\r\n')" @@ -35,41 +30,11 @@ printf '| LINKSTACK v%s%*s|\n' "${v}" "$vlen" | tr ' ' " " # + ---------------- + # echo '+ ------------------------------------------------------------------ +' -echo '| Updating Configuration: Apache Base (/etc/apache2/httpd.conf) |' - -# ALTER: Server Admin, Name, Document Root. - -if [[ ${DEBUG} == "TRUE" && -d /debug ]]; then cp /etc/apache2/httpd.conf /debug/httpd.BEFORE.conf;fi - -if [[ ${DEBUG} == "TRUE" && -d /debug ]]; then cp /etc/apache2/httpd.conf /debug/httpd.AFTER.conf;fi - -# + -------------- + # -# | -- SSL.CONF -- | # -# + -------------- + # - -echo '| Updating Configuration: Apache SSL (/etc/apache2/conf.d/ssl.conf) |' - -# ALTER: SSL DocumentRoot and Log locations - -if [[ ${DEBUG} == "TRUE" && -d /debug ]]; then cp /etc/apache2/conf.d/ssl.conf /debug/ssl.BEFORE.conf;fi - -if [[ ${DEBUG} == "TRUE" && -d /debug ]]; then cp /etc/apache2/conf.d/ssl.conf /debug/ssl.AFTER.conf;fi - -# + ------------- + # -# | -- PHP.INI -- | # -# + ------------- + # - -echo '| Updating Configuration: PHP (/etc/php82/php.ini) |' - -if [[ ${DEBUG} == "TRUE" && -d /debug ]]; then cp /etc/php82/php.ini /debug/php.BEFORE.ini;fi - -if [[ ${DEBUG} == "TRUE" && -d /debug ]]; then cp /etc/php82/php.ini /debug/php.AFTER.ini;fi # + ---------- + # # | -- MISC -- | # # + ---------- + # -echo '| Updating Configuration: Complete |' echo '| ------------------------------------------------------------------ |' echo '| Running Apache |' echo '+ ------------------------------------------------------------------ +'