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

Server should run as a system service #311

Open
pchote opened this issue Feb 24, 2018 · 1 comment
Open

Server should run as a system service #311

pchote opened this issue Feb 24, 2018 · 1 comment

Comments

@pchote
Copy link
Member

pchote commented Feb 24, 2018

Relying on a screen session (see INSTALL.md) is horrible. The resource center is now also running in a dedicated VM, so the virtualenvwrapper is unnecessary complexity.

https://github.com/warwick-one-metre/dashboard (dashboard.service, dashboard.ini) provides an example of how to run gunicorn through systemd, allowing it to automatically start on system boot, restart if it crashes, and generally be managed like any other service through systemctl.

@dsimmons87
Copy link
Collaborator

There's some information about setting up a systemd service on the Gunicorn website:

http://docs.gunicorn.org/en/stable/deploy.html#systemd

Regarding virtualenvwrapper, I've found this much easier to use than trying a system wide install personally, as it allows you to have a specific version of python, django and any other dependencies set up for a directory. This means that there is much less risk of conflicting with anything system-wide. I can also see this being easier for upgrading / initial set up.

I've found when trying to install globally, there is a mine field of python versions, pip versions and environment variables, which virtualenvwrapper handles very cleanly and easily for you.
I'm very new to python and django though.

Also the sample systemd config file looks like it should work with virtualenvwrapper, so I'd imagine it is possible to set up a systemd service either way.

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

No branches or pull requests

3 participants