Infrastruktur als Code für den Skalierungs-Test auf Hetzner: - deploy/terraform: privates Netz, Firewalls, 2 App-Nodes, DB-Node, Load Balancer (Health-Check /health); cloud-init bootet Docker + Stack je Node - deploy/compose/docker-compose.prod.yml + nginx.prod.conf: App-Node-Stack (PHP-FPM + Nginx) routet /api,/p,/t,/css,/health → Symfony, Rest → Vue-SPA - App-Anpassungen: HealthController (/health für LB), brand.css nach /css verschoben (kein Pfad-Clash mit SPA-Assets im Prod-Routing) - deploy/README.md: Anleitung inkl. JWT-Key-Verteilung & Cross-Node-Test - reference.php (auto-generiert) aus Versionierung entfernt Terraform validiert (terraform validate), Prod-Compose-Syntax geprüft. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
15 lines
482 B
Plaintext
15 lines
482 B
Plaintext
#cloud-config
|
|
package_update: true
|
|
runcmd:
|
|
- command -v docker >/dev/null 2>&1 || curl -fsSL https://get.docker.com | sh
|
|
- mkdir -p /opt/db/data
|
|
- |
|
|
docker run -d --name mariadb --restart unless-stopped \
|
|
-p 10.0.1.10:3306:3306 \
|
|
-e MARIADB_ROOT_PASSWORD='${db_root_password}' \
|
|
-e MARIADB_DATABASE='${db_name}' \
|
|
-e MARIADB_USER='${db_user}' \
|
|
-e MARIADB_PASSWORD='${db_password}' \
|
|
-v /opt/db/data:/var/lib/mysql \
|
|
mariadb:11.4
|