-
Notifications
You must be signed in to change notification settings - Fork 66
Initialization
Dylan Klomparens edited this page Jan 26, 2018
·
9 revisions
You will need a place to store media and static content that NEMO uses:
cd /home/nemo
mkdir media static
You'll need to generate a secret key which is used by Django for password and session hashing. The NEMO package comes with an executable script that assists with this. nemo generate_secret_key
will output a random 50 character key to standard output, which can be redirected to a file.
nemo generate_secret_key > django_secret_key.txt
Reference this file in your settings.py
by assigning
SECRET_KEY = get_file_contents('/path/to/django_secret_key.txt')
.
cd /home/nemo/
python3 manage.py makemigrations NEMO
python3 manage.py migrate
To start NEMO on the command line: gunicorn NEMO.wsgi:application
This will serve NEMO on the default address for Gunicorn: 127.0.0.1:8000
.
To test NEMO by fetching the root URL, use: curl 127.0.0.1:8000
or curl localhost:8000
- systemd configuration (automatic startup on boot, and more)
- ensure the firewall is open on TCP port 443
- Nginx reverse proxy and static content server