logging, deployment stuff and readme

This commit is contained in:
TinyAtoms
2020-08-02 11:21:43 -03:00
parent e11ae55ed9
commit 43e5d71cec
10 changed files with 108 additions and 28 deletions

View File

@@ -5,7 +5,7 @@
4. move this nginx.conf to /etc/nginx
5. make whatever user nginx runs as (in this case, massiveatoms) the owner of calibredir
6. give execute permissions to parent of calibredir
7. cd to repo, run `gunicorn -w <2x n cores/threads> CalibreWebCompanion.wsgi`
7. cd to repo, run `gunicorn CalibreWebCompanion.wsgi`
8. start nginx `sudo systemctl restart nginx`
Slight issues with this atm:

View File

@@ -1,7 +1,7 @@
worker_processes 1;
# user nobody nogroup;
user massiveatoms; # MASSIVEATOMS
user massiveatoms;
# user nobody nobody; # for systems with 'nobody' as a group instead
error_log /home/massiveatoms/Desktop/logs/nginx.log warn;
# pid /var/run/nginx.pid;
@@ -38,13 +38,13 @@ http {
}
server {
listen 80 deferred; # for Linux MASSIVEATOMS
listen 80 deferred; # for Linux massiveatoms
# use 'listen 80 accept_filter=httpready;' for FreeBSD
# listen 80;
client_max_body_size 4G;
# set the correct host(s) for your site
server_name localhost www.localhost 192.168.1.4; # set this to the server url? or ip? we'll see MASSIVEATOMS
server_name localhost 192.168.1.4; # set this to the server url? or ip? we'll see MASSIVEATOMS
keepalive_timeout 5;
@@ -62,13 +62,17 @@ http {
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
# proxy_set_header Host $http_host;
# we don't want nginx trying to do something clever with
# redirects, we set the Host: header above already.
proxy_redirect off;
proxy_pass http://127.0.0.1:8000;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /path/to/app/current/public;