Deploy 2: 2FA (App + Email) + REST API + CSV import-export + auto backup
- Filament v5 multiFactorAuthentication enabled on both panels (App + Email) - HasAppAuthentication + HasEmailAuthentication on User and SuperAdmin - Migration: app_authentication_secret + recovery_codes + email_authentication_at - Sanctum REST API: /api/v1/login, /me, clients, vehicles, work-orders - EnsureTokenMatchesTenant middleware blocks cross-tenant token usage - CsvImportExport service: clients + vehicles bulk via plain CSV - Import/Export buttons on Client + Vehicle list pages - ApiTokens page in tenant panel (generate/revoke + last-used) - BackupAllTenantsCommand + scheduler (daily 03:00, retain 14 days) - Background scheduler in entrypoint.sh
This commit is contained in:
@@ -36,5 +36,17 @@ fi
|
||||
# Storage symlink (idempotent)
|
||||
php artisan storage:link --no-interaction 2>/dev/null || true
|
||||
|
||||
# Background scheduler — fires every minute. Drives backup:tenants and other cron jobs.
|
||||
# Skipped if RUN_SCHEDULER=false (e.g., when running multiple replicas).
|
||||
if [ "${RUN_SCHEDULER:-true}" = "true" ]; then
|
||||
echo "[entrypoint] Starting Laravel scheduler in background..."
|
||||
(
|
||||
while true; do
|
||||
php artisan schedule:run --no-interaction >> storage/logs/scheduler.log 2>&1 || true
|
||||
sleep 60
|
||||
done
|
||||
) &
|
||||
fi
|
||||
|
||||
echo "[entrypoint] Starting: $@"
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user