Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to make a systemd service with pigallery2? #70

Closed
wechsler42 opened this issue Jun 2, 2019 · 4 comments
Closed

Question: How to make a systemd service with pigallery2? #70

wechsler42 opened this issue Jun 2, 2019 · 4 comments
Labels

Comments

@wechsler42
Copy link

wechsler42 commented Jun 2, 2019

Hi there,
In order to make a systemd service on my Debain 9 NAS with pigallery2 I tried to use the pm2 package according to the tutorial of digitalocean. Unfortunately, I failed. I must admit that the node npm world is rather new for me. However I tried "pm2 start node /my_directory/pigallery2/backend/index.js" but it threw errors. Perhaps someone could offer me a hint or a more suitable tutorial? Thanks in advance.

@bpatrik
Copy link
Owner

bpatrik commented Jun 3, 2019

Hi,

Unfortunately pigallery does not work with pm2. (PM2 is basically an instance/process manager for node, and pigallery manages its own instances).

There was an issue (#42) about the same topic earlier. You can try reading that one:
#42 (comment).

Short: I recommend running the app with systemctl on port like 3000 and using nginx as reverse proxy for that.

I hope this helps.

Best,
Patrik

@wechsler42
Copy link
Author

Thanks Patrik for the hint with #42 , I will try that. Just one question towards the reverse proxy. I thought I would skip that part due to the fact that my pigallery use case is restricted to to a LAN, so no WAN/Internet connections to pigaller2 are intentend. So is there any need of pigallery2 for a reverse proxy besides anonymisation, load balancing, etc?

@bpatrik
Copy link
Owner

bpatrik commented Jun 3, 2019

Hi
As far as I understand nginx helps for:

  • decreasing the load on node (well nginx is a heavily optimized app, while node runs javascript)
  • a recommended way of having HTTPs
  • hides your node, so probably better for security purposes

But if you only run it LAN for 1-2 users. you don't really need nginx.

@wechsler42
Copy link
Author

Thanks Patrik for clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants