fix: read Coolify config via config() (env() unreliable with config:cache + Octane)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user