Skip to content
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

Ensure runtime defaults for LOG_LEVEL and CONSOLE_MODE #671

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ui/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ node_modules
npm-debug.log
README.md
.next
.git
.git
.env.*
14 changes: 12 additions & 2 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ARG log_level=info
ARG console_mode=read-only

FROM registry.access.redhat.com/ubi9/nodejs-18 AS deps
USER 0
WORKDIR /app
Expand All @@ -19,8 +22,8 @@ COPY . .
ARG backend_url=http://example
ARG console_metrics_prometheus_url=http://example
ARG nextauth_secret=examplesecret
ARG log_level=info
ARG console_mode=read-only
ARG log_level
ARG console_mode

ENV BACKEND_URL=$backend_url
ENV CONSOLE_METRICS_PROMETHEUS_URL=$console_metrics_prometheus_url
Expand All @@ -38,6 +41,13 @@ COPY --from=builder /app/public ./public
COPY --from=builder --chown=1001:1001 /app/.next/standalone ./
COPY --from=builder --chown=1001:1001 /app/.next/static ./.next/static

ARG log_level
ARG console_mode

# Ensure set to some default for runtime
ENV LOG_LEVEL=$log_level
ENV CONSOLE_MODE=$console_mode

USER 1001

EXPOSE 3000
Expand Down
Loading