feat: Initial commit for GrimHold with requirements and INSTALL.md
This commit is contained in:
+79
@@ -0,0 +1,79 @@
|
||||
# GrimHold - Dark Fantasy Tower Defense & PvP Raids
|
||||
|
||||
FastAPI-basiertes Dark Fantasy Tower Defense und PvP Raid Spiel mit SQLite Backend.
|
||||
|
||||
## Systemanforderungen
|
||||
- Debian 12 / 13 (oder kompatibles Linux)
|
||||
- Python 3.13+ mit `python3-venv`
|
||||
- Nginx (Reverse Proxy mit SSL)
|
||||
|
||||
## 1. Installation
|
||||
```bash
|
||||
# Repository klonen
|
||||
cd /home/maxi/Projekt
|
||||
git clone https://gitea.sp13l.de/kobold-ai/grimhold.git grimhold.waiswuaschd.de
|
||||
cd grimhold.waiswuaschd.de
|
||||
|
||||
# Python Virtualenv erstellen und Abh?ngigkeiten installieren
|
||||
python3 -m venv venv
|
||||
./venv/bin/pip install --upgrade pip
|
||||
./venv/bin/pip install -r requirements.txt
|
||||
|
||||
# Datenordner anlegen (falls Datenbank migriert wird)
|
||||
mkdir -p data
|
||||
# Bestehende grimhold.db hierhin kopieren: data/grimhold.db
|
||||
```
|
||||
|
||||
## 2. Systemd Service (/etc/systemd/system/grimhold.service)
|
||||
```ini
|
||||
[Unit]
|
||||
Description=GrimHold - Dark Fantasy Tower Defense & PvP Raids (FastAPI)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=maxi
|
||||
Group=maxi
|
||||
WorkingDirectory=/home/maxi/Projekt/grimhold.waiswuaschd.de
|
||||
Environment="PATH=/home/maxi/Projekt/grimhold.waiswuaschd.de/venv/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
ExecStart=/home/maxi/Projekt/grimhold.waiswuaschd.de/venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8004 --workers 1
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
Aktivieren und starten:
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now grimhold
|
||||
```
|
||||
|
||||
## 3. Nginx Reverse Proxy
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name grimhold.dev.waiswuaschd.de;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name grimhold.dev.waiswuaschd.de;
|
||||
|
||||
# SSL Zertifikate hier konfigurieren (z. B. via certbot)
|
||||
|
||||
location /static/ {
|
||||
alias /home/maxi/Projekt/grimhold.waiswuaschd.de/app/static/;
|
||||
add_header Cache-Control "no-cache, must-revalidate";
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8004;
|
||||
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;
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user