toppyr-stack/README.md

155 lines
4.9 KiB
Markdown
Raw Normal View History

# Toppyr Stack
Docker Compose Stack für **toppyr.de** — Self-Hosted Collaboration Suite.
## 🏗️ Architektur
```
┌─────────────────────────────────────────────────────────┐
│ Traefik (Reverse Proxy) │
│ Let's Encrypt SSL Termination │
└─────────────────────────────────────────────────────────┘
┌───────────────────────────┼───────────────────────────┐
│ Keycloak SSO │
│ sso.toppyr.de │
└───────────────────────────┼───────────────────────────┘
┌───────────────────────┼───────────────────────────┐
│ │ │ │ │
┌───▼───┐ ┌────▼────┐ ┌────▼────┐ ┌────▼────┐ ┌───────▼───────┐
│ Gitea │ │OpenProj.│ │ XWiki │ │ Postiz │ │ Monitoring │
│ repo. │ │ project.│ │ wiki. │ │ postiz. │ │ status./netd. │
└───────┘ └─────────┘ └─────────┘ └─────────┘ └───────────────┘
```
## 📦 Services
| Service | URL | Beschreibung |
|---------|-----|--------------|
| **Keycloak** | sso.toppyr.de | Single Sign-On, Identity Provider |
| **OpenProject** | project.toppyr.de | Projektmanagement, Tasks |
| **XWiki** | wiki.toppyr.de | Dokumentation, Wiki |
| **Gitea** | repo.toppyr.de | Git Repositories, CI/CD |
| **Postiz** | postiz.toppyr.de | Social Media Scheduler |
| **EspoCRM** | crm.toppyr.de | CRM System |
| **Mautic** | marketing.toppyr.de | Marketing Automation |
| **FreeScout** | support.toppyr.de | Helpdesk, Ticketing |
| **Nextcloud** | cloud.toppyr.de | Dateiverwaltung |
| **Uptime Kuma** | status.toppyr.de | Monitoring, Alerts |
| **Netdata** | netdata.toppyr.de | System Metrics |
| **lldap** | ldap.toppyr.de | LDAP Directory |
## 🚀 Deployment
### Voraussetzungen
- Docker & Docker Compose v2
- Domain mit DNS-Einträgen auf Server-IP
- Ports 80, 443, 2222 (SSH für Gitea) offen
### Installation
```bash
# Repository klonen
git clone https://repo.toppyr.de/tobias/toppyr-stack.git
cd toppyr-stack
# Environment konfigurieren
cp .env.example .env
# Passwörter generieren und eintragen
openssl rand -base64 32 # Für jedes Passwort-Feld
# Stack starten
docker compose up -d
```
### DNS-Einträge
Alle Subdomains als A-Record auf die Server-IP:
```
@, www, sso, wiki, project, status, crm, marketing, support,
postiz, ldap, netdata, gruen, cloud, repo → <SERVER_IP>
```
## 🔐 Authentifizierung
- **SSO via Keycloak** für: OpenProject, XWiki, Postiz, Gitea, Netdata
- **LDAP via lldap** für: OpenProject (read-only)
- **Standalone** für: EspoCRM, Mautic, FreeScout, Uptime Kuma
## 📁 Verzeichnisstruktur
```
toppyr-stack/
├── docker-compose.yml # Hauptkonfiguration
├── .env.example # Umgebungsvariablen-Template
├── .env # Echte Secrets (nicht committed!)
├── landing/
│ └── index.html # Landing Page toppyr.de
└── webhooks/
└── gitea-openproject-webhook.py # Git→OpenProject Integration
```
## 🔗 Integrationen
### Gitea → OpenProject Webhook
Commits mit `WP-123` im Message werden automatisch als Kommentar im Work Package gepostet.
```bash
# Beispiel Commit
git commit -m "WP-42: Feature implementiert"
```
### XWiki Git Macro
Code aus Gitea-Repos direkt im Wiki einbetten:
```wiki
{{git repository="https://repo.toppyr.de/tobias/toppyr-stack.git"
file="docker-compose.yml"
branch="main"}}
```
## 🧹 Wartung
```bash
# Logs anzeigen
docker compose logs -f <service>
# Service neustarten
docker compose restart <service>
# Updates
docker compose pull
docker compose up -d
# Backup Volumes
docker run --rm -v toppyr-stack_<volume>:/data -v $(pwd):/backup \
alpine tar czf /backup/<volume>.tar.gz /data
```
## 📊 Ressourcen
Getestete RAM-Limits (gesamt ~8-10 GB):
| Service | RAM Limit |
|---------|-----------|
| Keycloak | 2 GB |
| OpenProject | 4 GB |
| XWiki | 4 GB |
| Gitea | 512 MB |
| Postiz | 4 GB |
| Elasticsearch (Temporal) | 1 GB |
| Andere | 64-512 MB |
## 📝 Lizenz
Private Konfiguration für toppyr.de.
---
*Erstellt: März 2026*