From 84db2d43d9d7ddca91a66450c9459ec9ef69fdac Mon Sep 17 00:00:00 2001 From: Oliver Marks Date: Mon, 22 Jan 2018 21:11:09 +0000 Subject: [PATCH] Add useful commands to readme, chane ownership of log file --- README.org | 4 +++- compose/django/stage-gunicorn-mhackspace.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 558d962..4da2ce4 100644 --- a/README.org +++ b/README.org @@ -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 diff --git a/compose/django/stage-gunicorn-mhackspace.sh b/compose/django/stage-gunicorn-mhackspace.sh index bbbc7a6..178d42e 100644 --- a/compose/django/stage-gunicorn-mhackspace.sh +++ b/compose/django/stage-gunicorn-mhackspace.sh @@ -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