Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log php-fpm to stdout #127

Merged
merged 1 commit into from
Sep 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ RUN DEBIAN_FRONTEND=noninteractive \
COPY conf/php-fpm-pool.conf /etc/php5/fpm/pool.d/www.conf
COPY conf/supervisord.conf /etc/supervisor/supervisord.conf

RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf
RUN mkdir -p /var/www/html && \
chown -R www-data /var/www

Expand Down
3 changes: 3 additions & 0 deletions conf/php-fpm-pool.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ env[DB_USERNAME] = $DB_USERNAME
env[DB_PASSWORD] = $DB_PASSWORD
env[CACHE_DRIVER] = $CACHE_DRIVER

catch_workers_output = yes
access.log = /proc/self/fd/2

[global]
daemonize = no
error_log = /proc/self/fd/2
6 changes: 5 additions & 1 deletion conf/supervisord.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[supervisord]
logfile=/dev/null ; (main log file;default $CWD/supervisord.log)
logfile=/proc/self/fd/2 ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=0 ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=0 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
Expand All @@ -16,6 +16,10 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket

[program:php-fpm]
stdout_logfile=/proc/self/fd/2
stdout_logfile_maxbytes=0
stderr_logfile=/proc/self/fd/2
stderr_logfile_maxbytes=0
command=/usr/sbin/php5-fpm -c /etc/php5/fpm

[program:cron]
Expand Down