Files
app-installer/README.md
SimolZimol 0f83f15588 new file: README.md
new file:   app.py
	new file:   config.example.json
	new file:   config.json
	new file:   docker_diagnose.py
	new file:   requirements.txt
	new file:   start.bat
	new file:   templates/available_projects.html
	new file:   templates/base.html
	new file:   templates/config.html
	new file:   templates/docker_status.html
	new file:   templates/index.html
	new file:   templates/project_details.html
	new file:   templates/project_details_fixed.html
	new file:   templates/project_details_new.html
	new file:   templates/project_details_old.html
	.gitignore
2025-07-04 23:50:04 +02:00

192 lines
4.3 KiB
Markdown

# App Installer & Manager
Ein Flask-basierter App-Installer und -Manager für Docker-basierte Projekte.
## Features
- 🚀 **Automatische Installation** von Git-Repositories mit Dockerfile
- 🔧 **Konfigurationsverwaltung** für .env-Dateien
- 🐳 **Docker-Integration** für Build, Start, Stop und Monitoring
- 📊 **Web-Dashboard** für Projektübersicht und -verwaltung
- 🔄 **Automatische Updates** der Projektliste
- 📋 **Masseninstallation** mehrerer Projekte
- 🛠️ **Container-Monitoring** mit Logs und Statistiken
## Quick Start
1. **Dependencies installieren:**
```bash
pip install -r requirements.txt
```
2. **Docker sicherstellen:**
```bash
docker --version
git --version
```
3. **Anwendung starten:**
```bash
python app.py
```
4. **Browser öffnen:**
```
http://localhost:5000
```
## Konfiguration
### Projektliste URL
Konfiguriere eine URL, die eine Liste von Git-Repositories zurückgibt. Unterstützte Formate:
**JSON Format:**
```json
[
{
"url": "https://gitea.simolzimol.net/Simon/quizify",
"name": "quizify",
"description": "Ein interaktives Quiz-System",
"language": "JavaScript",
"tags": ["quiz", "web"]
}
]
```
**Gitea API Beispiel:**
```
https://gitea.simolzimol.net/api/v1/repos/search?sort=updated&order=desc&limit=50
```
**GitHub API Beispiel:**
```
https://api.github.com/users/USERNAME/repos
```
### Projekt-Anforderungen
Jedes Projekt sollte enthalten:
- `Dockerfile` - Für Container-Builds
- `.env.example` - Für Umgebungskonfiguration
- Optional: `docker-compose.yml`
## API Endpoints
- `GET /` - Dashboard
- `GET /available_projects` - Verfügbare Projekte
- `GET /config` - Konfiguration
- `POST /install_project` - Projekt installieren
- `GET /build_project/<name>` - Projekt bauen
- `GET /start_project/<name>` - Projekt starten
- `GET /stop_project/<name>` - Projekt stoppen
- `GET /project_details/<name>` - Projektdetails
## Verzeichnisstruktur
```
app installer/
├── app.py # Hauptanwendung
├── requirements.txt # Python Dependencies
├── config.json # Konfigurationsdatei
├── config.example.json # Beispielkonfiguration
├── templates/ # HTML Templates
│ ├── base.html
│ ├── index.html
│ ├── available_projects.html
│ ├── config.html
│ └── project_details.html
├── projects/ # Geklonte Projekte
└── apps/ # Laufende Apps
```
## Unterstützte Git-Provider
- ✅ Gitea
- ✅ GitHub
- ✅ GitLab
- ✅ Beliebige Git-URLs
## Docker-Features
- Automatischer Build von Dockerfiles
- Port-Management (8080, 8443, custom)
- Container-Status-Monitoring
- Log-Anzeige in Echtzeit
- Resource-Monitoring (CPU, RAM, Netzwerk)
- Backup & Restore von Containern
## Sicherheit
- Isolierte Container-Umgebungen
- Konfigurierbare Port-Bereiche
- Sichere .env-Dateiverwaltung
- Optional: Docker Registry Integration
## Erweiterte Features
### Masseninstallation
Installiere mehrere Projekte gleichzeitig über das Web-Interface.
### Automatische Updates
Projektlisten werden automatisch aktualisiert basierend auf der konfigurierten Frequenz.
### Backup & Restore
- Automatische Backups vor Updates
- Manuelle Backup-Erstellung
- Wiederherstellung aus Backups
### Monitoring
- Container-Ressourcenverbrauch
- Netzwerk-Statistiken
- Log-Aggregation
- Status-Dashboard
## Beispiel-Projekt
Für ein Projekt wie `https://gitea.simolzimol.net/Simon/quizify`:
1. Repository wird automatisch geklont
2. `.env.example` → `.env` kopiert
3. Dockerfile wird gebaut
4. Container wird gestartet
5. Web-Interface zeigt Status an
## Troubleshooting
### Docker nicht verfügbar
```bash
# Windows
Install Docker Desktop
# Linux
sudo systemctl start docker
```
### Port bereits belegt
Der Installer erkennt belegte Ports automatisch und schlägt Alternativen vor.
### Build-Fehler
Überprüfe das Dockerfile und die .env-Konfiguration im Projektdetail-Panel.
## Roadmap
- [ ] Kubernetes-Unterstützung
- [ ] Multi-User-Management
- [ ] SSL/TLS-Zertifikat-Management
- [ ] Plugin-System
- [ ] Mobile-optimierte UI
- [ ] CI/CD-Integration
## Lizenz
MIT License - Siehe LICENSE Datei für Details.
## Beitrag
1. Fork das Repository
2. Erstelle einen Feature-Branch
3. Committe deine Änderungen
4. Push zum Branch
5. Erstelle einen Pull Request