diff --git a/README.md b/README.md index 90c24a5..2c10fda 100644 --- a/README.md +++ b/README.md @@ -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 +``` \ No newline at end of file