Resolved multiple critical discovery system issues: ## Discovery System Fixes - Fixed console commands not being discovered on first run - Implemented fallback discovery for empty caches - Added context-aware caching with separate cache keys - Fixed object serialization preventing __PHP_Incomplete_Class ## Cache System Improvements - Smart caching that only caches meaningful results - Separate caches for different execution contexts (console, web, test) - Proper array serialization/deserialization for cache compatibility - Cache hit logging for debugging and monitoring ## Object Serialization Fixes - Fixed DiscoveredAttribute serialization with proper string conversion - Sanitized additional data to prevent object reference issues - Added fallback for corrupted cache entries ## Performance & Reliability - All 69 console commands properly discovered and cached - 534 total discovery items successfully cached and restored - No more __PHP_Incomplete_Class cache corruption - Improved error handling and graceful fallbacks ## Testing & Quality - Fixed code style issues across discovery components - Enhanced logging for better debugging capabilities - Improved cache validation and error recovery Ready for production deployment with stable discovery system. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
129 lines
2.4 KiB
Markdown
129 lines
2.4 KiB
Markdown
# Netcup Quick Setup Guide
|
|
|
|
## 1. Server vorbereiten
|
|
|
|
### Netcup VPS bestellen
|
|
- **Mindestens:** VPS 200 G8 (2 CPU, 4GB RAM)
|
|
- **OS:** Ubuntu 22.04 LTS
|
|
- **Netzwerk:** IPv4 + IPv6
|
|
|
|
### SSH-Key installieren
|
|
```bash
|
|
# SSH-Key generieren (falls noch nicht vorhanden)
|
|
ssh-keygen -t ed25519 -C "netcup-deploy"
|
|
|
|
# Key zum Server kopieren
|
|
ssh-copy-id root@DEINE-SERVER-IP
|
|
```
|
|
|
|
## 2. Konfiguration
|
|
|
|
### Basis-Einstellungen
|
|
```bash
|
|
# Server-Details eintragen
|
|
vim inventory/hosts.yml
|
|
```
|
|
|
|
**Wichtig ändern:**
|
|
- `ansible_host: 85.123.456.789` → deine Netcup IP
|
|
- `domain: "example.com"` → deine Domain
|
|
- `ssl_email: "admin@example.com"` → deine E-Mail
|
|
- `git_repo: "https://github.com/user/repo.git"` → dein Git Repository
|
|
|
|
### DNS konfigurieren
|
|
Stelle sicher dass deine Domain zur Netcup IP zeigt:
|
|
```bash
|
|
# A-Record setzen
|
|
example.com. IN A DEINE-NETCUP-IP
|
|
```
|
|
|
|
## 3. App-Anforderungen
|
|
|
|
Deine App braucht:
|
|
- **Dockerfile** im Repository-Root
|
|
- **Port 3000** (oder ändere `app_port` in hosts.yml)
|
|
- **Health-Check** Endpoint `/health` (oder ändere `health_check_url`)
|
|
|
|
### Beispiel Dockerfile (Node.js)
|
|
```dockerfile
|
|
FROM node:18-alpine
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci --only=production
|
|
COPY . .
|
|
EXPOSE 3000
|
|
CMD ["npm", "start"]
|
|
```
|
|
|
|
### Beispiel Health-Check (Express.js)
|
|
```javascript
|
|
app.get('/health', (req, res) => {
|
|
res.json({ status: 'ok', timestamp: new Date().toISOString() });
|
|
});
|
|
```
|
|
|
|
## 4. Deployment
|
|
|
|
```bash
|
|
# Einfach deployen
|
|
make deploy
|
|
|
|
# Oder manuell
|
|
./deploy.sh
|
|
```
|
|
|
|
## 5. Troubleshooting
|
|
|
|
### Server nicht erreichbar?
|
|
```bash
|
|
# Ping testen
|
|
ping DEINE-SERVER-IP
|
|
|
|
# SSH testen
|
|
ssh root@DEINE-SERVER-IP
|
|
|
|
# Firewall prüfen (auf dem Server)
|
|
ufw status
|
|
```
|
|
|
|
### SSL-Probleme?
|
|
```bash
|
|
# DNS prüfen
|
|
nslookup DEINE-DOMAIN
|
|
|
|
# Certbot manuell
|
|
ssh root@DEINE-SERVER-IP
|
|
certbot certificates
|
|
```
|
|
|
|
### App startet nicht?
|
|
```bash
|
|
# Logs anschauen
|
|
make logs
|
|
|
|
# Container status
|
|
ansible all -m shell -a "docker ps -a"
|
|
|
|
# Ins Container einsteigen
|
|
ansible all -m shell -a "docker exec -it CONTAINER_NAME sh"
|
|
```
|
|
|
|
## 6. Nach dem Deployment
|
|
|
|
- ✅ **App testen:** https://deine-domain.com
|
|
- ✅ **Health-Check:** https://deine-domain.com/health
|
|
- ✅ **SSL prüfen:** https://www.ssllabs.com/ssltest/
|
|
- ✅ **Performance:** https://pagespeed.web.dev/
|
|
|
|
## 7. Updates
|
|
|
|
```bash
|
|
# App updaten (git pull + rebuild)
|
|
make update
|
|
|
|
# Logs nach Update prüfen
|
|
make logs
|
|
```
|
|
|
|
Das war's! Deine App läuft jetzt auf Netcup mit SSL! 🎉
|