-
Notifications
You must be signed in to change notification settings - Fork 3
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
Optimize Docker for production builds #169
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.
Looks good, just some minor nits so it is more like the Flask template repo. We have the stages all in one file there, and you specify which stage you want to run in the command or in the docker-compose file you're running
… into sawyerh/83-docker-prod # Conflicts: # app/.storybook/preview.js # app/src/pages/_app.tsx
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.
LGTM, just 2 small nits
Ticket
#83, #108
Changes
Enable Next.js's
standalone
build option1, which should reduce the size of deployments:Update the
Dockerfile
to utilize the standalone build output, which should resolve Productionize Docker image #83Disable the
lazyCompilation
option in Storybook, which resolved Storybook doesn't fully work when ran within Docker #108Testing
Verified locally. You can test by going into the
app/
directory and running these in separate terminals:make dev
make storybook
To test the Production build:
make release-build
Footnotes
https://nextjs.org/docs/app/api-reference/next-config-js/output ↩