philflow.io — Craft CMS 5 site (Phil Lütje, Agentic Engineering, Compound Engineering blog)
- SCSS 33.1%
- Twig 25.6%
- Shell 13.1%
- JavaScript 12.7%
- PHP 10.2%
- Other 5.3%
DEPLOYMENT.md captures the actual workflow from the 2026-05-20 deploy including the four gotchas we hit (Redis port conflict with raven-stack, missing php-fpm-healthcheck binary, wrong compose-file, persistent volume drift for web/dist/ + assets). Plus pre-deploy backup, entry content sync via MCP, and rollback steps. CLAUDE.md "Offene Drift" section reflects that prod is now on PHP 8.3.31 with stimmt/craft-mcp 1.2.2 — points at DEPLOYMENT.md for the details instead of duplicating them inline. |
||
|---|---|---|
| backups | ||
| config | ||
| configs | ||
| db | ||
| docker | ||
| docs | ||
| src | ||
| storage | ||
| templates | ||
| web | ||
| .claude.md | ||
| .dockerignore | ||
| .env.docker.example | ||
| .env.production.example | ||
| .gitignore | ||
| .htaccess | ||
| backup.sh | ||
| BACKUP_GUIDE.md | ||
| bootstrap.php | ||
| CLAUDE.md | ||
| composer.json | ||
| composer.lock | ||
| CPRESOURCES_FIX.md | ||
| craft | ||
| deploy-existing-traefik.sh | ||
| deploy-existing-traefik_backup.sh | ||
| deploy.sh | ||
| DEPLOY_EXISTING_TRAEFIK.md | ||
| DEPLOYMENT-SUMMARY.md | ||
| DEPLOYMENT.md | ||
| DEPLOYMENT_ANALYSIS.md | ||
| DEPLOYMENT_FIX_LOG.md | ||
| DEPLOYMENT_QUICKSTART.md | ||
| docker-compose.local.yml | ||
| docker-compose.prod.yml | ||
| docker-compose.standalone.yml | ||
| docker-compose.traefik.yml | ||
| docker-compose.yml | ||
| DOCKER_PRODUCTION.md | ||
| DOCKER_SETUP.md | ||
| Dockerfile | ||
| Dockerfile.local | ||
| Dockerfile.prod | ||
| Makefile | ||
| MIGRATION_PLAN.md | ||
| package-lock.json | ||
| package.json | ||
| PERFORMANCE_COMPARISON.md | ||
| PERFORMANCE_OPTIMIZATION_PLAN.md | ||
| PERFORMANCE_REPORT.md | ||
| postcss.config.mjs | ||
| QUICK_START.md | ||
| README.md | ||
| README.production.md | ||
| README_DEPLOYMENT.md | ||
| restore.sh | ||
| SERVER_ANALYSIS.md | ||
| SPEED_INDEX_ISSUE_SOLUTIONS.md | ||
| TEST_ANLEITUNG.md | ||
| vite.config.js | ||
| WEBP_FIX_SUMMARY.md | ||
| webpack.config.js | ||
🚀 PhilFlow Website
Production-Ready CraftCMS Docker Setup
📋 Übersicht
PhilFlow ist eine professionelle Business-Website für Workflow-Automatisierung und Prozessoptimierung.
Dieses Repository enthält ein produktionsreifes Docker-Setup mit:
- ✅ Zero-Exec Architecture - Keine manuellen docker exec Befehle nötig
- ✅ Multi-Stage Build - Optimierte, kleine Images
- ✅ Automatische Initialisierung - DB-Import, Migrations, Config-Apply
- ✅ Makefile Automation - Einfache, lesbare Befehle
- ✅ Production Best Practices - Security, Performance, Monitoring
🎯 Quick Start
Lokale Entwicklung
# 1. Start
docker compose -f docker-compose.local.yml up -d
# 2. Öffnen
open http://localhost:8090
URLs:
- Website: http://localhost:8090
- Admin: http://localhost:8090/admin
- PhpMyAdmin: http://localhost:8081
- Redis Commander: http://localhost:8082
Production Deployment
# 1. Config
cp .env.production .env
nano .env # Passwords anpassen
# 2. DB Dump platzieren (optional)
cp backup.sql.gz docker/mariadb/initdb/database.sql.gz
# 3. Deploy
make deploy-init
# FERTIG! 🎉
👉 Lies README_DEPLOYMENT.md für Details!
🛠️ Tech Stack
Backend
- CraftCMS 5.8.19 - Content Management System
- PHP 8.2-FPM - Application Server
- MariaDB 11.4 - Database
- Redis 7 - Cache & Sessions
- Nginx Alpine - Web Server
Frontend
- Vite - Build Tool
- Vue 3 - Progressive Framework
- AlpineJS - Lightweight Reactivity
- GSAP - Animations
- Swiper - Sliders
DevOps
- Docker - Containerization
- Docker Compose - Multi-Container Orchestration
- Make - Automation
📁 Projekt-Struktur
philflow_io_website/
│
├── 🐳 DOCKER PRODUCTION SETUP
│ ├── Dockerfile.prod # Multi-Stage Production Build
│ ├── docker-compose.prod.yml # Production Compose
│ ├── docker-compose.local.yml # Local Development
│ └── Makefile # Automation Commands
│
├── 🔧 ENTRYPOINT SCRIPTS
│ └── docker/
│ ├── php/docker-entrypoint.sh # Auto PHP Init
│ └── mariadb/initdb/01-init.sh # Auto DB Import
│
├── 🎨 CRAFTCMS APPLICATION
│ ├── config/ # CraftCMS Config
│ ├── templates/ # Twig Templates
│ ├── web/ # Public Web Root
│ │ ├── dist/ # Built Assets
│ │ └── assets/ # User Uploads
│ ├── storage/ # Runtime & Logs
│ ├── composer.json # PHP Dependencies
│ └── package.json # NPM Dependencies
│
└── 📚 DOKUMENTATION
├── README.md # Dieser File
├── README_DEPLOYMENT.md # 👉 Start hier!
├── DOCKER_PRODUCTION.md # Vollständige Doku
├── .claude.md # Claude AI Context
├── SERVER_ANALYSIS.md # Original Server Analysis
└── BACKUP_GUIDE.md # Backup & Restore
🚀 Deployment
Mit Makefile (Empfohlen)
make help # Alle Befehle anzeigen
# Deployment
make deploy-init # Erste Deployment
make deploy-update # Updates deployen
# Container Management
make up # Starten
make down # Stoppen
make restart # Neu starten
make rebuild # Neu bauen & starten
# Monitoring
make logs # Live Logs
make status # Container Status
make health # Health Check
# Backup
make backup # DB Backup
make restore BACKUP=file.sql.gz
# Maintenance
make clear-cache # Cache löschen
make craft CMD="help" # Craft CLI
Manuell
# Build
docker compose -f docker-compose.prod.yml build
# Start
docker compose -f docker-compose.prod.yml up -d
# Logs
docker compose -f docker-compose.prod.yml logs -f
# Stop
docker compose -f docker-compose.prod.yml down
📚 Dokumentation
🎯 Start hier:
-
- Quick Start Guide
- 3-Schritte-Deployment
- Häufige Befehle
-
- Vollständige Dokumentation
- Alle Features erklärt
- Troubleshooting
- Best Practices
-
- Für Claude AI / Entwickler
- Projekt-Kontext
- Wichtige Konzepte
- Häufige Probleme
📖 Weitere Dokumente:
- SERVER_ANALYSIS.md - Original Server Analyse
- BACKUP_GUIDE.md - Backup & Restore Strategien
🔑 Features
✅ Zero-Exec Architecture
Vorher (Schlecht):
docker compose up -d
docker compose exec php composer install # 💩
docker compose exec php npm run build # 💩
docker compose exec mariadb mysql < dump.sql # 💩
Jetzt (Gut):
make deploy-init
# FERTIG! ✨
✅ Multi-Stage Docker Build
- Stage 1: Build Dependencies (Composer, NPM)
- Stage 2: Production Runtime (klein & optimiert)
- Ergebnis: ~300-400MB statt >2GB
✅ Automatische Initialisierung
PHP Container:
- Wartet auf DB & Redis
- Setzt Permissions
- Führt
project-config/applyaus - Führt Migrations aus
- Löscht Caches
MariaDB Container:
- Sucht nach
database.sql.gz - Importiert automatisch beim ersten Start
✅ Production Best Practices
- OPcache optimiert
- Redis persistent storage
- Nginx caching
- Security headers
- Health checks
- Logging
- Backups
🔧 Konfiguration
Environment Variables
# Kopiere Template
cp .env.production .env
# Wichtige Variablen:
CRAFT_ENVIRONMENT=production # production | dev
CRAFT_DEV_MODE=false # true | false
PRIMARY_SITE_URL=https://philflow.io
CRAFT_DB_PASSWORD=strong-password
MYSQL_ROOT_PASSWORD=another-password
Datenbank Import
# Platziere deine DB:
cp backup.sql.gz docker/mariadb/initdb/database.sql.gz
# Beim ersten Start wird automatisch importiert!
make deploy-init
🐛 Troubleshooting
Website lädt nicht
# Logs prüfen
make logs
# Health Check
make health
# Container Status
make status
# Neu starten
make restart
Datenbank Probleme
# MySQL Shell öffnen
make shell-db
# Neu importieren
make down
# database.sql.gz in docker/mariadb/initdb/ platzieren
make up
Cache Probleme
# Cache löschen
make clear-cache
# Komplett neu starten
make restart
Mehr Hilfe?
Siehe DOCKER_PRODUCTION.md - Komplette Troubleshooting Section!
📊 Ressourcen
Minimum Server Requirements:
- CPU: 2 Cores
- RAM: 4GB
- Disk: 20GB
- Docker: 24.0+
- Docker Compose: 2.0+
Empfohlen:
- CPU: 4 Cores
- RAM: 8GB
- Disk: 50GB SSD
- Network: 1Gbps
🔒 Security
Wichtig:
# Starke Passwords generieren
openssl rand -base64 32
# Firewall
ufw allow 22/tcp # SSH
ufw allow 80/tcp # HTTP
ufw allow 443/tcp # HTTPS
ufw enable
# SSL (Let's Encrypt)
certbot --nginx -d philflow.io
Best Practices:
- ✅
.envnicht committen - ✅ Starke Passwords verwenden
- ✅ SSL aktivieren
- ✅ Firewall konfigurieren
- ✅ Regelmäßige Backups
- ✅ Updates installieren
📈 Performance
Bereits optimiert:
- ✅ OPcache - PHP Bytecode Caching
- ✅ Redis - Session & Data Caching
- ✅ Nginx - Static File Caching
- ✅ Multi-Stage Build - Kleines Image
- ✅ Production Mode - Optimized Config
Monitoring:
# Docker Stats
docker stats
# Logs
make logs
# Health
make health
🤝 Contributing
Development Setup:
# Clone
git clone <repo>
cd philflow_io_website
# Start Local
docker compose -f docker-compose.local.yml up -d
# URLs
open http://localhost:8090
Code Style:
- PHP: PSR-12
- JavaScript: ESLint
- Twig: CraftCMS Conventions
📝 License
Proprietary - PhilFlow
🆘 Support
Dokumentation:
- Quick Start: README_DEPLOYMENT.md
- Full Docs: DOCKER_PRODUCTION.md
- AI Context: .claude.md
Commands:
make help # Alle Befehle
make logs # Logs anschauen
make health # System prüfen
📅 Changelog
v2.0.0 (2025-01-05)
- ✅ Production-ready Docker Setup
- ✅ Multi-Stage Build
- ✅ Zero-Exec Architecture
- ✅ Makefile Automation
- ✅ Auto DB Import
- ✅ Entrypoint Scripts
- ✅ Vollständige Dokumentation
v1.0.0 (2024)
- ✅ Initial CraftCMS Setup
- ✅ Shared Hosting Deployment
Made with ❤️ and Docker 🐳
Status: ✅ Production Ready Last Updated: 2025-01-05