-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add pulp-ui to pulp image #677
Conversation
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 like it a lot.
images/pulp/stable/Containerfile
Outdated
|
||
RUN <<EOF | ||
if [[ "$PULP_UI_URL" ]]; then | ||
mkdir -p /usr/share/nginx/static/pulp_ui |
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.
Is this the new /var/www ?
It's OK...
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.
Where should these files live? I was thinking I could put them in the pulp static directory (default: /var/lib/operator/static/), but I was worried if the user ran collectstatic with --clean then they would lose their UI as well.
images/pulp/stable/Containerfile
Outdated
|
||
ENV PULP_UI=true |
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 should probably depend on PULP_UI_URL... Or let's just make PULP_UI_URL the env var?
@@ -105,6 +105,17 @@ http { | |||
|
|||
include pulp/*.conf; | |||
|
|||
{% if ui | default(false) -%} |
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 could be if ui_url != ""
?
images/pulp/stable/Containerfile
Outdated
RUN <<EOF | ||
if [[ "$PULP_UI_URL" ]]; then | ||
mkdir -p "${PULP_STATIC_ROOT}pulp_ui" | ||
curl -Ls $PULP_UI_URL | tar -xzv -C "${PULP_STATIC_ROOT}pulp_ui" | ||
fi | ||
EOF |
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 haven't seen this "here document" thing in a container file before.
Can you try with \
on each lines end 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.
I couldn't get it to work with \
.
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.
Ok I got a version with \
to work, had to switch to using single [
for the if check.
4bfb1f9
to
bc878aa
Compare
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 all looks reasonable now, nice work.
There's many different ways to serve these files, here's one way I chose. Would like some feedback on this approach.
TODO: