|
|
@@ -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.
|
|
|
|