From 9b2f61db56ec287fccec3f34669c06532f77dbf3 Mon Sep 17 00:00:00 2001
From: Elias <elias.hanke@icloud.com>
Date: Mon, 29 Jul 2024 18:05:43 +0200
Subject: [PATCH] update README.md

---
 README.md | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index f39dc3a..a19b618 100644
--- a/README.md
+++ b/README.md
@@ -59,8 +59,36 @@ alembic upgrade head # to create (and update!) the database
 flask run
 ```
 
+Also, you have to set up the LDAP server in Flask. At the moment we are required to use a VPN or `lennonproxy` to access the LDAP server. The following command forwards the LDAP server to your local machine:
+
+```sh
+sudo ssh -D <your_forwarded_port> -p 80 <username>@lennon.cl.uni-heidelberg.de -L 636:ldap2:636
+python3 -m venv venv
+source venv/bin/activate
+pip install -r requirements.txt
+export FLASK_APP=portal
+alembic upgrade head # to create (and update!) the database
+flask run
+flask shell
+```
+
+```python
+>>> from portal.model import *
+>>> from portal import db
+>>> l = ldapDirectory()
+l = LdapDirectory()
+l.url = "ldaps://ldap2.cl.uni-heidelberg.de"
+l.base_dn= "ou=accounts,dc=cl,dc=uni-heidelberg,dc=de"
+db.session.add(l)
+db.session.commit()
+exit()
+```
+The app should run without problems now.
+
+Also, if you are using an Apple device, please deactivate the "AirPlay Receiver" as it might cause problems with the LDAP connection.
+
 ---
-#### Wichtig:
+#### Important:
 
 Alembic must always be up to date in order to update the database schema.
 Please run `alembic upgrade head` after pulling changes from the repository.
-- 
GitLab