Add useful commands to readme, chane ownership of log file

This commit is contained in:
Oliver Marks 2018-01-22 21:11:09 +00:00
parent 52bab868ff
commit 84db2d43d9
2 changed files with 4 additions and 2 deletions

View File

@ -97,5 +97,7 @@ return response.status_code
** Server
*** nginx
#+BEGIN_SRC bash
docker run -d --name=nginx olymk2/nginx -v /etc/nginx/sites-enabled/:/etc/nginx/sites-enabled/ -v /etc/letsencrypt/:/etc/letsencrypt/ -v /var/www/:/var/www/ -v sockets:/data/sockets -p 80:80 -p 443:443
docker run -d -v /etc/nginx/sites-enabled/:/etc/nginx/sites-enabled/ -v /etc/letsencrypt/:/etc/letsencrypt/ -v /var/www/:/var/www/ -v sockets:/data/sockets -p 80:80 -p 443:443 --name=nginx olymk2/nginx
#+END_SRC
letsencrypt certonly --renew --webroot -w /var/www/.well-known -d stage.maidstone-hackspace.org.uk
letsencrypt certonly --webroot -w /var/www/.well-known -d stage.maidstone-hackspace.org.uk

View File

@ -1,6 +1,6 @@
#!/bin/sh
rm -R /app/staticfiles/*
python /app/manage.py collectstatic --noinput
python /app/manage.py compilescss
chmod -R 664 /var/log/gunicorn
/usr/local/bin/gunicorn config.wsgi -w 2 -b unix:/data/sockets/stage-gunicorn-mhackspace.sock --error-logfile /var/log/gunicorn/stage-gunicorn-mhackspace.log --chdir=/app