|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
set -eu
|
|
set -eu
|
|
|
|
|
|
-mkdir -p /app/data/public
|
|
|
|
|
|
+mkdir -p /app/data/public /run/app /run/apache2
|
|
|
|
|
|
if [ ! -f "/app/data/public/index.html" ]; then
|
|
if [ ! -f "/app/data/public/index.html" ]; then
|
|
cp /app/code/index.html /app/data/public/index.html
|
|
cp /app/code/index.html /app/data/public/index.html
|
|
@@ -17,9 +17,11 @@ sed -e "s@AuthLDAPURL .*@AuthLDAPURL ${LDAP_URL}/${LDAP_USERS_BASE_DN}?username?
|
|
-e "s@AuthLDAPBindPassword .*@AuthLDAPBindPassword ${LDAP_BIND_PASSWORD}@" \
|
|
-e "s@AuthLDAPBindPassword .*@AuthLDAPBindPassword ${LDAP_BIND_PASSWORD}@" \
|
|
-i /app/data/apache2-app.conf
|
|
-i /app/data/apache2-app.conf
|
|
|
|
|
|
-chown -R www-data:www-data /app/data /run/app
|
|
|
|
|
|
+chown -R www-data:www-data /app/data /run
|
|
|
|
|
|
-echo "Starting apache"
|
|
|
|
|
|
+echo "Cleanup apache pid"
|
|
APACHE_CONFDIR="" source /etc/apache2/envvars
|
|
APACHE_CONFDIR="" source /etc/apache2/envvars
|
|
rm -f "${APACHE_PID_FILE}"
|
|
rm -f "${APACHE_PID_FILE}"
|
|
-exec /usr/sbin/apache2 -DFOREGROUND
|
|
|
|
|
|
+
|
|
|
|
+echo "Starting supervisor"
|
|
|
|
+exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i lamp
|