Skip to content

Commit

Permalink
Update entrypoint, disable preload
Browse files Browse the repository at this point in the history
  • Loading branch information
veteran29 committed Aug 14, 2023
1 parent d0defa6 commit aa551fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .docker/php/conf.d/armaforces-web.prod.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
opcache.preload_user = www-data
opcache.preload = /www/app/config/preload.php
;opcache.preload_user = www-data
;opcache.preload = /www/app/config/preload.php
11 changes: 4 additions & 7 deletions .docker/php/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ if [ "${1#-}" != "$1" ]; then
fi

if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
PHP_INI_RECOMMENDED="$PHP_INI_DIR/php.ini-production"
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var

if [ "$APP_ENV" != 'prod' ]; then
PHP_INI_RECOMMENDED="$PHP_INI_DIR/php.ini-development"
composer install --prefer-dist --no-progress --no-interaction || true
fi
ln -sf "$PHP_INI_RECOMMENDED" "$PHP_INI_DIR/php.ini"

mkdir -p var/cache var/log
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var || true
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var || true

if [ "$APP_ENV" = 'prod' ]; then
php bin/console doctrine:migrations:migrate --allow-no-migration --no-interaction
Expand Down

0 comments on commit aa551fc

Please sign in to comment.