Repository navigation
Log to stdout by default in Docker #326
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,8 @@ FROM base-image | |
| ENV APP_ENV=prod | ||
|
|
||
| ENV PHP_OPCACHE_MEMORY_CONSUMPTION="256" \ | ||
| PHP_OPCACHE_MAX_WASTED_PERCENTAGE="10" | ||
| PHP_OPCACHE_MAX_WASTED_PERCENTAGE="10" \ | ||
| LOG_FILE_PATH="/dev/stdout" | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The compose setup overrides the new default. docker/.env still sets |
||
|
|
||
| LABEL org.opencontainers.image.authors="tchap@tchap.me" | ||
| LABEL org.opencontainers.image.url="https://github.com/tchapi/davis/pkgs/container/davis-standalone" | ||
|
|
@@ -96,11 +97,9 @@ RUN APP_ENV=prod COMPOSER_ALLOW_SUPERUSER=1 composer install --no-ansi --no-dev | |
| && php ./vendor/symfony/intl/Resources/bin/compress | ||
|
|
||
| # Caddy: web server | ||
| RUN mkdir -p /var/log/caddy | ||
| COPY ./docker/configurations/Caddyfile /etc/caddy/Caddyfile | ||
|
|
||
| # Supervisor: Process manager | ||
| RUN mkdir -p /var/log/supervisor && mkdir -p /var/log/php-fpm | ||
| COPY ./docker/configurations/supervisord.conf /etc/supervisord.conf | ||
|
|
||
| # We want to use sockets inside the container between Caddy and PHP-fpm | ||
|
|
@@ -123,4 +122,4 @@ HEALTHCHECK --interval=120s --timeout=10s --start-period=60s --retries=3 \ | |
| CMD ["curl", "--fail", "http://localhost:9000"] | ||
|
|
||
| # It's the Caddy port, not the PHP-fpm one (as we use sockets) | ||
| EXPOSE 9000 | ||
| EXPOSE 9000 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,13 +19,13 @@ command=/usr/sbin/caddy run -c /etc/caddy/Caddyfile | |
| autostart=true | ||
| autorestart=true | ||
| redirect_stderr=true | ||
| stdout_logfile=/var/log/caddy/access.log | ||
| stdout_logfile=/dev/stdout | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really want access logs in |
||
| stdout_logfile_maxbytes = 0 | ||
|
|
||
| [program:php-fpm] | ||
| command=/usr/local/sbin/php-fpm --nodaemonize | ||
| autostart=true | ||
| autorestart=true | ||
| redirect_stderr=true | ||
| stdout_logfile=/var/log/php-fpm/access.log | ||
| stdout_logfile_maxbytes = 0 | ||
| stdout_logfile=/dev/stdout | ||
| stdout_logfile_maxbytes = 0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only modified one of the two Dockerfiles