File tree Expand file tree Collapse file tree 4 files changed +30
-0
lines changed Expand file tree Collapse file tree 4 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -e
4
+
5
+ rm -f $CONTAINER_STARTED_LOCK
6
+
3
7
if [[ ${XDEBUG_ENABLED} == true ]]; then
4
8
sudo -E xdebug-set-mode ${XDEBUG_MODE:- debug}
5
9
fi
6
10
7
11
sudo -E newrelic-setup
12
+ sudo -E opcache-setup
8
13
9
14
if [[ ${SESSION_HANDLER} == true ]]; then
10
15
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/* &&
19
24
sudo chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs &&
20
25
sudo chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions
21
26
27
+ post-startup-hook
28
+
29
+ touch $CONTAINER_STARTED_LOCK
30
+
22
31
exec apache2-foreground
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # substituir pelas ações necessárias após o startup base
Original file line number Diff line number Diff line change
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."
You can’t perform that action at this time.
0 commit comments