...
The site code is located in /home/nephwork/nephwork.renalreg.org
and is run on port 9887.
The standard construct used for configuring the required Django settings is used where by there is a settings folder containing settings files for different environments. There is a base settings file and then individualised settings files for the different environments (local and production in this case). The selection of the correct settings file is done by using the DJANGO_SETTINGS_MODULE
environment variable.
When running the site ensure the environment variable is appropriately set:
Code Block | ||
---|---|---|
| ||
# Settings files
ls -l nephwork/settings
total 20
-rw-r--r--. 1 nephwork nephwork 3975 Nov 25 16:32 base.py
-rw-r--r--. 1 nephwork nephwork 29 Nov 25 16:32 __init__.py
-rw-r--r--. 1 nephwork nephwork 429 Nov 25 16:32 local.py
-rw-r--r--. 1 nephwork nephwork 1213 Nov 25 16:32 production.py
# Configure productions settings
export DJANGO_SETTINGS_MODULE=nephwork.settings.production |
The site is managed using a script in /home/nephwork/bin/nephwork
which takes commands start, stop, force-reload/restart
...