refactor: all-in-one docker deployment with auto-tuned resources and per-mode compose templates

This commit is contained in:
xboard
2026-04-19 21:18:15 +08:00
parent c36054b970
commit e01620689b
20 changed files with 488 additions and 231 deletions
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schema;
/**
* One-shot backfill of users.next_reset_at for legacy installs.
*
* Replaces the previous `reset:traffic --force` step in `xboard:update`,
* which had to run on every container start. Now it runs exactly once per
* database (Laravel migrations are tracked).
*/
return new class extends Migration {
public function up(): void
{
if (!Schema::hasColumn('v2_user', 'next_reset_at')) {
return;
}
Artisan::call('reset:traffic', ['--fix-null' => true]);
}
public function down(): void
{
// Backfill is non-destructive; nothing to roll back.
}
};