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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass OIDC config from .env to Backend and Frontend #458
Pass OIDC config from .env to Backend and Frontend #458
Changes from 2 commits
5ac8716
f666acc
cb643b7
735cbe7
8171f6c
e287887
f59a7a5
6b3b295
44c7353
7fcfeaf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most examples of
ARG
that I've seen haveARG
afterFROM
. But service.dockerfile hasARG
beforeFROM
. Maybe because there are twoFROM
s? Things seem to be working here withARG
beforeFROM
, but I could look more into this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a strange use of
ARG
, or perhaps a strange position for it in the dockerfile. Will setting it here mean every single layer in the dockerfile needs rebuilding whenOIDC_ENABLED
is toggled?Is it even necessary to set this in the dockerfile at all? Presumably
RUN files/prebuild/build-frontend.sh
can't pick up standard env vars set indocker-compose.yml
(?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved
ARG
to after the firstFROM
. Based on how I understand the docs, I think that's what's needed here.This question makes me wonder, should I move
ARG
even further down, to right beforeRUN files/prebuild/build-frontend.sh
? I don't think what comes before build-frontend.sh takes much time, so I doubt there'd be a big difference. But to be explicit, if anOIDC_*
config is changed, the Vue build will need to be rerun.That's my impression from reading some of the docs, but I'm definitely no Docker expert. I tried it out in a couple of commits here, and it does look like variables set in
environment
aren't available in the build. From the build for 735cbe7:From the build for 8171f6c (using
build.args
instead):There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it matters where the
ARG
is declared:I think declaring directly before use is probably better:
ARG
is usedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! I've moved
ARG
to right before build-frontend.sh.