Commit 6451d637 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Dockerfile.sh et entrypoint.sh : utilisation d'une varaiable WITHOUT_DOCKER...

Dockerfile.sh et entrypoint.sh : utilisation d'une varaiable WITHOUT_DOCKER pour déterminer la façon de lancer apache.
parent 5066fb6f
Loading
Loading
Loading
Loading
+1 −0
Changes for Dockerfile.sh: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -131,4 +131,5 @@ cp entrypoint.d/* /entrypoint.d/
# Entry point
cp entrypoint.sh /sbin/entrypoint.sh
chmod 755 /sbin/entrypoint.sh
export WITHOUT_DOCKER=1
. /sbin/entrypoint.sh
+8 −1
Changes for entrypoint.sh: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -15,4 +15,11 @@ fi
# (NB: Apache doit être lancé au premier plan sinon le processus Docker se termine)
mkdir -p /var/run/apache2
. /etc/apache2/envvars
service php${PHP_VERSION}-fpm start && /usr/sbin/apache2ctl -D FOREGROUND
startApache() {
  if [[ -z ${WITHOUT_DOCKER} ]]; then
    /usr/sbin/apache2ctl -D FOREGROUND
  else
    /usr/sbin/apache2ctl start
  fi
}
service php${PHP_VERSION}-fpm start && startApache