Skip to content

Commit

Permalink
Ensure runtime defaults for LOG_LEVEL and CONSOLE_MODE (#671)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar authored Apr 12, 2024
1 parent dd06658 commit d457675
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
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

0 comments on commit d457675

Please sign in to comment.