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
Merge remote-tracking branch 'origin/next' into api-sensitive-data-scrubber
Andras Bacsai0038a8f5c963
diff --cc app/Models/StandaloneClickhouse.phpindex eb70c70706,b104be642d..293e09d020--- a/app/Models/StandaloneClickhouse.php+++ b/app/Models/StandaloneClickhouse.php@@@ -48,18 -54,12 +54,23 @@@ class StandaloneClickhouse extends Baseprotected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];+ /**+ * Sensitive fields hidden by default in serialized output (toArray/toJson).+ * API controllers should call makeVisible([...]) for callers with the+ * `read:sensitive` or `root` token ability.+ */+ protected $hidden = [+ 'clickhouse_admin_password',+ 'internal_db_url',+ 'external_db_url',+ ];+protected $casts = [+ 'health_check_enabled' => 'boolean',+ 'health_check_interval' => 'integer',+ 'health_check_timeout' => 'integer',+ 'health_check_retries' => 'integer',+ 'health_check_start_period' => 'integer','clickhouse_admin_password' => 'encrypted','public_port_timeout' => 'integer','restart_count' => 'integer',diff --cc app/Models/StandaloneDragonfly.phpindex 86250f8aa7,2232ec7725..b479a7a2df--- a/app/Models/StandaloneDragonfly.php+++ b/app/Models/StandaloneDragonfly.php@@@ -47,18 -53,12 +53,23 @@@ class StandaloneDragonfly extends BaseMprotected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];+ /**+ * Sensitive fields hidden by default in serialized output (toArray/toJson).+ * API controllers should call makeVisible([...]) for callers with the+ * `read:sensitive` or `root` token ability.+ */+ protected $hidden = [+ 'dragonfly_password',+ 'internal_db_url',+ 'external_db_url',+ ];+protected $casts = [+ 'health_check_enabled' => 'boolean',+ 'health_check_interval' => 'integer',+ 'health_check_timeout' => 'integer',+ 'health_check_retries' => 'integer',+ 'health_check_start_period' => 'integer','dragonfly_password' => 'encrypted','public_port_timeout' => 'integer','restart_count' => 'integer',diff --cc app/Models/StandaloneKeydb.phpindex 3b7990e09f,b9f9f765b4..cb7b340248--- a/app/Models/StandaloneKeydb.php+++ b/app/Models/StandaloneKeydb.php@@@ -48,18 -54,12 +54,23 @@@ class StandaloneKeydb extends BaseModeprotected $appends = ['internal_db_url', 'external_db_url', 'server_status'];+ /**+ * Sensitive fields hidden by default in serialized output (toArray/toJson).+ * API controllers should call makeVisible([...]) for callers with the+ * `read:sensitive` or `root` token ability.+ */+ protected $hidden = [+ 'keydb_password',+ 'internal_db_url',+ 'external_db_url',+ ];+protected $casts = [+ 'health_check_enabled' => 'boolean',+ 'health_check_interval' => 'integer',+ 'health_check_timeout' => 'integer',+ 'health_check_retries' => 'integer',+ 'health_check_start_period' => 'integer','keydb_password' => 'encrypted','public_port_timeout' => 'integer','restart_count' => 'integer',diff --cc app/Models/StandaloneMariadb.phpindex 56d11cd94b,cd94b6c9bf..fc04e82336--- a/app/Models/StandaloneMariadb.php+++ b/app/Models/StandaloneMariadb.php@@@ -51,19 -57,12 +57,24 @@@ class StandaloneMariadb extends BaseModprotected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];+ /**+ * Sensitive fields hidden by default in serialized output (toArray/toJson).+ * API controllers should call makeVisible([...]) for callers with the+ * `read:sensitive` or `root` token ability.+ */+ protected $hidden = [+ 'mariadb_password',+ 'mariadb_root_password',+ 'internal_db_url',+ 'external_db_url',+ ];+protected $casts = [+ 'health_check_enabled' => 'boolean',+ 'health_check_interval' => 'integer',+ 'health_check_timeout' => 'integer',+ 'health_check_retries' => 'integer',+ 'health_check_start_period' => 'integer','mariadb_password' => 'encrypted','public_port_timeout' => 'integer','restart_count' => 'integer',diff --cc app/Models/StandaloneMongodb.phpindex 1acf09002c,7d2ffbd74f..ca144d6fd4--- a/app/Models/StandaloneMongodb.php+++ b/app/Models/StandaloneMongodb.php@@@ -51,18 -57,12 +57,23 @@@ class StandaloneMongodb extends BaseModprotected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];+ /**+ * Sensitive fields hidden by default in serialized output (toArray/toJson).+ * API controllers should call makeVisible([...]) for callers with the+ * `read:sensitive` or `root` token ability.+ */+ protected $hidden = [+ 'mongo_initdb_root_password',+ 'internal_db_url',+ 'external_db_url',+ ];+protected $casts = [+ 'health_check_enabled' => 'boolean',+ 'health_check_interval' => 'integer',+ 'health_check_timeout' => 'integer',+ 'health_check_retries' => 'integer',+ 'health_check_start_period' => 'integer','public_port_timeout' => 'integer','restart_count' => 'integer','last_restart_at' => 'datetime',diff --cc app/Models/StandaloneMysql.phpindex bebf608769,f752312d34..b7d7ba6b6f--- a/app/Models/StandaloneMysql.php+++ b/app/Models/StandaloneMysql.php@@@ -52,19 -58,12 +58,24 @@@ class StandaloneMysql extends BaseModeprotected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];+ /**+ * Sensitive fields hidden by default in serialized output (toArray/toJson).+ * API controllers should call makeVisible([...]) for callers with the+ * `read:sensitive` or `root` token ability.+ */+ protected $hidden = [+ 'mysql_password',+ 'mysql_root_password',+ 'internal_db_url',+ 'external_db_url',+ ];+protected $casts = [+ 'health_check_enabled' => 'boolean',+ 'health_check_interval' => 'integer',+ 'health_check_timeout' => 'integer',+ 'health_check_retries' => 'integer',+ 'health_check_start_period' => 'integer','mysql_password' => 'encrypted','mysql_root_password' => 'encrypted','public_port_timeout' => 'integer',diff --cc app/Models/StandalonePostgresql.phpindex e76742d2c9,04d2291b39..939ab845fa--- a/app/Models/StandalonePostgresql.php+++ b/app/Models/StandalonePostgresql.php@@@ -54,19 -60,12 +60,24 @@@ class StandalonePostgresql extends Baseprotected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];+ /**+ * Sensitive fields hidden by default in serialized output (toArray/toJson).+ * API controllers should call makeVisible([...]) for callers with the+ * `read:sensitive` or `root` token ability.+ */+ protected $hidden = [+ 'postgres_password',+ 'init_scripts',+ 'internal_db_url',+ 'external_db_url',+ ];+protected $casts = [+ 'health_check_enabled' => 'boolean',+ 'health_check_interval' => 'integer',+ 'health_check_timeout' => 'integer',+ 'health_check_retries' => 'integer',+ 'health_check_start_period' => 'integer','init_scripts' => 'array','postgres_password' => 'encrypted','public_port_timeout' => 'integer',diff --cc app/Models/StandaloneRedis.phpindex 08ba5fefe4,efb0254fbc..b5615edfe9--- a/app/Models/StandaloneRedis.php+++ b/app/Models/StandaloneRedis.php@@@ -47,18 -53,12 +53,23 @@@ class StandaloneRedis extends BaseModeprotected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];+ /**+ * Sensitive fields hidden by default in serialized output (toArray/toJson).+ * API controllers should call makeVisible([...]) for callers with the+ * `read:sensitive` or `root` token ability.+ */+ protected $hidden = [+ 'redis_password',+ 'internal_db_url',+ 'external_db_url',+ ];+protected $casts = [+ 'health_check_enabled' => 'boolean',+ 'health_check_interval' => 'integer',+ 'health_check_timeout' => 'integer',+ 'health_check_retries' => 'integer',+ 'health_check_start_period' => 'integer','public_port_timeout' => 'integer','restart_count' => 'integer','last_restart_at' => 'datetime',diff --cc bootstrap/helpers/proxy.phpindex ed18dfe760,d443c84a4b..6997043937--- a/bootstrap/helpers/proxy.php+++ b/bootstrap/helpers/proxy.php@@@ -4,6 -4,6 +4,7 @@@ use App\Actions\Proxy\SaveProxyConfiguruse App\Enums\ProxyTypes;use App\Models\Application;use App\Models\Server;++use Illuminate\Support\Collection;use Illuminate\Support\Facades\Log;use Symfony\Component\Yaml\Yaml;@@@ -135,7 -137,7 +138,7 @@@ function connectProxyToNetworks(Server* This must be called BEFORE docker compose up since the compose file declares networks as external.** @param Server $server The server to ensure networks on-- * @return \Illuminate\Support\Collection Commands to create networks if they don't exist++ * @return Collection Commands to create networks if they don't exist*/function ensureProxyNetworksExist(Server $server){@@@ -211,7 -215,7 +216,7 @@@ function extractCustomProxyCommands(Ser$custom_commands[] = $command;}}-- } catch (\Exception $e) {++ } catch (Exception $e) {// If we can't parse the config, return empty array// Silently fail to avoid breaking the proxy regeneration}@@@ -432,7 -436,7 +437,7 @@@ function getExactTraefikVersionFromContLog::debug("getExactTraefikVersionFromContainer: Server '{$server->name}' (ID: {$server->id}) - Could not detect exact version");return null;-- } catch (\Exception $e) {++ } catch (Exception $e) {Log::error("getExactTraefikVersionFromContainer: Server '{$server->name}' (ID: {$server->id}) - Error: ".$e->getMessage());return null;@@@ -479,7 -483,7 +484,7 @@@ function getTraefikVersionFromDockerComLog::debug("getTraefikVersionFromDockerCompose: Server '{$server->name}' (ID: {$server->id}) - Image format doesn't match expected pattern: {$image}");return null;-- } catch (\Exception $e) {++ } catch (Exception $e) {Log::error("getTraefikVersionFromDockerCompose: Server '{$server->name}' (ID: {$server->id}) - Error: ".$e->getMessage());return null;diff --cc tests/Unit/ProxyConfigRecoveryTest.phpindex e10d899fee,682407bdfe..0d6a04aa51--- a/tests/Unit/ProxyConfigRecoveryTest.php+++ b/tests/Unit/ProxyConfigRecoveryTest.php@@@ -1,6 -1,6 +1,7 @@@<?phpuse App\Actions\Proxy\GetProxyConfiguration;++use Illuminate\Log\LogManager;use Illuminate\Support\Facades\Cache;use Illuminate\Support\Facades\Log;use Spatie\SchemalessAttributes\SchemalessAttributes;@@@ -83,7 -83,7 +84,7 @@@ YAML});it('logs warning when regenerating defaults', function () {-- Log::swap(new \Illuminate\Log\LogManager(app()));++ Log::swap(new LogManager(app()));Log::spy();// No DB config, no disk config — will try to regenerate@@@ -94,7 -94,7 +95,7 @@@// the force regenerate path insteadtry {GetProxyConfiguration::run($server, forceRegenerate: true);-- } catch (\Throwable $e) {++ } catch (Throwable $e) {// generateDefaultProxyConfiguration may fail without full server setup}@@@ -115,7 -115,7 +116,7 @@@ it('does not read from disk when DB con});it('rejects stored Traefik config when proxy type is CADDY', function () {-- Log::swap(new \Illuminate\Log\LogManager(app()));++ Log::swap(new LogManager(app()));Log::spy();$traefikConfig = "services:\n traefik:\n image: traefik:v3.6\n";@@@ -126,7 -126,7 +127,7 @@@// Both will fail in test env, but the warning log proves mismatch was detected.try {GetProxyConfiguration::run($server);-- } catch (\Throwable $e) {++ } catch (Throwable $e) {// Expected — regeneration requires SSH/full server setup}@@@ -136,7 -136,7 +137,7 @@@});it('rejects stored Caddy config when proxy type is TRAEFIK', function () {-- Log::swap(new \Illuminate\Log\LogManager(app()));++ Log::swap(new LogManager(app()));Log::spy();$caddyConfig = "services:\n caddy:\n image: lucaslorentz/caddy-docker-proxy:2.8-alpine\n";@@@ -144,7 -144,7 +145,7 @@@try {GetProxyConfiguration::run($server);-- } catch (\Throwable $e) {++ } catch (Throwable $e) {// Expected — regeneration requires SSH/full server setup}