From 2f7ad78c65f5ea8724f994ea2a33dafcc4cd32eb Mon Sep 17 00:00:00 2001 From: Laurent Goderre Date: Tue, 12 Nov 2024 10:05:17 -0500 Subject: [PATCH] Use existing redmine env var to log to stdout Fixes #345 --- 5.0/alpine3.19/Dockerfile | 3 +-- 5.0/alpine3.20/Dockerfile | 3 +-- 5.0/bookworm/Dockerfile | 3 +-- 5.1/alpine3.19/Dockerfile | 3 +-- 5.1/alpine3.20/Dockerfile | 3 +-- 5.1/bookworm/Dockerfile | 3 +-- Dockerfile-alpine.template | 3 +-- Dockerfile-debian.template | 3 +-- 8 files changed, 8 insertions(+), 16 deletions(-) diff --git a/5.0/alpine3.19/Dockerfile b/5.0/alpine3.19/Dockerfile index 0324c59..76d3c54 100644 --- a/5.0/alpine3.19/Dockerfile +++ b/5.0/alpine3.19/Dockerfile @@ -76,6 +76,7 @@ RUN set -eux; \ ENV REDMINE_VERSION 5.0.10 ENV REDMINE_DOWNLOAD_URL https://www.redmine.org/releases/redmine-5.0.10.tar.gz ENV REDMINE_DOWNLOAD_SHA256 cb0df0f6feb5a3198e59e36b239e9a1110011ed7078316bd1c8058247f5b9506 +ENV RAILS_LOG_TO_STDOUT true RUN set -eux; \ wget -O redmine.tar.gz "$REDMINE_DOWNLOAD_URL"; \ @@ -84,8 +85,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 '{}' + diff --git a/5.0/alpine3.20/Dockerfile b/5.0/alpine3.20/Dockerfile index c8591be..349ce91 100644 --- a/5.0/alpine3.20/Dockerfile +++ b/5.0/alpine3.20/Dockerfile @@ -76,6 +76,7 @@ RUN set -eux; \ ENV REDMINE_VERSION 5.0.10 ENV REDMINE_DOWNLOAD_URL https://www.redmine.org/releases/redmine-5.0.10.tar.gz ENV REDMINE_DOWNLOAD_SHA256 cb0df0f6feb5a3198e59e36b239e9a1110011ed7078316bd1c8058247f5b9506 +ENV RAILS_LOG_TO_STDOUT true RUN set -eux; \ wget -O redmine.tar.gz "$REDMINE_DOWNLOAD_URL"; \ @@ -84,8 +85,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 '{}' + diff --git a/5.0/bookworm/Dockerfile b/5.0/bookworm/Dockerfile index 29096fe..bfc5eed 100644 --- a/5.0/bookworm/Dockerfile +++ b/5.0/bookworm/Dockerfile @@ -79,6 +79,7 @@ RUN set -eux; \ ENV REDMINE_VERSION 5.0.10 ENV REDMINE_DOWNLOAD_URL https://www.redmine.org/releases/redmine-5.0.10.tar.gz ENV REDMINE_DOWNLOAD_SHA256 cb0df0f6feb5a3198e59e36b239e9a1110011ed7078316bd1c8058247f5b9506 +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) @@ -88,8 +89,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 '{}' + diff --git a/5.1/alpine3.19/Dockerfile b/5.1/alpine3.19/Dockerfile index 2d7da9d..57f6566 100644 --- a/5.1/alpine3.19/Dockerfile +++ b/5.1/alpine3.19/Dockerfile @@ -76,6 +76,7 @@ RUN set -eux; \ ENV REDMINE_VERSION 5.1.4 ENV REDMINE_DOWNLOAD_URL https://www.redmine.org/releases/redmine-5.1.4.tar.gz ENV REDMINE_DOWNLOAD_SHA256 f5738d6a107f231b8f4b0ae5410e0c45742d75e0ef30c4b31a27c0ac9dafd51c +ENV RAILS_LOG_TO_STDOUT true RUN set -eux; \ wget -O redmine.tar.gz "$REDMINE_DOWNLOAD_URL"; \ @@ -84,8 +85,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 '{}' + diff --git a/5.1/alpine3.20/Dockerfile b/5.1/alpine3.20/Dockerfile index 1faf1ef..6480a9e 100644 --- a/5.1/alpine3.20/Dockerfile +++ b/5.1/alpine3.20/Dockerfile @@ -76,6 +76,7 @@ RUN set -eux; \ ENV REDMINE_VERSION 5.1.4 ENV REDMINE_DOWNLOAD_URL https://www.redmine.org/releases/redmine-5.1.4.tar.gz ENV REDMINE_DOWNLOAD_SHA256 f5738d6a107f231b8f4b0ae5410e0c45742d75e0ef30c4b31a27c0ac9dafd51c +ENV RAILS_LOG_TO_STDOUT true RUN set -eux; \ wget -O redmine.tar.gz "$REDMINE_DOWNLOAD_URL"; \ @@ -84,8 +85,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 '{}' + diff --git a/5.1/bookworm/Dockerfile b/5.1/bookworm/Dockerfile index 0b86210..23f3b98 100644 --- a/5.1/bookworm/Dockerfile +++ b/5.1/bookworm/Dockerfile @@ -79,6 +79,7 @@ RUN set -eux; \ ENV REDMINE_VERSION 5.1.4 ENV REDMINE_DOWNLOAD_URL https://www.redmine.org/releases/redmine-5.1.4.tar.gz ENV REDMINE_DOWNLOAD_SHA256 f5738d6a107f231b8f4b0ae5410e0c45742d75e0ef30c4b31a27c0ac9dafd51c +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) @@ -88,8 +89,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 '{}' + diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 9a26cc2..c368383 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -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"; \ @@ -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 '{}' + diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 54f0523..2e77fc3 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -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) @@ -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 '{}' +