Deploy: cloud-init seedet die DB (app:seed) nach den Migrationen

Bisher liefen nur Migrationen → keine Daten, kein Admin-Login. app:seed ist
idempotent (überspringt, wenn admin@vcard4reseller.de existiert), läuft nur auf
app-1 (RUN_MIGRATIONS). Damit ist der dokumentierte Login admin/admin direkt nutzbar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Thomas Peterson 2026-06-04 14:26:00 +02:00
parent a3bdb3f81b
commit 70e979eae7

View File

@ -59,6 +59,8 @@ write_files:
sleep 20 sleep 20
if [ "$RUN_MIGRATIONS" = "true" ]; then if [ "$RUN_MIGRATIONS" = "true" ]; then
$COMPOSE exec -T php php bin/console doctrine:migrations:migrate --no-interaction || true $COMPOSE exec -T php php bin/console doctrine:migrations:migrate --no-interaction || true
# Erst-Befüllung (idempotent: überspringt, wenn admin@vcard4reseller.de existiert)
$COMPOSE exec -T php php bin/console app:seed || true
fi fi
$COMPOSE exec -T php php bin/console cache:clear || true $COMPOSE exec -T php php bin/console cache:clear || true
runcmd: runcmd: