electron-pdf icon indicating copy to clipboard operation
electron-pdf copied to clipboard

How to deploy & run electron-pdf on ubuntu based server

Open bilashcse opened this issue 8 years ago • 1 comments

I have deployed electron-pdf on server. Cant run this with forever or pm2. So run this with electron app.js. But how to give the flexibility like forever or pm2 on electron-pdf to run simultaneously? I have use GNU screen to deploy. Whats the best solution for this?

bilashcse avatar Aug 17 '17 05:08 bilashcse

I haven't run multiple instances (a cluster) with PM2 so I can't speak to that much, but if your service you built is stateless I'd think that would work.

If you look though you might discover that this is bound primarily to the Memory and CPU of the spawned processes for the Electron windows and not the main event loop. In this scenario running a single process might be ok.

Since you mentioned Ubuntu you might also consider using Systemd instead of PM2 to manage keeping your service up. I'm personally running my export server as a Docker container with a restart-policy set. If you'd like any insight into that let me know.

codecounselor avatar Aug 18 '17 02:08 codecounselor