Skip to content

Commit

Permalink
Use existing redmine env var to log to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Nov 12, 2024
1 parent 47d9994 commit 2f7ad78
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 16 deletions.
3 changes: 1 addition & 2 deletions 5.0/alpine3.19/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 5.0/alpine3.20/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 5.0/bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 5.1/alpine3.19/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 5.1/alpine3.20/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions 5.1/bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN set -eux; \
ENV REDMINE_VERSION {{ .version }}
ENV REDMINE_DOWNLOAD_URL {{ .downloadUrl }}
ENV REDMINE_DOWNLOAD_SHA256 {{ .sha256 }}
ENV RAILS_LOG_TO_STDOUT true

RUN set -eux; \
wget -O redmine.tar.gz "$REDMINE_DOWNLOAD_URL"; \
Expand All @@ -80,8 +81,6 @@ RUN set -eux; \
rm redmine.tar.gz files/delete.me log/delete.me; \
mkdir -p log public/plugin_assets sqlite tmp/pdf tmp/pids; \
chown -R redmine:redmine ./; \
# log to STDOUT (https://github.com/docker-library/redmine/issues/108)
echo 'config.logger = Logger.new(STDOUT)' > config/additional_environment.rb; \
# fix permissions for running as an arbitrary user
chmod -R ugo=rwX config db sqlite; \
find log tmp -type d -exec chmod 1777 '{}' +
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ RUN set -eux; \
ENV REDMINE_VERSION {{ .version }}
ENV REDMINE_DOWNLOAD_URL {{ .downloadUrl }}
ENV REDMINE_DOWNLOAD_SHA256 {{ .sha256 }}
ENV RAILS_LOG_TO_STDOUT true

RUN set -eux; \
# if we use wget here, we get certificate issues (https://github.com/docker-library/redmine/pull/249#issuecomment-984176479)
Expand All @@ -82,8 +83,6 @@ RUN set -eux; \
rm redmine.tar.gz files/delete.me log/delete.me; \
mkdir -p log public/plugin_assets sqlite tmp/pdf tmp/pids; \
chown -R redmine:redmine ./; \
# log to STDOUT (https://github.com/docker-library/redmine/issues/108)
echo 'config.logger = Logger.new(STDOUT)' > config/additional_environment.rb; \
# fix permissions for running as an arbitrary user
chmod -R ugo=rwX config db sqlite; \
find log tmp -type d -exec chmod 1777 '{}' +
Expand Down

0 comments on commit 2f7ad78

Please sign in to comment.