955 B
955 B
- clone repo
- pip install -r requirements.txt
- install gunicorn and nginx
- move this nginx.conf to /etc/nginx
- make whatever user nginx runs as (in this case, massiveatoms) the owner of calibredir
- give execute permissions to parent of calibredir
- cd to repo, run
gunicorn -w <2x n cores/threads> CalibreWebCompanion.wsgi
- start nginx
sudo systemctl restart nginx
Slight issues with this atm:
- allowed host in settings.json needs to have the ip/host/thing it will be used, as does line 47 from nginx.conf
- User needs to be edited in nginx.conf, now it's just my user acc. This affectd step 4-6
- logging location of nginx and gunicorn need to be changed. gunicorn in ./CalibreWebCompanion/gunicorn.conf.py and nginx in the conf
Suggestions:
- We might want to use sockets instead of ip/port?
- logging
- autostart gunicorn/nginx
- some extra instrumentation for gunicorn https://docs.gunicorn.org/en/latest/deploy.html