📝 Update README

This commit is contained in:
nikolark committed 2020-01-05 17:29:23 +01:00
1 parent 77d7d0af99
commit 1c4b1f2ede
1 file changed
+28 -21
+28 -21
View File
@@ -1,25 +1,32 @@
# 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
```