mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 23:20:46 +00:00
Fix: Traefik proxy startup issues - handle null versions and filter predefined networks
Fixes two critical issues preventing Traefik proxy startup: 1. TypeError when restarting proxy: Handle null return from get_traefik_versions() - Add null check before dispatching CheckTraefikVersionForServerJob - Log warning when version data is unavailable - Prevents: "Argument #2 must be of type array, null given" 2. Docker network error: Filter out predefined Docker networks - Add isDockerPredefinedNetwork() helper to centralize network filtering - Apply filtering in collectDockerNetworksByServer() before operations - Apply filtering in generateDefaultProxyConfiguration() - Prevents: "operation is not permitted on predefined default network" Also: Move $cachedVersionsFile assignment after null check in Proxy.php Tests: Added 7 new unit tests for network filtering function All existing tests pass with no regressions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -79,12 +79,11 @@ class Proxy extends Component
|
||||
|
||||
// Load from global cached helper (Redis + filesystem)
|
||||
$versionsData = get_versions_data();
|
||||
$this->cachedVersionsFile = $versionsData;
|
||||
|
||||
if (! $versionsData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->cachedVersionsFile = $versionsData;
|
||||
$traefikVersions = data_get($versionsData, 'traefik');
|
||||
|
||||
return is_array($traefikVersions) ? $traefikVersions : null;
|
||||
|
||||
Reference in New Issue
Block a user