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

Fix Gateway frontend dockerfile #2122

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

zkokelj
Copy link
Contributor

@zkokelj zkokelj commented Nov 2, 2024

Why this change is needed

Currently docker container doesn't build. It needs fixing to be able to be deployed from main.

What changes were made as part of this PR

  • Changes in Dockerfile to allow it to build and start a contaner.
  • minor fix in deployment script

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Copy link
Contributor

@badgersrus badgersrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one very minor comment, lgtm


# Build the Next.js app
RUN pnpm run build

# Reduce the size of the final image by using a lighter base image
FROM node:20-alpine AS runner

# Install pnpm
RUN npm install -g pnpm
Copy link
Contributor

@badgersrus badgersrus Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one is redundant since its installed at the start? Not sure if that --prod flag works the same with pnpm at the latter stage but maybe @pbienek might know more

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a different image (base and runner image) and it needs pnpm installed.
As far as I know --prod flag doesn't install dev dependencies which makes runner image smaller.

@zkokelj zkokelj merged commit fafdc46 into main Nov 5, 2024
3 of 4 checks passed
@zkokelj zkokelj deleted the ziga/fix_gateway_frontend_docker branch November 5, 2024 12:22
zkokelj added a commit that referenced this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants