diff --git a/Dockerfile b/Dockerfile index 1f335ff..fcee5d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 2ea3972..ee07e55 100644 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -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 "$@" diff --git a/src/etc/supervisor.d/services.ini b/src/etc/supervisor.d/services.ini index b38ea52..a117fa6 100644 --- a/src/etc/supervisor.d/services.ini +++ b/src/etc/supervisor.d/services.ini @@ -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 \ No newline at end of file +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 \ No newline at end of file