Automatisches Deployment nach Strato (atomare Releases, Rollback, Gitea Actions)

- scripts/deploy.sh: Build aus Git-Stand (Composer ohne Dev, Vite), Upload per SSH, Migration, Caches, atomarer Umschalter current -> releases/<zeit>, Gesundheitscheck mit automatischem Rollback; Befehle setup/deploy/rollback/releases/artisan; lokaler Testmodus
- .gitea/workflows/deploy.yml: Tests bei jedem Push, Deployment bei Tags v* oder per Knopfdruck
- Vorlagen scripts/deploy.example.env und .env.production.example (Strato MySQL, SMTP, IMAP)
- Scheduler-Endpunkt /automation/scheduler als Ausweich für fehlende Cronjobs
- ProductionSeeder für die Ersteinrichtung ohne Testdaten

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 15:28:00 +02:00
1 parent 66e82d61f5
commit 8d904660b9
10 files changed
+460

No files matched your search

@@ -14,6 +14,7 @@
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Cache;
/**
@@ -63,6 +64,19 @@ public function health(Request $request): JsonResponse
], $ok ? 200 : 503);
}
/**
* Runs the task scheduler once (fallback for hosting without suitable cron jobs).
*/
public function scheduler(Request $request): JsonResponse
{
$token = config('fewo.scheduler_token');
abort_if(blank($token) || ! hash_equals($token, (string) $request->query('token')), 404);
Artisan::call('schedule:run');
return response()->json(['ran_at' => now()->toIso8601String(), 'output' => trim(Artisan::output())]);
}
/**
* Push variant of the e-mail fast path, e.g. from an n8n IMAP trigger:
* JSON {message_id, from, subject, text, received_at}, signed like the automation webhook.