Perplexica icon indicating copy to clipboard operation
Perplexica copied to clipboard

build(app): optimize app docker image by use Next.js standalone output mode

Open WanQuanXie opened this issue 9 months ago • 1 comments

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.

WanQuanXie avatar May 08 '24 18:05 WanQuanXie

If someone want to host it locally without docker, they can also simply run yarn build && yarn start

WanQuanXie avatar May 08 '24 18:05 WanQuanXie

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.

ItzCrazyKns avatar May 12 '24 04:05 ItzCrazyKns