An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(dev): rely on default flux dev capabilities
Andras Bacsai6069ac066983
diff --git a/scripts/dev.sh b/scripts/dev.shindex b9a0816147..cc0e9e1e2b 100755--- a/scripts/dev.sh+++ b/scripts/dev.sh@@ -412,12 +412,9 @@ mint_host_jwt_for_host() {local host_id="$1"local attempts=60local output- local caps-- caps="coold"for attempt in $(seq 1 "$attempts"); do- if output="$(spin exec -T coolify php artisan flux:dev "$host_id" --caps="$caps" 2>&1)"; then+ if output="$(spin exec -T coolify php artisan flux:dev "$host_id" 2>&1)"; thenprintf '%s\n' "$output" | tail -n 1return 0fidiff --git a/tests/Feature/FluxDevCommandTest.php b/tests/Feature/FluxDevCommandTest.phpindex 58279582c1..ea31e6e66e 100644--- a/tests/Feature/FluxDevCommandTest.php+++ b/tests/Feature/FluxDevCommandTest.php@@ -27,6 +27,24 @@ it('mints a host jwt signed by the configured flux private key', function () {->and($claims->exp)->toBeGreaterThan(time());});+it('mints a host jwt with only the coarse coold capability by default', function () {+ [$privateKeyPath, $publicKeyPath] = createFluxJwtKeypair();++ Config::set('flux.jwt_private_key_path', $privateKeyPath);++ $exitCode = Artisan::call('flux:dev', [+ 'host_id' => 'coold-dev',+ '--ttl' => '600',+ ]);++ expect($exitCode)->toBe(0);++ $token = trim(Artisan::output());+ $claims = JWT::decode($token, new Key(file_get_contents($publicKeyPath), 'ES256'));++ expect($claims->caps)->toBe(['coold']);+});+it('writes the host jwt to an output path with owner-only permissions', function () {[$privateKeyPath] = createFluxJwtKeypair();$outputPath = storage_path('framework/testing/host-jwt');