Skip to content

Commit

Permalink
Ref #369 - Remove apache specific settings from non apache entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Jun 19, 2022
1 parent fee52fd commit 5ab888d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-entrypoint.sh
Expand Up @@ -28,12 +28,14 @@ if [ ! -z "${PMA_USER_CONFIG_BASE64}" ]; then
echo "${PMA_USER_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.user.inc.php
fi

# start: Apache specific settings
if [ -n "${APACHE_PORT+x}" ]; then
echo "Setting apache port to ${APACHE_PORT}."
sed -i "s/VirtualHost \*:80/VirtualHost \*:${APACHE_PORT}/" /etc/apache2/sites-enabled/000-default.conf
sed -i "s/Listen 80/Listen ${APACHE_PORT}/" /etc/apache2/ports.conf
apachectl configtest
fi
# end: Apache specific settings

get_docker_secret() {
local env_var="${1}"
Expand Down
3 changes: 3 additions & 0 deletions update.sh
Expand Up @@ -35,4 +35,7 @@ for variant in apache fpm fpm-alpine; do
s/%%VARIANT%%/'"$variant"'/;
s/%%CMD%%/'"${cmd[$variant]}"'/;
' "$variant/Dockerfile"
if [ "$variant" != "apache" ]; then
sed -i "/^# start: Apache specific settings$/,/^# end: Apache specific settings$/d" "$variant/docker-entrypoint.sh"
fi
done

0 comments on commit 5ab888d

Please sign in to comment.