fix: read Coolify config via config() (env() unreliable with config:cache + Octane)

This commit is contained in:
2026-05-07 07:02:05 +00:00
parent 4c6a3f7bc6
commit 0620e08351
3 changed files with 12 additions and 4 deletions
+4 -2
View File
@@ -20,8 +20,10 @@ class CoolifyClient
protected ?string $base = null,
protected ?string $token = null,
) {
$this->base = rtrim($base ?? (string) env('COOLIFY_API_URL'), '/');
$this->token = $token ?? (string) env('COOLIFY_API_TOKEN');
// Use config() not env() — env() returns null when config is cached
// in production. Octane workers also cache env at boot.
$this->base = rtrim($base ?? (string) config('services.coolify.url'), '/');
$this->token = $token ?? (string) config('services.coolify.token');
}
public function isConfigured(): bool