Skip to content

Commit

Permalink
fix(config): add support for runtime env vars in ConfigMap by using g…
Browse files Browse the repository at this point in the history
…etServerSideProps

fix: typo
  • Loading branch information
kahboom committed Mar 15, 2024
1 parent 55d233a commit 4953764
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
FROM registry.access.redhat.com/ubi9/nodejs-18@sha256:773645c3eae02529e09c04a843a0c6783de45b084b325685b043b7818c7a8bf6 as Build
#
COPY . .
USER root
COPY start.sh /start.sh
USER root
EXPOSE 3000
RUN echo "export PATH=${PATH}:$HOME/node_modules/.bin" >> ~/.bashrc && \
npm install --ignore-scripts && \
npm run build && \
chmod -R 777 /opt/app-root/src/.npm && \
npm cache clean --force
npm cache clean --force && \
chmod +x /start.sh
USER 1001
CMD ["npm", "run", "start"]
CMD ["/bin/sh", "/start.sh"]

LABEL \
com.redhat.component="trusted-artifact-signer-rekor-ui" \
Expand Down
5 changes: 5 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
modularizeImports: {
"@patternfly/react-icons": {
transform: "@patternfly/react-icons/{{member}}",
},
},
reactStrictMode: true,
transpilePackages: ["@patternfly/react-core", "@patternfly/react-styles"],
};
Expand Down
9 changes: 9 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN=$(http://rekor-server.rekor-server.svc.cluster.local)

# Export the NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN as an environment variable
export NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN

# Run npm start
exec npm start

0 comments on commit 4953764

Please sign in to comment.