Skip to content

Commit e00a904

Browse files
committed
Merge branch 'php8dot1' into php8dot1-mongodb
2 parents 4d08a52 + e61389a commit e00a904

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

apache-run.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/bin/bash
22

3+
set -e
4+
5+
rm -f $CONTAINER_STARTED_LOCK
6+
37
if [[ ${XDEBUG_ENABLED} == true ]]; then
48
sudo -E xdebug-set-mode ${XDEBUG_MODE:-debug}
59
fi
610

711
sudo -E newrelic-setup
12+
sudo -E opcache-setup
813

914
if [[ ${SESSION_HANDLER} == true ]]; then
1015
echo "session.save_handler = ${SESSION_HANDLER_NAME}" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
@@ -19,4 +24,8 @@ sudo rm -rf var/cache/* var/logs/* &&
1924
sudo chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs &&
2025
sudo chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions
2126

27+
post-startup-hook
28+
29+
touch $CONTAINER_STARTED_LOCK
30+
2231
exec apache2-foreground

bin/opcache-setup

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
if [[ ${OPCACHE_ENABLED} == true ]]; then
4+
echo "opcache.enable=1" | tee -a /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
5+
echo "opcache.max_accelerated_files=$(echo $[ 1000 + $(find . -type f -name "*.php" | wc -l) ])" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
6+
else
7+
echo "opcache.enable=0" | tee -a /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
8+
fi

bin/post-startup-hook

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
# substituir pelas ações necessárias após o startup base

bin/wait-startup

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
while [ ! -f $CONTAINER_STARTED_LOCK ]; do
6+
echo "Esperando startup do container..."
7+
sleep 5
8+
done
9+
10+
echo "Startup do container concluída."

0 commit comments

Comments
 (0)