Skip to content

Commit

Permalink
enhance php config for docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
pmdevelopment committed Sep 2, 2024
1 parent 00b876a commit 2fbc248
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ APP_LOCALE=de
APP_CACHE_DIR=/var/www/wirhub/var/cache
PANTHER_APP_ENV=test
PANTHER_NO_HEADLESS=true
PANTHER_CHROME_ARGUMENTS="--ignore-certificate-errors --disable-dev-shm-usage --log-level=DEBUG --log-path=/var/www/wirhub/var/log --user-data-dir=/var/www/wirhub/var/chrome --headless=old --window-size=1280,1100 --disable-gpu --remote-debugging-port=9222"
PANTHER_CHROME_ARGUMENTS="--ignore-certificate-errors --disable-dev-shm-usage --verbose --log-path=/var/www/wirhub/var/log --user-data-dir=/var/www/wirhub/var/chrome --headless=old --window-size=1280,1100 --disable-gpu --disable-extensions --remote-debugging-port=9222"
PANTHER_EXTERNAL_BASE_URI=http://localhost
PANTHER_NO_SANDBOX=1
PANTHER_WEB_SERVER_DIR=./public
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ RUN sed -i 's/post_max_size = 8M/post_max_size = 64M/g' /etc/php/8.2/apache2/php
RUN sed -i 's/;date.timezone =/date.timezone = Europe\/Berlin/g' /etc/php/8.2/cli/php.ini
RUN sed -i 's/;date.timezone =/date.timezone = Europe\/Berlin/g' /etc/php/8.2/apache2/php.ini

RUN rm /etc/php/8.2/apache2/conf.d/10-opcache.ini
COPY dockerfiles/php/10-opcache.ini /etc/php/8.2/apache2/conf.d


# vorerst die alte 00-default.conf löschen und ersetzen. so funktionert es ohne https
RUN rm /etc/apache2/sites-available/000-default.conf
COPY dockerfiles/virtual_hosts /etc/apache2/sites-available

### Configure Webserver
RUN echo "<h1>Apache server started: cd /var/www/html/index.html</h1>" > /var/www/html/index.html
RUN echo "<h1>Webserver running</h1>" > /var/www/html/index.html
RUN a2enmod rewrite

# setting the correct server timezone
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
init:
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev
COMPOSER_ALLOW_SUPERUSER=1 composer dump-env prod
COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload --no-dev --classmap-authoritative
php bin/console doctrine:migrations:migrate --no-interaction
php bin/console app:theme:refresh
php bin/console app:update
Expand Down
9 changes: 9 additions & 0 deletions dockerfiles/php/10-opcache.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
; configuration for php opcache module
; priority=10
zend_extension=opcache.so
opcache.jit=off
opcache.preload=/var/www/wirhub/config/preload.php
opcache.preload_user=www-data
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
opcache.validate_timestamps=0

0 comments on commit 2fbc248

Please sign in to comment.