improve install docs
This commit is contained in:
parent
e4f2e171b5
commit
beb7da7b0c
@ -19,6 +19,7 @@ Clone the repo and cd into::
|
|||||||
|
|
||||||
Then install the software with requirements to your virtual env::
|
Then install the software with requirements to your virtual env::
|
||||||
|
|
||||||
|
pip install -r requirements.d/dev.txt
|
||||||
pip install -e .
|
pip install -e .
|
||||||
|
|
||||||
|
|
||||||
@ -28,11 +29,16 @@ Configuration
|
|||||||
nsupdate.info Service
|
nsupdate.info Service
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Use a local_settings.py (do not modify the nsupdate/settings/*.py files directly)::
|
First, please read the nsupdate/settings/*.py files - they contain a lot of
|
||||||
|
settings you can use to customize your nsupdate.info installation. dev is for
|
||||||
|
a development setup, prod is for a production setup and base has settings that
|
||||||
|
are common for both.
|
||||||
|
|
||||||
from nsupdate.settings.prod import *
|
But do not change anything in there, but rather create your own
|
||||||
# override whatever you need to override here (read nsupdate/settings/*.py
|
local_settings.py file, import from our settings and override anything you want
|
||||||
# to get an overview over what you might need to customize):
|
to change afterwards.::
|
||||||
|
|
||||||
|
from nsupdate.settings.dev import *
|
||||||
SECRET_KEY='S3CR3T'
|
SECRET_KEY='S3CR3T'
|
||||||
|
|
||||||
IMPORTANT: you usually need to tell django what settings you want to use.
|
IMPORTANT: you usually need to tell django what settings you want to use.
|
||||||
@ -42,12 +48,20 @@ we'll assume that you either set DJANGO_SETTINGS_MODULE environment variable
|
|||||||
so it points to your settings module or that you give the --settings parameter
|
so it points to your settings module or that you give the --settings parameter
|
||||||
additionally with all commands that need it::
|
additionally with all commands that need it::
|
||||||
|
|
||||||
DJANGO_SETTINGS_MODULE=local_settings # this is YOUR settings file
|
export DJANGO_SETTINGS_MODULE=local_settings # this is YOUR settings file
|
||||||
or
|
or
|
||||||
django-admin.py --settings=local_settings ...
|
django-admin.py --settings=local_settings ...
|
||||||
python manage.py --settings=local_settings ...
|
python manage.py --settings=local_settings ...
|
||||||
|
|
||||||
|
|
||||||
|
Note: if Django can't import your local_settings module, make sure that your
|
||||||
|
python search path contains the directory that contains local_settings.py::
|
||||||
|
|
||||||
|
# we assume here that local_settings.py is in current directory.
|
||||||
|
# alternatively, you could also give a specific path instead of .
|
||||||
|
export PYTHONPATH=.:$PYTHONPATH
|
||||||
|
|
||||||
|
|
||||||
Initialize the database
|
Initialize the database
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
@ -82,6 +96,32 @@ Installation (for production)
|
|||||||
You usually will use a production webserver like apache or nginx (not Django's
|
You usually will use a production webserver like apache or nginx (not Django's
|
||||||
builtin "runserver").
|
builtin "runserver").
|
||||||
|
|
||||||
|
If you want to use a virtualenv: see the hints for development installation.
|
||||||
|
|
||||||
|
If you install from repo code, it is sufficient to use the production
|
||||||
|
requirements file (will install less packages than for development)::
|
||||||
|
|
||||||
|
pip install -r requirements.d/prod.txt
|
||||||
|
pip install -e .
|
||||||
|
|
||||||
|
Alternatively, you can just install the latest release from pypi::
|
||||||
|
|
||||||
|
pip install nsupdate
|
||||||
|
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
As described for testing/development, but use nsupdate.settings.prod in your
|
||||||
|
local_settings.py file.
|
||||||
|
|
||||||
|
Also, you will need to review the settings in the nsupdate.settings.prod
|
||||||
|
module and override everything that is different for your setup into your
|
||||||
|
local_settings.py file.
|
||||||
|
|
||||||
|
Note: if you do not setup ALLOWED_HOSTS correctly, your will just see status
|
||||||
|
400 errors.
|
||||||
|
|
||||||
WSGI
|
WSGI
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user