coolify/bootstrap/helpers
Andras Bacsai cb0f2301f5 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>
2025-11-28 17:53:26 +01:00
..
api.php refactor: Improve handling of custom network aliases 2025-11-01 13:13:14 +01:00
applications.php refactor(clone): enhance application cloning by separating production and preview environment variable handling 2025-09-11 12:52:35 +02:00
constants.php feat: add predefined network connection for pgAdmin and postgresus services 2025-11-28 10:29:13 +01:00
databases.php fix: handle redis_password in API database creation 2025-10-24 18:04:30 +02:00
docker.php refactor: fix variable scope in docker entrypoint parsing 2025-11-26 09:32:09 +01:00
domains.php feat(domains): add force_domain_override option and enhance domain conflict detection responses 2025-08-28 11:21:30 +02:00
github.php refactor(github): enhance API request handling and validation 2025-09-22 15:41:56 +02:00
notifications.php refactor(configuration): centralize configuration management in ConfigurationRepository 2025-03-24 21:01:27 +01:00
parsers.php fix: prevent SERVICE_FQDN/SERVICE_URL path duplication on FQDN updates 2025-11-27 10:57:24 +01:00
proxy.php Fix: Traefik proxy startup issues - handle null versions and filter predefined networks 2025-11-28 17:53:26 +01:00
remoteProcess.php refactor(remoteProcess): remove redundant file transfer functions for improved clarity 2025-09-22 12:54:37 +02:00
services.php fix: handle map-style environment variables in updateCompose 2025-11-21 11:21:49 +01:00
shared.php Fix: Prevent version downgrades and centralize CDN configuration (#7383) 2025-11-28 15:20:33 +01:00
socialite.php refactor(dashboard): remove deployment loading logic and introduce DeploymentsIndicator component for better UI management 2025-09-30 11:43:30 +02:00
subscriptions.php feat(email): implement email change request and verification process 2025-08-18 14:54:08 +02:00
sudo.php fix: add additional bash keywords to prevent sudo prefix in command parsing 2025-11-27 10:51:59 +01:00
timezone.php refactor: improve data formatting and UI 2025-01-15 18:35:20 +01:00
versions.php refactor(proxy): implement centralized caching for versions.json and improve UX 2025-11-18 14:53:49 +01:00