Elektrine lite

← Feed

@warkolm@aus.social

Post #3850181

2026-07-16 01:34 UTC

hey #nodejs fans I need some advice for something new to me if someone is building code on their mac laptop and we want to deploy it on a different server we need to run nnpm install to grab the right packages for the different cpu architectures I found docker as one option, a ci pipeline as another. I can think of an approach using shell scripting as well is there a general consensus around how to handle this? #devops

Replies (1)

  • @auxesis@infosec.exchange 2026-07-16 04:25

    @warkolm@aus.social Given what you've described, Docker is likely the best option. Depends on the vintage of the stack, but if it's < 4 years old there's a good chance your production build won't include any packages that have native extensions. That may mean you can get away with an npm install --omit=dev on the target server, but then your build and deploy environments are mixed. That might be an acceptable tradeoff for you 🤷‍♂️ Container images built by CI as @cafuego@misanthrope.social suggested is more upfront work, but lower ongoing maintenance.

    Open ##3850180