#!/bin/sh set -e : "${APACHE_DOCUMENT_ROOT:=/var/www/html/home/web}" placeholder="__FARM3_APACHE_DOCUMENT_ROOT__" sed -ri -e "s~/var/www/html(/home/web|/backend/web)*~${placeholder}~g" \ /etc/apache2/sites-available/*.conf \ /etc/apache2/apache2.conf \ /etc/apache2/conf-available/*.conf sed -ri -e "s|${placeholder}|${APACHE_DOCUMENT_ROOT}|g" \ /etc/apache2/sites-available/*.conf \ /etc/apache2/apache2.conf \ /etc/apache2/conf-available/*.conf if [ -n "${APACHE_ADMIN_ROOT:-}" ]; then cat >/etc/apache2/conf-available/farm3-admin.conf < Options FollowSymLinks AllowOverride None Require all granted Alias /backend/web /var/www/html/backend/web Options FollowSymLinks AllowOverride All Require all granted EOF a2enconf farm3-admin >/dev/null fi exec docker-php-entrypoint "$@"