- Fix Enter key detection: handle multiple Enter key formats (\n, \r, \r\n) - Reduce flickering: lower render frequency from 60 FPS to 30 FPS - Fix menu bar visibility: re-render menu bar after content to prevent overwriting - Fix content positioning: explicit line positioning for categories and commands - Fix line shifting: clear lines before writing, control newlines manually - Limit visible items: prevent overflow with maxVisibleCategories/Commands - Improve CPU usage: increase sleep interval when no events processed This fixes: - Enter key not working for selection - Strong flickering of the application - Menu bar not visible or being overwritten - Top half of selection list not displayed - Lines being shifted/misaligned
5.4 KiB
5.4 KiB
Server-Verzeichnisstruktur
Übersicht
Auf dem Production-Server (deploy@michaelschiemer) existieren zwei Hauptverzeichnisse im Home-Verzeichnis:
/home/deploy/
├── deployment/ # Infrastructure-as-Code (24M)
└── michaelschiemer/ # Application Code (491M)
Verzeichnis-Details
/home/deploy/deployment/ - Infrastructure Repository
Zweck: Enthält alle Deployment-Infrastruktur-Konfigurationen
Inhalt:
deployment/
├── stacks/ # Docker Compose Stacks
│ ├── traefik/ # Reverse Proxy & SSL
│ ├── gitea/ # Git Repository Server
│ ├── postgresql-production/
│ ├── postgresql-staging/
│ ├── production/ # Production Application Stack
│ ├── staging/ # Staging Application Stack
│ └── ...
└── backups/ # Backup-Dateien
Verwendet von:
- Ansible Playbooks für Infrastructure-Deployment
- Docker Compose für Container-Orchestrierung
- Traefik für Service Discovery
Ansible Variable:
stacks_base_path: "/home/deploy/deployment/stacks"
Verwendung in Playbooks:
setup-infrastructure.yml- Deployt alle Docker Stacksbackup.yml- Erstellt Backupssync-stacks.yml- Synchronisiert Stack-Konfigurationen
/home/deploy/michaelschiemer/ - Application Repository
Zweck: Enthält den eigentlichen Application-Code (PHP, Composer, etc.)
Inhalt:
michaelschiemer/
├── current/ # Symlink → Aktuelle deployed Version
│ ├── src/ # PHP Source Code
│ ├── vendor/ # Composer Dependencies
│ ├── composer.json
│ ├── worker.php
│ └── console.php
├── .archive/ # Alte Versionen (Rollback)
├── backups/ # Application-spezifische Backups
└── ...
Verwendet von:
- Ansible Playbooks für Application-Deployment
- Docker Container (gemountet als Volume)
- PHP-FPM, Queue Workers, etc.
Ansible Variable:
application_code_dest: "/home/deploy/michaelschiemer/current"
Verwendung in Playbooks:
deploy-application-code.yml- Deployt neuen Application Codesync-application-code.yml- Synchronisiert Codeinstall-composer-dependencies.yml- Installiert Dependencies
Warum zwei Verzeichnisse?
Trennung von Concerns
-
Infrastructure (
deployment/)- Ändert sich selten
- Wird von DevOps verwaltet
- Enthält Docker, Traefik, Datenbanken, etc.
-
Application (
michaelschiemer/)- Ändert sich häufig (bei jedem Deployment)
- Wird von Entwicklern verwaltet
- Enthält Business-Logic, PHP-Code, etc.
Vorteile
- Klarere Verantwortlichkeiten: Infrastructure vs. Application
- Einfacheres Backup: Separate Backups für Infrastructure und Code
- Bessere Skalierung: Infrastructure kann unabhängig vom Code aktualisiert werden
- Rollback-Möglichkeiten: Alte Application-Versionen in
.archive/
Deployment-Workflow
Infrastructure Deployment
# Infrastructure wird aus lokalem Repository deployed
ansible-playbook -i inventory/production.yml \
playbooks/setup-infrastructure.yml \
--vault-password-file secrets/.vault_pass
Was passiert:
- Ansible kopiert
deployment/stacks/auf den Server - Docker Compose startet Container basierend auf Stack-Konfigurationen
- Traefik entdeckt Services via Docker Labels
Application Deployment
# Application Code wird aus Gitea deployed
ansible-playbook -i inventory/production.yml \
playbooks/deploy-application-code.yml \
--vault-password-file secrets/.vault_pass
Was passiert:
- Ansible klont/pullt Code aus Gitea
- Code wird nach
~/michaelschiemer/current/deployed - Composer installiert Dependencies
- Docker Container werden neu gestartet (mit neuem Code)
Verzeichnis-Größen
# Aktuelle Größen (Stand: 2025-11-08)
24M /home/deploy/deployment # Infrastructure
491M /home/deploy/michaelschiemer # Application Code
Hinweis: Die Application ist größer, da sie Composer Dependencies (vendor/) enthält.
Wartung
Prüfen, ob beide Verzeichnisse existieren
ssh deploy@michaelschiemer.de
ls -la ~/deployment ~/michaelschiemer
Prüfen, ob current/ Symlink existiert
ls -la ~/michaelschiemer/current
# Sollte zeigen: current -> /path/to/version
Verzeichnis-Größen prüfen
du -sh ~/deployment ~/michaelschiemer
Troubleshooting
Problem: current/ Symlink fehlt
Lösung:
# Manuell erstellen oder Playbook ausführen
ansible-playbook -i inventory/production.yml \
playbooks/deploy-application-code.yml
Problem: Verzeichnis zu groß
Lösung:
# Alte Versionen aufräumen
rm -rf ~/michaelschiemer/.archive/*
# Composer Cache leeren
rm -rf ~/michaelschiemer/cache/*
Problem: Beide Verzeichnisse fehlen
Lösung:
# Infrastructure deployen
ansible-playbook -i inventory/production.yml \
playbooks/setup-infrastructure.yml
# Application deployen
ansible-playbook -i inventory/production.yml \
playbooks/deploy-application-code.yml
Siehe auch
- Deployment README - Übersicht über Deployment-Prozess
- Ansible Playbooks - Liste aller Playbooks
- Backup Guide - Backup-Strategie