Skip to content
Snippets Groups Projects
Commit 9b2f61db authored by Elias's avatar Elias
Browse files

update README.md

parent 70970053
No related branches found
No related tags found
No related merge requests found
Pipeline #6614 passed
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment