Commit 1c4b1f2e authored by Nikolai R Kristiansen's avatar Nikolai R Kristiansen

馃摑 Update README

parent 77d7d0af
# Installation
apt-get install libldap2-dev python-dev libsasl2-dev libssl-dev ldap-utils libffi-dev
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
# Create or modify local_settings.py
python manage.py migrate
```shell script
apt-get install libldap2-dev python-dev libsasl2-dev libssl-dev ldap-utils libffi-dev
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
# Create or modify local_settings.py
python manage.py migrate
```
## LDAP
sudo docker pull osixia/openldap
sudo docker run -e LDAP_DOMAIN=neuf.no -e LDAP_ORGANISATION="Neuf" -e LDAP_ROOTPASS="toor" -p 389:389 -d osixia/openldap
ldapadd -D "cn=admin,dc=neuf,dc=no" -w "toor" -f testdata.ldif
# Verify import
ldapsearch -x -b dc=neuf,dc=no
```shell script
docker pull osixia/openldap
docker run -e LDAP_DOMAIN=neuf.no -e LDAP_ORGANISATION="Neuf" -e LDAP_ROOTPASS="toor" -p 389:389 -d osixia/openldap
ldapadd -D "cn=admin,dc=neuf,dc=no" -w "toor" -f testdata.ldif
# Verify import
ldapsearch -x -b dc=neuf,dc=no
```
## Django postfix dovecot
* Get the code from https://git.neuf.no/edb/django-postfix-dovecot-api and follow the README
* Setup a user with `python manage.py createsuperuser` in that project
* Update the env variables `DPD_API_USERNAME` and `DPD_API_PASSWORD` in this project
* Start the server on port 8080 `python manage.py runserver 8080`
# Development
python manage.py runserver
# Log in with username 'test@example.com' and password 'test'
# Deploy
fab deploy
# Development tasks
```shell script
python manage.py runserver
python manage.py createsuperuser
```
# Deployment
```shell script
fab deploy
```
\ No newline at end of file
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