docs: Add requirements.txt and INSTALL.md documentation
This commit is contained in:
+85
@@ -0,0 +1,85 @@
|
||||
# Schmankerl Brotzeitportal
|
||||
|
||||
Modernes Bestell- und Verwaltungssystem f?r Brotzeiten und Speisen (FastAPI & MariaDB).
|
||||
|
||||
## Systemanforderungen
|
||||
- Debian 12 / 13 (oder kompatibles Linux)
|
||||
- Python 3.13+ mit `python3-venv`
|
||||
- Nginx (Reverse Proxy mit SSL)
|
||||
- MariaDB / MySQL Server (z. B. auf \`db.waiswuaschd.de:3306\`)
|
||||
|
||||
## 1. Installation
|
||||
```bash
|
||||
# Repository klonen
|
||||
cd /home/maxi/Projekt
|
||||
git clone https://gitea.sp13l.de/kobold-ai/schmankerl.git
|
||||
cd schmankerl
|
||||
|
||||
# Python Virtualenv erstellen und Abh?ngigkeiten installieren
|
||||
python3 -m venv venv
|
||||
./venv/bin/pip install --upgrade pip
|
||||
./venv/bin/pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## 2. Umgebungsvariablen (.env)
|
||||
Erstelle im Projektverzeichnis eine `.env` Datei:
|
||||
```ini
|
||||
DB_USER=v2_usr_wops
|
||||
DB_PASS=DeinSicheresPasswort
|
||||
DB_HOST=db.waiswuaschd.de
|
||||
DB_PORT=3306
|
||||
DB_NAME=v2_db_wops
|
||||
```
|
||||
|
||||
## 3. Systemd Service (/etc/systemd/system/schmankerl.service)
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Schmankerl Brotzeitportal (FastAPI)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=maxi
|
||||
Group=maxi
|
||||
WorkingDirectory=/home/maxi/Projekt/schmankerl
|
||||
ExecStart=/home/maxi/Projekt/schmankerl/venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8000 --workers 1
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
Aktivieren und starten:
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now schmankerl
|
||||
```
|
||||
|
||||
## 4. Nginx Reverse Proxy
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name demo.dev.waiswuaschd.de;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name demo.dev.waiswuaschd.de;
|
||||
|
||||
# SSL Zertifikate hier konfigurieren (z. B. via certbot)
|
||||
|
||||
location /static/ {
|
||||
alias /home/maxi/Projekt/schmankerl/app/static/;
|
||||
expires 7d;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,26 @@
|
||||
annotated-doc==0.0.5
|
||||
annotated-types==0.8.0
|
||||
anyio==4.15.1
|
||||
click==8.5.0
|
||||
fastapi==0.141.1
|
||||
greenlet==3.5.6
|
||||
h11==0.16.0
|
||||
httptools==0.8.0
|
||||
idna==3.20
|
||||
itsdangerous==2.2.0
|
||||
Jinja2==3.1.6
|
||||
MarkupSafe==3.0.3
|
||||
pydantic==2.13.5
|
||||
pydantic_core==2.46.5
|
||||
PyMySQL==1.2.3
|
||||
python-dotenv==1.2.3
|
||||
python-multipart==0.0.32
|
||||
PyYAML==6.0.3
|
||||
SQLAlchemy==2.0.54
|
||||
starlette==1.6.0
|
||||
typing-inspection==0.4.4
|
||||
typing_extensions==4.16.0
|
||||
uvicorn==0.53.0
|
||||
uvloop==0.22.1
|
||||
watchfiles==1.2.0
|
||||
websockets==17.1
|
||||
Reference in New Issue
Block a user