Commit 3e3db53d authored by David Seaward's avatar David Seaward

update README with ini instructions

parent fbfc6b74
......@@ -12,30 +12,34 @@ Prerequisites
* Debian 8
* Python 3.4 / 3.5
* Django 1.11
* Debian packages:
* `libsasl2-dev`
* `libldap2-dev`
* `libssl-dev`
* `python3-dev`
* Python/Django packages: see `requires/requirements.txt`
* Includes Django 1.11.x
Other versions may work but are untested.
Setup
-----
* Create project folder (for example `/opt/purist_account/`)
* Copy project into project folder
* Create project folders:
* `/opt/purist_account/` (code)
* `/etc/opt/purist_account/` (configuration)
* `/var/opt/purist_account/static/` (static web files)
* `/var/log/purist_account/` (logs)
* Copy project code into `/opt/purist_account/`
* Install Debian prerequisites (`apt install libsasl2-dev` ...)
* Set up virtualenv
* Create virtualenv in project folder (`virtualenv . -p python3`)
* Activate virtualenv (`/opt/purist_account/bin/activate.py`)
* Install Python packages (`pip install -r requirements.txt`)
* Create virtualenv in project folder (`virtualenv . --python=python3`)
* Activate virtualenv (`./bin/activate.py`)
* Install Python packages (`pip install -r requires/requirements.txt`)
* Complete Django settings
* Create `/etc/opt/purist_account/config.ini` and
`/etc/opt/purist_account/secret.ini`
* Fill in settings values
* `cp ./conf/config.ini /etc/opt/purist_account/`
* `cp ./conf/secret.ini /etc/opt/purist_account/`
* Fill in settings
* Run `./manage.py migrate`
* Run `./manage.py createsuperuser`
* When prompted, enter the credentials of your LDAP superuser /
......
[settings]
# note that % must be escaped as %%
DEBUG=True
ALLOWED_HOSTS=localhost
STATIC_ROOT=/var/opt/prototype_account/static
REGISTRATION_OPEN=True
REG_PERSON_BASE_DN=ou=people,dc=example,dc=com
REG_PERSON_OBJECT_CLASSES=inetOrgPerson,organizationalPerson,person
REG_GROUP_BASE_DN=dc=comms,dc=example,dc=com
REG_GROUP_OBJECT_CLASSES=groupOfNames
AUTH_LDAP_SERVER_URI=ldap://ldap.example.com
AUTH_LDAP_START_TLS=True
AUTH_LDAP_BIND_DN=cn=admin,dc=example,dc=com
AUTH_LDAP_USER_SEARCH_BASE_DN=ou=people,dc=example,dc=com
[settings]
# note that % must be escaped as %%
SECRET_KEY=random_key
AUTH_LDAP_BIND_PASSWORD=ldap_password
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment