Commit Graph

18 Commits

Author SHA1 Message Date
XPS\Micro
5d2c556c33 fix: install.sh - Automatisches Beheben von Git Berechtigungsbits-Problemen auf Synology
- Ersetze stash/pull durch git reset --hard origin/main
- Verhindert 'local changes would be overwritten' Fehler
- Synology ändert automatisch Berechtigungsbits (100644 vs 100755)
- Diese sind KEINE echten Code-Änderungen, daher direkt Remote-Version nehmen
- install.sh läuft jetzt vollautomatisch ohne Fehler
2026-02-03 14:57:04 +01:00
XPS\Micro
415253b287 reads eleminated 2026-02-03 07:11:59 +01:00
XPS\Micro
691c93292b feat: implement .env-based template building for install.sh
- Read USER_TEMPLATE_IMAGES from .env to determine which templates to build
- Parse semicolon-separated template list and extract image names with tags
- Only build templates defined in .env, not all user-template-* directories
- Validate that template directories and Dockerfiles exist
- Warn when template is defined but directory/Dockerfile missing
- Warn about unused template directories not in USER_TEMPLATE_IMAGES
- Fallback to old logic (build all) when USER_TEMPLATE_IMAGES undefined
- Maintains backward compatibility with existing installations
- Improves .env.example with better documentation and examples
2026-02-02 16:40:45 +01:00
XPS\Micro
10b28179fc feat: implement dynamic template system with auto-detection
**Backend (config.py):**
- Add dynamic template loading from USER_TEMPLATE_IMAGES (.env)
- Add template metadata loading from templates.json
- Implement automatic type extraction from image names
- Remove hardcoded template definitions (dev/prod)
- Maintain legacy USER_TEMPLATE_IMAGE for backward compatibility

**Configuration:**
- Add templates.json with metadata for template-01, template-02, template-next
- Update .env.example with new USER_TEMPLATE_IMAGES variable (semicolon-separated)
- Document automatic template type extraction

**Installation (install.sh):**
- Implement auto-detection for all user-template-* directories
- Replace hardcoded template builds with dynamic loop
- Calculate TOTAL_BUILDS dynamically
- Add special handling for Next.js templates

**Documentation:**
- Move MVP_DEPLOYMENT_GUIDE.md to docs/install/DEPLOYMENT_GUIDE.md
- Add "Dynamic Template System" section to CLAUDE.md
- Update docs/install/README.md with Quick Links and dynamic system info
- Add references to deployment guide in CLAUDE.md

**Templates:**
- Reorganize user-template/ → user-template-01/ (Nginx Basic)
- Add user-template-02/ (Nginx Advanced)
- Keep user-template-next/ unchanged

**Benefits:**
- Unlimited number of templates (no longer hardcoded to 2)
- Metadata-driven display in dashboard
- Automatic image discovery and building
- Extensible without code changes

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-01 09:04:59 +01:00
XPS\Micro
5cfad38b3c fix: ensure user-template-next is always built for multi-container MVP
The install.sh script was only building user-template-next when
USER_TEMPLATE_IMAGE=user-template-next:latest was set in .env, which
was an old single-container configuration.

Changes:
- Remove dependency on USER_TEMPLATE_IMAGE for building user-template-next
- Always build user-template-next when directory exists
- Add user-template-next to TOTAL_BUILDS count automatically
- Change user-template-next build from optional warning to required
- Update build output to clearly show multi-container template building
- Update final installation summary to show template configuration

This ensures both dev and prod templates are always built for the
Multi-Container MVP, regardless of legacy .env settings.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-31 21:22:09 +01:00
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
XPS\Micro
20a0f3d6af feat: Implement passwordless authentication with Magic Links
Major changes:
- Remove username and password_hash from User model
- Add MagicLinkToken table for one-time-use email authentication
- Implement Magic Link email sending with 15-minute expiration
- Update all auth endpoints (/login, /signup) to use email only
- Create verify-signup and verify-login pages for token verification
- Container URLs now use slug instead of username (e.g., /u-a3f9c2d1)
- Add rate limiting: max 3 Magic Links per email per hour
- Remove password reset functionality (no passwords to reset)

Backend changes:
- api.py: Complete rewrite of auth routes (magic link based)
- models.py: Remove username/password, add slug and MagicLinkToken
- email_service.py: Add Magic Link generation and email sending
- admin_api.py: Remove password reset, update to use email identifiers
- container_manager.py: Use slug instead of username for routing
- config.py: Add MAGIC_LINK_TOKEN_EXPIRY and MAGIC_LINK_RATE_LIMIT

Frontend changes:
- src/lib/api.ts: Update auth functions and User interface
- src/hooks/use-auth.tsx: Implement verifySignup/verifyLogin
- src/app/login/page.tsx: Email-only login form
- src/app/signup/page.tsx: Email-only signup form
- src/app/verify-signup/page.tsx: NEW - Signup token verification
- src/app/verify-login/page.tsx: NEW - Login token verification
- src/app/dashboard/page.tsx: Display slug instead of username

Infrastructure:
- install.sh: Simplified, no migration needed (db.create_all handles it)
- .env.example: Add MAGIC_LINK_TOKEN_EXPIRY and MAGIC_LINK_RATE_LIMIT
- Add IMPLEMENTATION-GUIDE.md with detailed setup instructions

Security improvements:
- No password storage = no password breaches
- One-time-use tokens prevent replay attacks
- 15-minute token expiration limits attack window
- Rate limiting prevents email flooding

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-31 16:19:22 +01:00
XPS\Micro
676fcea493 fix: correct indentation in spawner-api error handling
- Fixed indentation mismatch in error handling block
- Consistent with other build error blocks
2026-01-31 12:49:31 +01:00
XPS\Micro
912904802c chore: unified logging in install.sh
- All build logs now written to spawner-install.log
- Added clear section headers for each build
- Replaced separate temp log files with single log file
- Added log file path hint at end of installation
2026-01-31 12:30:16 +01:00
XPS\Micro
9e352f7430 Remove --progress=plain flag for older Docker versions (Synology) 2026-01-30 23:03:40 +01:00
XPS\Micro
e27693a1a2 Fix Docker build verification: check exit code and image existence 2026-01-30 22:58:34 +01:00
XPS\Micro
d2a2905369 Fix git safe.directory for NAS/Synology environments 2026-01-30 22:29:25 +01:00
XPS\Micro
68e1320d20 Add --no-cache to all Docker builds 2026-01-30 21:56:15 +01:00
XPS\Micro
c80d3c0d92 Script modified 2026-01-30 21:45:27 +01:00
XPS\Micro
43c26dc8f8 script optimized for Synology NAS 2026-01-30 21:16:23 +01:00
XPS\Micro
31165c9367 add indicator 2026-01-30 21:09:02 +01:00
XPS\Micro
6664be6149 script modified (add Versionchecks) 2026-01-30 18:06:52 +01:00
XPS\Micro
c363351483 Initial project structure with documentation 2026-01-30 18:00:41 +01:00