Added logging on stdout

This commit is contained in:
Piotr Biernat 2020-11-21 10:46:03 +01:00
parent 664afc53d8
commit b85ef29cb6
3 changed files with 17 additions and 10 deletions

View File

@ -8,10 +8,13 @@ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/co
php7-xml php7-phar php7-intl php7-dom php7-xmlreader php7-ctype php7-session composer \
php7-mbstring php7-gd php7-tokenizer php7-xmlwriter php7-fileinfo php7-pdo php7-pdo_mysql
COPY src/etc/ /etc/
COPY src/app/ /var/www/app/
COPY src/etc /etc
COPY src/entrypoint.sh /
RUN chmod +x /entrypoint.sh
RUN ln -sf /dev/stdout /var/log/nginx/app_access.log \
&& ln -sf /dev/stderr /var/log/nginx/app_error.log
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -1,8 +1,8 @@
#!/bin/sh
php /var/www/app/artisan migrate
while [ $? -ne 0 ]; do
php /var/www/app/artisan migrate
done
# php /var/www/app/artisan migrate
# while [ $? -ne 0 ]; do
# php /var/www/app/artisan migrate
# done
exec "$@"

View File

@ -7,13 +7,17 @@ command=/usr/sbin/nginx -g 'daemon off;'
autostart=true
autorestart=true
priority=10
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:php-fpm]
command=/usr/sbin/php-fpm7 -F
autostart=true
autorestart=true
priority=5
stdout_events_enabled=true
stderr_events_enabled=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0