Search code examples
node.jsproduction-environmentpnpm

Using pnpm in a multi-user production environment


I'm working on creating an hosting server for multiple Node.js project. The projects would be owned by multiple UNIX users and be in their specific repository. I'm planning on using pm2 to monitor all the servers. To save space, I would like to use PNPM and have a global repository that all projects could use. Would this work at all (one PNPM store for multiple UNIX user), how would I secure the system (prevent users to modify depencies in global store).

Thanks for your help !


Solution

  • You could probably try using a pnpm store server. The store server would be a separate process that has access to the store. Other UNIX users would interact with the pnpm CLI that would delegate all commands to the store server.

    This is similar to how Glitch uses pnpm (v2). But I am not sure this feature works well in pnpm v4 as well.

    If you have more questions, you can ask in our Gitter chat.