Perplexica
Perplexica copied to clipboard
build(app): optimize app docker image by use Next.js standalone output mode
I change a way to reduce app docker image size. Next.js can set output to standalone mode, which copies only the necessary files for a production deployment including select files in node_modules
. So, the target docker image can only include the minimal necessary files to host the app.
If someone want to host it locally without docker, they can also simply run yarn build && yarn start
Hi, as I stated in your other PRs for optimizing the docker image, I still don't think there is a need for this. We're not really going crazy on production, the speed is really great and the images and decent in size. This would more harder to maintain than the Dockerfile we provide.