diff --git a/.env.scripts b/.env.scripts index 57db1d9..c30a85e 100644 --- a/.env.scripts +++ b/.env.scripts @@ -42,7 +42,7 @@ NODE_VERSION="system" NODE_MANAGER="system" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Default directories -WWW_ROOT_DIR="/usr/share/httpd/default" +WWW_ROOT_DIR="/usr/local/share/httpd/default" DEFAULT_FILE_DIR="/usr/local/share/template-files" DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/.env.scripts.10 b/.env.scripts.10 index 5743bc0..0cdeb9f 100644 --- a/.env.scripts.10 +++ b/.env.scripts.10 @@ -42,7 +42,7 @@ NODE_VERSION="system" NODE_MANAGER="system" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Default directories -WWW_ROOT_DIR="/usr/share/httpd/default" +WWW_ROOT_DIR="/usr/local/share/httpd/default" DEFAULT_FILE_DIR="/usr/local/share/template-files" DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/.env.scripts.10-dev b/.env.scripts.10-dev index f04f0c9..8fdbb56 100644 --- a/.env.scripts.10-dev +++ b/.env.scripts.10-dev @@ -42,7 +42,7 @@ NODE_VERSION="system" NODE_MANAGER="system" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Default directories -WWW_ROOT_DIR="/usr/share/httpd/default" +WWW_ROOT_DIR="/usr/local/share/httpd/default" DEFAULT_FILE_DIR="/usr/local/share/template-files" DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/.env.scripts.8 b/.env.scripts.8 index aac350f..9d2493c 100644 --- a/.env.scripts.8 +++ b/.env.scripts.8 @@ -42,7 +42,7 @@ NODE_VERSION="system" NODE_MANAGER="system" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Default directories -WWW_ROOT_DIR="/usr/share/httpd/default" +WWW_ROOT_DIR="/usr/local/share/httpd/default" DEFAULT_FILE_DIR="/usr/local/share/template-files" DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/.env.scripts.8-dev b/.env.scripts.8-dev index cdc690e..d5cda64 100644 --- a/.env.scripts.8-dev +++ b/.env.scripts.8-dev @@ -42,7 +42,7 @@ NODE_VERSION="system" NODE_MANAGER="system" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Default directories -WWW_ROOT_DIR="/usr/share/httpd/default" +WWW_ROOT_DIR="/usr/local/share/httpd/default" DEFAULT_FILE_DIR="/usr/local/share/template-files" DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/.env.scripts.9 b/.env.scripts.9 index 9b7f8e1..746c100 100644 --- a/.env.scripts.9 +++ b/.env.scripts.9 @@ -42,7 +42,7 @@ NODE_VERSION="system" NODE_MANAGER="system" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Default directories -WWW_ROOT_DIR="/usr/share/httpd/default" +WWW_ROOT_DIR="/usr/local/share/httpd/default" DEFAULT_FILE_DIR="/usr/local/share/template-files" DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/.env.scripts.9-dev b/.env.scripts.9-dev index 68ef315..b3e76dc 100644 --- a/.env.scripts.9-dev +++ b/.env.scripts.9-dev @@ -42,7 +42,7 @@ NODE_VERSION="system" NODE_MANAGER="system" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Default directories -WWW_ROOT_DIR="/usr/share/httpd/default" +WWW_ROOT_DIR="/usr/local/share/httpd/default" DEFAULT_FILE_DIR="/usr/local/share/template-files" DEFAULT_DATA_DIR="/usr/local/share/template-files/data" DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/Dockerfile b/Dockerfile index 01c9f26..d6bab3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG PHP_SERVER="almalinux" ARG BUILD_DATE="202408111028" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" -ARG WWW_ROOT_DIR="/usr/share/httpd/default" +ARG WWW_ROOT_DIR="/usr/local/share/httpd/default" ARG DEFAULT_FILE_DIR="/usr/local/share/template-files" ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/Dockerfile.10 b/Dockerfile.10 index 2de50ea..a917af7 100644 --- a/Dockerfile.10 +++ b/Dockerfile.10 @@ -5,7 +5,7 @@ ARG PHP_SERVER="almalinux" ARG BUILD_DATE="202408111028" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" -ARG WWW_ROOT_DIR="/usr/share/httpd/default" +ARG WWW_ROOT_DIR="/usr/local/share/httpd/default" ARG DEFAULT_FILE_DIR="/usr/local/share/template-files" ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/Dockerfile.10-dev b/Dockerfile.10-dev index 0956bf5..bf81063 100644 --- a/Dockerfile.10-dev +++ b/Dockerfile.10-dev @@ -5,7 +5,7 @@ ARG PHP_SERVER="almalinux" ARG BUILD_DATE="202408111028" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" -ARG WWW_ROOT_DIR="/usr/share/httpd/default" +ARG WWW_ROOT_DIR="/usr/local/share/httpd/default" ARG DEFAULT_FILE_DIR="/usr/local/share/template-files" ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/Dockerfile.8 b/Dockerfile.8 index fd97e7e..6072b3c 100644 --- a/Dockerfile.8 +++ b/Dockerfile.8 @@ -5,7 +5,7 @@ ARG PHP_SERVER="almalinux" ARG BUILD_DATE="202408111028" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" -ARG WWW_ROOT_DIR="/usr/share/httpd/default" +ARG WWW_ROOT_DIR="/usr/local/share/httpd/default" ARG DEFAULT_FILE_DIR="/usr/local/share/template-files" ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/Dockerfile.8-dev b/Dockerfile.8-dev index 80e42a8..dd6945a 100644 --- a/Dockerfile.8-dev +++ b/Dockerfile.8-dev @@ -5,7 +5,7 @@ ARG PHP_SERVER="almalinux" ARG BUILD_DATE="202408111028" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" -ARG WWW_ROOT_DIR="/usr/share/httpd/default" +ARG WWW_ROOT_DIR="/usr/local/share/httpd/default" ARG DEFAULT_FILE_DIR="/usr/local/share/template-files" ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/Dockerfile.9 b/Dockerfile.9 index d4f9318..d4e788e 100644 --- a/Dockerfile.9 +++ b/Dockerfile.9 @@ -5,7 +5,7 @@ ARG PHP_SERVER="almalinux" ARG BUILD_DATE="202408111028" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" -ARG WWW_ROOT_DIR="/usr/share/httpd/default" +ARG WWW_ROOT_DIR="/usr/local/share/httpd/default" ARG DEFAULT_FILE_DIR="/usr/local/share/template-files" ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/Dockerfile.9-dev b/Dockerfile.9-dev index b58c14e..8068af3 100644 --- a/Dockerfile.9-dev +++ b/Dockerfile.9-dev @@ -5,7 +5,7 @@ ARG PHP_SERVER="almalinux" ARG BUILD_DATE="202408111028" ARG LANGUAGE="en_US.UTF-8" ARG TIMEZONE="America/New_York" -ARG WWW_ROOT_DIR="/usr/share/httpd/default" +ARG WWW_ROOT_DIR="/usr/local/share/httpd/default" ARG DEFAULT_FILE_DIR="/usr/local/share/template-files" ARG DEFAULT_DATA_DIR="/usr/local/share/template-files/data" ARG DEFAULT_CONF_DIR="/usr/local/share/template-files/config" diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index aa6b14f..64bb465 100644 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -192,9 +192,9 @@ __certbot() { fi statusCode=$? else - certbot_key_opts="$certbot_key_opts --webroot ${WWW_ROOT_DIR:-/usr/share/httpd/default}" + certbot_key_opts="$certbot_key_opts --webroot ${WWW_ROOT_DIR:-/usr/local/share/httpd/default}" if [ -n "$ADD_CERTBOT_DOMAINS" ]; then - certbot $options --agree-tos -m $CERT_BOT_MAIL certonly --webroot "${WWW_ROOT_DIR:-/usr/share/httpd/default}" $certbot_key_opts + certbot $options --agree-tos -m $CERT_BOT_MAIL certonly --webroot "${WWW_ROOT_DIR:-/usr/local/share/httpd/default}" $certbot_key_opts statusCode=$? else statusCode=1 @@ -793,11 +793,11 @@ EOF } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __initialize_web_health() { - local www_dir="${1:-${WWW_ROOT_DIR:-/usr/share/httpd/default}}" + local www_dir="${1:-${WWW_ROOT_DIR:-/usr/local/share/httpd/default}}" if [ -d "$www_dir" ]; then - __find_replace "REPLACE_CONTAINER_IP4" "${REPLACE_CONTAINER_IP4:-127.0.0.1}" "/usr/share/httpd" - __find_replace "REPLACE_COPYRIGHT_FOOTER" "${COPYRIGHT_FOOTER:-Copyright 1999 - $(date +'%Y')}" "/usr/share/httpd" - __find_replace "REPLACE_LAST_UPDATED_ON_MESSAGE" "${LAST_UPDATED_ON_MESSAGE:-$(date +'Last updated on: %Y-%m-%d at %H:%M:%S')}" "/usr/share/httpd" + __find_replace "REPLACE_CONTAINER_IP4" "${REPLACE_CONTAINER_IP4:-127.0.0.1}" "/usr/local/share/httpd" + __find_replace "REPLACE_COPYRIGHT_FOOTER" "${COPYRIGHT_FOOTER:-Copyright 1999 - $(date +'%Y')}" "/usr/local/share/httpd" + __find_replace "REPLACE_LAST_UPDATED_ON_MESSAGE" "${LAST_UPDATED_ON_MESSAGE:-$(date +'Last updated on: %Y-%m-%d at %H:%M:%S')}" "/usr/local/share/httpd" fi } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -833,7 +833,7 @@ __initialize_replace_variables() { [ -n "$SERVICE_PORT" ] && __find_replace "REPLACE_SERVER_PORT" "${SERVICE_PORT:-80}" "$set_dir" [ -n "$HOSTNAME" ] && __find_replace "REPLACE_SERVER_NAME" "${FULL_DOMAIN_NAME:-$HOSTNAME}" "$set_dir" [ -n "$CONTAINER_NAME" ] && __find_replace "REPLACE_SERVER_SOFTWARE" "${CONTAINER_NAME:-docker}" "$set_dir" - [ -n "$WWW_ROOT_DIR" ] && __find_replace "REPLACE_SERVER_WWW_DIR" "${WWW_ROOT_DIR:-/usr/share/httpd/default}" "$set_dir" + [ -n "$WWW_ROOT_DIR" ] && __find_replace "REPLACE_SERVER_WWW_DIR" "${WWW_ROOT_DIR:-/usr/local/share/httpd/default}" "$set_dir" done if [ -n "$WWW_ROOT_DIR" ] && [ "$set_dir" != "$WWW_ROOT_DIR" ] && [ -d "$WWW_ROOT_DIR" ]; then __find_replace "REPLACE_CONTAINER_IP4" "${REPLACE_CONTAINER_IP4:-127.0.0.1}" "$WWW_ROOT_DIR" @@ -996,7 +996,7 @@ __initialize_data_dir() { __initialize_www_root() { local WWW_INIT="" local WWW_TEMPLATE="" - [ -d "/usr/share/httpd/default" ] && WWW_TEMPLATE="/usr/share/httpd/default" + [ -d "/usr/local/share/httpd/default" ] && WWW_TEMPLATE="/usr/local/share/httpd/default" [ "$WWW_ROOT_DIR" = "/app" ] && WWW_INIT="${WWW_INIT:-true}" [ "$WWW_ROOT_DIR" = "/data/htdocs" ] && WWW_INIT="${WWW_INIT:-true}" __is_dir_empty "$WWW_ROOT_DIR/" && WWW_INIT="true" || WWW_INIT="false" @@ -1030,7 +1030,7 @@ __is_htdocs_mounted() { WWW_ROOT_DIR="/data/wwwroot" fi [ -d "$WWW_ROOT_DIR" ] || mkdir -p "$WWW_ROOT_DIR" - export WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/share/httpd/default}" + export WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/local/share/httpd/default}" } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __initialize_ssl_certs() { @@ -1062,11 +1062,11 @@ __initialize_ssl_certs() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __start_php_dev_server() { if [ "$2" = "yes" ]; then - if [ -d "/usr/share/httpd" ]; then - find "/usr/share/httpd" -type f -not -path '.git*' -iname '*.php' -exec sed -i 's|[<].*SERVER_ADDR.*[>]|'${CONTAINER_IP4_ADDRESS:-127.0.0.1}'|g' {} \; 2>/dev/null - php -S 0.0.0.0:$PHP_DEV_SERVER_PORT -t "/usr/share/httpd" + if [ -d "/usr/local/share/httpd" ]; then + find "/usr/local/share/httpd" -type f -not -path '.git*' -iname '*.php' -exec sed -i 's|[<].*SERVER_ADDR.*[>]|'${CONTAINER_IP4_ADDRESS:-127.0.0.1}'|g' {} \; 2>/dev/null + php -S 0.0.0.0:$PHP_DEV_SERVER_PORT -t "/usr/local/share/httpd" fi - if ! echo "$1" | grep -q "^/usr/share/httpd"; then + if ! echo "$1" | grep -q "^/usr/local/share/httpd"; then find "$1" -type f -not -path '.git*' -iname '*.php' -exec sed -i 's|[<].*SERVER_ADDR.*[>]|'${CONTAINER_IP4_ADDRESS:-127.0.0.1}'|g' {} \; 2>/dev/null php -S 0.0.0.0:$PHP_DEV_SERVER_PORT -t "$1" fi diff --git a/rootfs/usr/local/share/template-files/config/env/default.sample b/rootfs/usr/local/share/template-files/config/env/default.sample index 65ff1df..c4271ed 100644 --- a/rootfs/usr/local/share/template-files/config/env/default.sample +++ b/rootfs/usr/local/share/template-files/config/env/default.sample @@ -14,7 +14,7 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # directory settings #BACKUP_DIR="${BACKUP_DIR:-/data/backups}" -#WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/share/httpd/default}" +#WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/local/share/httpd/default}" #LOCAL_BIN_DIR="${LOCAL_BIN_DIR:-/usr/local/bin}" #DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" #DEFAULT_DATA_DIR="${DEFAULT_DATA_DIR:-/usr/local/share/template-files/data}"