Refer serious misconduct / Apply for QTS unable to upgrade to DfE Analytics GEM (v1.8.0) #70
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trello-1107
The problem is mainly seen during the rails assets:precompile step while the docker container is being built. This article here explains it well:
Three options considered to address the problem:
RAILS_SERVE_STATIC_FILES=true
for precompile in the Dockerfile:For example:
For example:
So Rails will always have ActionDispatch::Static apart from when it doesn't ! (When the container is being built or when
RAILS_SERVE_STATIC_FILES=true
). So 3 maybe is the safest option.I'm not entirely sure when
RAILS_SERVE_STATIC_FILES=false
will be set. Maybe when static assets are served from a reverse proxy web server like nginx. Needless to say, when that this is the case, then we wouldn't support any web pages that are cached though different mechanisms other that Rails and even then it must be done though ActionDispatch::Static middleware.The GIT Website works as
RAILS_SERVE_STATIC_FILES=false
is set in the Dockerfile, whereasRefer serious misconduct, Register and Apply for TT, Apply for QTS don't set RAILS_SERVE_STATIC_FILES in the Dockerfile, but I see it set in Terraform, so (3) should cover all the cases I see failing.