Skip to content

Commit

Permalink
Docker: Add monolog configuration when running as a container
Browse files Browse the repository at this point in the history
This will let the logs go to stdout when running as a container, which
is the Docker way to send logs
  • Loading branch information
quartje committed Aug 21, 2023
1 parent fed2a94 commit d808143
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions config/packages/prod/monolog.yaml.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
monolog:
handlers:
prod-signaler:
type: fingers_crossed
action_level: ERROR
passthru_level: NOTICE # this means that all message of level NOTICE or higher are always logged
handler: main_syslog
bubble: false # if we handle it, nothing else should
main_syslog:
type: stream
path: "php://stderr"
formatter: surfnet_stepup.monolog.json_formatter

2 changes: 2 additions & 0 deletions docker/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ RUN tar -xvjf /tmp/*.tar.bz2 -C /var/www/html/ && \
# Add the application configuration files
COPY config/legacy/parameters.yaml.dist config/legacy/parameters.yaml
COPY config/legacy/samlstepupproviders_parameters.yaml.dist config/legacy/samlstepupproviders_parameters.yaml
COPY config/packages/prod/monolog.yaml.docker config/packages/prod/monolog.yaml


# Add the config files for Apache2
RUN rm -rf /etc/apache2/sites-enabled/*
Expand Down

0 comments on commit d808143

Please sign in to comment.