Bladeren bron

Merge branch 'master' of /srv/git/h0v1n8-website

tBKwtWS 6 jaren geleden
bovenliggende
commit
65b806847f
2 gewijzigde bestanden met toevoegingen van 19 en 7 verwijderingen
  1. 17 5
      README.md
  2. 2 2
      website_uwsgi.ini

+ 17 - 5
README.md

@@ -42,19 +42,31 @@ For now, set the database authentication details in the following files:
 1. website/website/settings.py
 1. rotbot/bot.py
 
-## Create the database tables.
+## Create the database tables and static files.
 
 1. `cd website`
 1. `python manage.py makemigrations`
 1. `python manage.py migrate`
+1. `python manage.py collectstatic`
+
+## uwsgi
+1. `sudo ln -s /opt/h0v1n8-website-env/website_uwsgi.ini /etc/uwsgi/vassals/website_uwsgi.ini`
+1. `sudo nano /etc/rc.local`
+```
+#!/bin/sh
+
+/opt/h0v1n8-env/bin/uwsgi --emperor /etc/uwsgi/vassals/ --daemonize /var/log/uwsgi-emperor.log`
+
+exit 0
+```
+Test with: `bin/uwsgi --emperor /etc/uwsgi/vassals/`
 
 ## Nginx configuration
 1. See if you to change `STATIC_ROOT` in `website/website/settings.py`.
-1. `ln -s /etc/nginx/sites-enables/`
+1. `sudo ln -s /opt/h0v1n8-website-env/website_nginx.conf /etc/nginx/sites-enabled/website_nginx.conf`
 1. `sudo systemctl reload nginx`
 
-## uwsgi
-uwsgi command: `/opt/h0v1n8-env/bin/uwsgi --emperor /etc/uwsgi/vassals/ --daemonize /var/log/uwsgi-emperor.log`
+
 
 # Testing the project.
 
@@ -63,7 +75,7 @@ uwsgi command: `/opt/h0v1n8-env/bin/uwsgi --emperor /etc/uwsgi/vassals/ --daemon
 1. `cd website`
 1. `python manage.py runserver`
 
-
+# Running the project
 ## pyRot
 The pythonic version of RotBot, there have been 5 earlier versions including winRot and javaRot.
 

+ 2 - 2
website_uwsgi.ini

@@ -2,7 +2,7 @@
 binary-path = /opt/h0v1n8-website-env/bin/uwsgi
 # Django-related settings
 # the base directory (full path)
-chdir           = /opt/h0v1n8-website-env/pyRot/webgui
+chdir           = /opt/h0v1n8-website-env/website
 # Django's wsgi file
 module          = webgui.wsgi
 # the virtualenv (full path)
@@ -14,7 +14,7 @@ master          = true
 # maximum number of worker processes
 processes       = 10
 # the socket (use the full path to be safe
-socket          = /opt/h0v1n8-env/website/website/webgui.sock
+socket          = /opt/h0v1n8-env/website/webgui.sock
 # ... with appropriate permissions - may be needed
 chmod-socket    = 666
 # clear environment on exit