Go to file
XPS\Micro 2016767dcb perf: make user-template-next optional and optimize build process
Changes:
- install.sh: user-template-next is now only built if USER_TEMPLATE_IMAGE=user-template-next:latest is set in .env
  * Defaults to user-service-template (nginx) to save 4-5 minutes per install
  * Dynamic build step counting based on configured templates
  * Shows helpful message when template is skipped
  * Build numbering adapts automatically ([1/3] vs [1/4])

- user-template-next/Dockerfile: Optimize build performance
  * Pin Node version to 20.11-alpine for reproducibility
  * Use npm ci instead of npm install for faster, reproducible builds
  * Separate package.json copy for better layer caching
  * Add --prefer-offline and --no-audit flags to npm ci
  * Clean npm cache to reduce image size
  * Add clear comments for multi-stage build steps

Impact:
- Default installations: 2-3 minutes faster
- Reduced build time for Next.js template (when enabled) via layer caching
- Better reproducibility and predictable builds
2026-01-31 16:43:10 +01:00
docs Update documentation for v0.3.0 (admin features) 2026-01-31 07:06:13 +01:00
frontend feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
user-template Initial project structure with documentation 2026-01-30 18:00:41 +01:00
user-template-next perf: make user-template-next optional and optimize build process 2026-01-31 16:43:10 +01:00
.dockerignore Initial project structure with documentation 2026-01-30 18:00:41 +01:00
.env.example feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
.gitignore fix: wrap useSearchParams in Suspense boundary for Next.js 14 compatibility 2026-01-31 10:46:58 +01:00
admin_api.py feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
api.py feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
app.py Add admin features and email verification 2026-01-31 07:01:51 +01:00
auth.py Fix auth.py: redirect to frontend instead of rendering templates 2026-01-30 22:08:36 +01:00
config.py feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
container_manager.py feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
decorators.py Add admin features and email verification 2026-01-31 07:01:51 +01:00
docker-compose.yml fix: change frontend healthcheck from wget to curl for Debian slim compatibility 2026-01-31 13:14:50 +01:00
Dockerfile Initial project structure with documentation 2026-01-30 18:00:41 +01:00
email_service.py feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
IMPLEMENTATION-GUIDE.md feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
install.sh perf: make user-template-next optional and optimize build process 2026-01-31 16:43:10 +01:00
models.py feat: Implement passwordless authentication with Magic Links 2026-01-31 16:19:22 +01:00
README.md Initial project structure with documentation 2026-01-30 18:00:41 +01:00
requirements.txt Initial project structure with documentation 2026-01-30 18:00:41 +01:00

Container Spawner

Ein Flask-basierter Service zur automatischen Bereitstellung von isolierten Docker-Containern pro Benutzer mit Traefik-Integration. Benutzer registrieren sich, erhalten einen eigenen Container und eine personalisierte Subdomain.

Features

  • User-Management: Registrierung und Login mit sicherer Passwort-Speicherung
  • Automatisches Container-Spawning: Jeder User erhaelt einen eigenen Docker-Container
  • Dynamisches Routing: Traefik routet automatisch zu den User-Containern via Subdomain
  • Resource-Management: CPU- und RAM-Limits pro Container
  • Lifecycle-Management: Starten, Stoppen und Neustarten von User-Containern
  • Template-basiert: Neue User-Container aus vorgefertigten Images

Schnellstart

# Installation mit einem Befehl
curl -sSL https://gitea.iotxs.de/RainerWieland/spawner/raw/branch/main/install.sh | bash

Nach der Installation .env anpassen und erneut ausfuehren:

cp .env.example .env
nano .env  # Werte anpassen
bash install.sh

Voraussetzungen

  • Docker 20.10+
  • Docker Compose 2.0+
  • Traefik 2.x oder 3.x (laufend)
  • Bestehendes Docker-Netzwerk fuer Traefik

Dokumentation

Dokument Beschreibung
Installation Installationsanleitung und Updates
Architektur Technische Architektur und Komponenten
Sicherheit Sicherheitsrisiken und Massnahmen
Versionen Changelog und Versionierung
Bekannte Bugs Bekannte Probleme und Workarounds
Best Practices Dos and Don'ts

Projektstruktur

spawner/
├── app.py                 # Flask-Hauptanwendung
├── auth.py                # Authentifizierungs-Blueprint
├── container_manager.py   # Docker-Container-Management
├── models.py              # SQLAlchemy User-Modell
├── config.py              # Konfigurationsklassen
├── templates/             # Jinja2-Templates (Legacy)
├── frontend/              # Next.js Frontend
├── user-template/         # Docker-Template fuer User-Container
└── docs/                  # Dokumentation

Konfiguration

Alle Einstellungen erfolgen ueber Umgebungsvariablen in .env:

Variable Beschreibung
SECRET_KEY Flask Session Secret (generieren!)
BASE_DOMAIN Haupt-Domain (z.B. example.com)
SPAWNER_SUBDOMAIN Subdomain fuer Spawner-UI
TRAEFIK_NETWORK Docker-Netzwerk fuer Traefik
USER_TEMPLATE_IMAGE Docker-Image fuer User-Container

Siehe .env.example fuer alle Optionen.

Lizenz

MIT License - siehe Dokumentation fuer Details.


Version: 0.1.0 Repository: https://gitea.iotxs.de/RainerWieland/spawner