Skip to content

Commit

Permalink
Redirect ipeer logs to stdout/stderr and optimize composer
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Jun 24, 2020
1 parent 7eca4b3 commit 6521608
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Dockerfile-app
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ COPY docker/php.ini /usr/local/etc/php/
COPY . /var/www/html

RUN cd /var/www/html \
&& composer install \
&& mkdir -p /var/www/html/app/tmp/cache/persistent /var/www/html/app/tmp/cache/models \
&& chown www-data:www-data -R /var/www/html/app/tmp/cache
&& composer install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --no-scripts --no-suggest --optimize-autoloader \
&& mkdir -p /var/www/html/app/tmp/cache/persistent /var/www/html/app/tmp/cache/models /var/www/html/app/tmp/logs \
&& chown www-data:www-data -R /var/www/html/app/tmp/cache \
&& ln -sf /dev/stdout /var/www/html/app/tmp/logs/api.log \
&& ln -sf /dev/stdout /var/www/html/app/tmp/logs/debug.log \
&& ln -sf /dev/stdout /var/www/html/app/tmp/logs/login.log \
&& ln -sf /dev/stderr /var/www/html/app/tmp/logs/error.log

RUN set -ex \
## Customize PHP fpm configuration
&& sed -i -e "s/;clear_env\s*=\s*no/clear_env = no/g" /usr/local/etc/php-fpm.conf \
&& sed -i -e "s/;request_terminate_timeout\s*=[^\n]*/request_terminate_timeout = 300/g" /usr/local/etc/php-fpm.conf \
&& php-fpm --test

0 comments on commit 6521608

Please sign in to comment.