Skip to content

Commit

Permalink
Merge branch 'php7dot4' into php8dot0
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassabreu committed Dec 7, 2024
2 parents 7109ac0 + 68cc6de commit 8ce67c0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
26 changes: 1 addition & 25 deletions apache-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,6 @@

set -e

rm -f $CONTAINER_STARTED_LOCK

if [[ ${XDEBUG_ENABLED} == true ]]; then
sudo -E xdebug-set-mode ${XDEBUG_MODE:-debug}
fi

sudo -E newrelic-setup
sudo -E opcache-setup

if [[ ${SESSION_HANDLER} == true ]]; then
echo "session.save_handler = ${SESSION_HANDLER_NAME}" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
echo "session.save_path = ${SESSION_HANDLER_PATH}" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
fi

sudo rm -rf var/cache/* var/logs/* &&
sudo mkdir -p /var/www/html/var/cache &&
sudo mkdir -p /var/www/html/var/logs &&
sudo mkdir -p /var/www/html/var/sessions &&
sudo chown -R www-data:www-data /var/www/html/var/cache && chmod 777 /var/www/html/var/cache &&
sudo chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs &&
sudo chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions

post-startup-hook

touch $CONTAINER_STARTED_LOCK
server-warmup

exec apache2-foreground
27 changes: 27 additions & 0 deletions bin/server-warmup
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

rm -f $CONTAINER_STARTED_LOCK

if [[ ${XDEBUG_ENABLED} == true ]]; then
sudo -E xdebug-set-mode ${XDEBUG_MODE:-debug}
fi

sudo -E newrelic-setup
sudo -E opcache-setup

if [[ ${SESSION_HANDLER} == true ]]; then
echo "session.save_handler = ${SESSION_HANDLER_NAME}" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
echo "session.save_path = ${SESSION_HANDLER_PATH}" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
fi

sudo rm -rf var/cache/* var/logs/* &&
sudo mkdir -p /var/www/html/var/cache &&
sudo mkdir -p /var/www/html/var/logs &&
sudo mkdir -p /var/www/html/var/sessions &&
sudo chown -R www-data:www-data /var/www/html/var/cache && chmod 777 /var/www/html/var/cache &&
sudo chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs &&
sudo chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions

post-startup-hook

touch $CONTAINER_STARTED_LOCK

0 comments on commit 8ce67c0

Please sign in to comment.