Skip to content

Set RAILS_LOG_TO_STDOUT before package install#66

Open
Alleny244 wants to merge 1 commit into
theforeman:masterfrom
Alleny244:move-rails-log-env-before-install
Open

Set RAILS_LOG_TO_STDOUT before package install#66
Alleny244 wants to merge 1 commit into
theforeman:masterfrom
Alleny244:move-rails-log-env-before-install

Conversation

@Alleny244

Copy link
Copy Markdown

Summary

Move RAILS_ENV and RAILS_LOG_TO_STDOUT=true above the dnf install step in the Foreman Containerfile.

dnf install foreman executes RPM post-install scriptlets that invoke foreman-rake (for example, to generate tokens and encryption keys). These Rails boots must already have RAILS_LOG_TO_STDOUT=true set; otherwise, Rails falls back to file logging and creates production.log, which is then baked into the image. Setting the environment variables after dnf install only affects runtime, not the install-time scriptlets.

This change depends on the related Foreman fix that preserves RAILS_LOG_TO_STDOUT across the runuser invocation in foreman-rake.

Related: # 11109

@red-hat-konflux-kflux-fedora-01

Copy link
Copy Markdown
Contributor

📦 Build complete!

Test this image with tag: quay.io/foreman/stage/foreman:pull-request-66

Built from commit: 88ca493b476256b7464563ee9326cd2e49f7652a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant