Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.22 KB

File metadata and controls

41 lines (28 loc) · 1.22 KB

DrinkingBuddyServer

Setup

Install uv, then:

uv sync

Running

uv run flask --app ptl_buddy_server.app run --debug

Configuration

All configuration is via environment variables. Copy .env.example to .env and fill in the values — uv run picks it up automatically.

Variable Description Example
FLASK_SQLALCHEMY_ENGINES__default SQLAlchemy DB URL sqlite:////data/drinkingBuddy.db
FLASK_SECRET_KEY Flask session secret python -c "import secrets; print(secrets.token_hex())"
LDAP_URL LDAP server URL ldap://freeipa.lan.example.ch
LDAP_USER_SEARCH_BASE DN to search users under cn=users,cn=accounts,dc=example,dc=ch
LDAP_GROUP_SEARCH_BASE DN to search groups under cn=groups,cn=accounts,dc=example,dc=ch

Admin interface

Available at /admin. Login requires membership in the admins LDAP group.

Container

podman build -f Containerfile -t drinkingbuddyserver .
mkdir -p ./data
podman run -p 8000:8000 --env-file .env -v ./data:/data drinkingbuddyserver

The /data directory is where the SQLite database is stored. Mount a persistent directory there.