D
Dokploy•8mo ago
Kerry Ritter

`npm install` and `tsc` crashes server

* NestJS app, about 50K LoC * 2GB/2vCPU server on AWS Lightsail, Debian 12 * Dockerfile FROM node:18-alpine Every time I do a deployment, either the npm install --no-audit or tsc eats up all the resources and hangs the server. Anyone have a similar issue? Considered changing to pnpm or something but that install time also kinda sucks. Thinking about delegating build responsibility elsewhere and sending a compiled output to Dokploy for deployment and hosting.
5 Replies
Siumauricio
Siumauricio•8mo ago
Hmm well if you are building a 50k loc of nestjs app probably 2gb/vcpu would not be enough, you have two options: 1. Build the application in a CI/CD and then push to a registry and then in dokploy just download the image and run, so you don't have to build the image in the server 2. Increase the resources of your machine, more RAM,etc.... The first option is the best to me since you are not using the server to build the application only to run the application which is basically download and run
Kerry Ritter
Kerry RitterOP•8mo ago
agreed. sounds good to me. today i run the app on 256MB lambdas, so i'd hate to scale the server just to support the build 🙂
Siumauricio
Siumauricio•8mo ago
yeah in that case makes more sense the first option
Kerry Ritter
Kerry RitterOP•8mo ago
thank you! i'm very impressed by dokploy. definitely one of the tools in the space, been sharing with all my friends. looking forward to getting some more time with it.
Siumauricio
Siumauricio•8mo ago
Thanks

Did you find this page helpful?