Skip to content

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.

Merge remote-tracking branch 'origin/next' into coolify-analytics-traefik-caddy

Andras Bacsaic68259cddf14
diff --cc app/Actions/Server/StartSentinel.php
index 9d0f16c293,3a37a7328b..f7c73523b3
--- a/app/Actions/Server/StartSentinel.php
+++ b/app/Actions/Server/StartSentinel.php
@@@ -76,10 -48,7 +76,10 @@@ class StartSentine
}
$dockerEnvironments = implode(' ', array_map(fn ($key, $value) => '-e '.escapeshellarg("$key=$value"), array_keys($environments), $environments));
$dockerLabels = implode(' ', array_map(fn ($key, $value) => "$key=$value", array_keys($labels), $labels));
- $dockerCommand = "docker run -d $dockerEnvironments --name coolify-sentinel -v /var/run/docker.sock:/var/run/docker.sock -v $mountDir:/app/db --pid host --health-cmd \"curl --fail http://127.0.0.1:8888/api/health || exit 1\" --health-start-period 120s --health-interval 10s --health-retries 3 --add-host=host.docker.internal:host-gateway --label $dockerLabels $image";
+ $trafficMount = $server->isTrafficAnalyticsEnabled()
+ ? '-v '.escapeshellarg($server->proxyPath().':'.$server->proxyPath().':ro').' '
+ : '';
- $dockerCommand = "docker run -d $dockerEnvironments --name coolify-sentinel -v /var/run/docker.sock:/var/run/docker.sock -v $mountDir:/app/db {$trafficMount}--pid host --health-cmd \"curl --fail http://127.0.0.1:8888/api/health || exit 1\" --health-interval 10s --health-retries 3 --add-host=host.docker.internal:host-gateway --label $dockerLabels $image";
++ $dockerCommand = "docker run -d $dockerEnvironments --name coolify-sentinel -v /var/run/docker.sock:/var/run/docker.sock -v $mountDir:/app/db {$trafficMount}--pid host --health-cmd \"curl --fail http://127.0.0.1:8888/api/health || exit 1\" --health-start-period 120s --health-interval 10s --health-retries 3 --add-host=host.docker.internal:host-gateway --label $dockerLabels $image";
instant_remote_process([
'docker rm -f coolify-sentinel || true',
diff --cc bootstrap/helpers/docker.php
index dd532bd758,f80fccafb2..1f8778cdfe
--- a/bootstrap/helpers/docker.php
+++ b/bootstrap/helpers/docker.php
@@@ -507,7 -530,7 +530,7 @@@ function isNoindexDomain(string $domain
->contains(ValidationPatterns::normalizeApplicationDomainUrl($domain));
}
- function fqdnLabelsForCaddy(string $network, string $uuid, Collection $domains, bool $is_force_https_enabled = false, $onlyPort = null, ?Collection $serviceLabels = null, ?bool $is_gzip_enabled = true, ?bool $is_stripprefix_enabled = true, ?string $service_name = null, ?string $image = null, string $redirect_direction = 'both', ?string $predefinedPort = null, bool $is_http_basic_auth_enabled = false, ?string $http_basic_auth_username = null, ?string $http_basic_auth_password = null, ?Collection $noindex_domains = null, bool $is_traffic_analytics_enabled = false)
-function fqdnLabelsForCaddy(string $network, string $uuid, Collection $domains, bool $is_force_https_enabled = false, $onlyPort = null, ?Collection $serviceLabels = null, ?bool $is_gzip_enabled = true, ?bool $is_stripprefix_enabled = true, ?string $service_name = null, ?string $image = null, string $redirect_direction = 'both', ?string $predefinedPort = null, bool $is_http_basic_auth_enabled = false, ?string $http_basic_auth_username = null, ?string $http_basic_auth_password = null, ?Collection $noindex_domains = null, array $domainPortOverrides = [])
++function fqdnLabelsForCaddy(string $network, string $uuid, Collection $domains, bool $is_force_https_enabled = false, $onlyPort = null, ?Collection $serviceLabels = null, ?bool $is_gzip_enabled = true, ?bool $is_stripprefix_enabled = true, ?string $service_name = null, ?string $image = null, string $redirect_direction = 'both', ?string $predefinedPort = null, bool $is_http_basic_auth_enabled = false, ?string $http_basic_auth_username = null, ?string $http_basic_auth_password = null, ?Collection $noindex_domains = null, bool $is_traffic_analytics_enabled = false, array $domainPortOverrides = [])
{
$labels = collect([]);
if ($serviceLabels) {
@@@ -903,7 -917,7 +929,8 @@@ function generateLabelsApplication(Appl
http_basic_auth_username: $application->http_basic_auth_username,
http_basic_auth_password: $application->http_basic_auth_password,
noindex_domains: $noindexDomains,
+ is_traffic_analytics_enabled: $application->destination->server->isTrafficAnalyticsEnabled(),
+ domainPortOverrides: $application->domain_port_overrides ?? [],
));
break;
}
@@@ -935,7 -950,7 +963,8 @@@
http_basic_auth_username: $application->http_basic_auth_username,
http_basic_auth_password: $application->http_basic_auth_password,
noindex_domains: $noindexDomains,
+ is_traffic_analytics_enabled: $application->destination->server->isTrafficAnalyticsEnabled(),
+ domainPortOverrides: $application->domain_port_overrides ?? [],
));
}
}
@@@ -978,7 -994,7 +1008,8 @@@
http_basic_auth_username: $application->http_basic_auth_username,
http_basic_auth_password: $application->http_basic_auth_password,
noindex_domains: $noindexDomains,
+ is_traffic_analytics_enabled: $application->destination->server->isTrafficAnalyticsEnabled(),
+ domainPortOverrides: $preview->domain_port_overrides ?? [],
));
break;
}
@@@ -1008,7 -1025,7 +1040,8 @@@
http_basic_auth_username: $application->http_basic_auth_username,
http_basic_auth_password: $application->http_basic_auth_password,
noindex_domains: $noindexDomains,
+ is_traffic_analytics_enabled: $application->destination->server->isTrafficAnalyticsEnabled(),
+ domainPortOverrides: $preview->domain_port_overrides ?? [],
));
}
}
diff --cc resources/js/app.js
index 98231aa677,9315daa449..1e53439561
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@@ -1,6 -1,10 +1,11 @@@
import { initializeCopyButtonComponent } from './copy-button.js';
import { initializeTerminalComponent } from './terminal.js';
+import './traffic-globe.js';
+ import { registerLivewireRequestFailureHandler } from './livewire-request-failure.js';
+
+ document.addEventListener('livewire:init', () => {
+ registerLivewireRequestFailureHandler(window.Livewire);
+ });
// Livewire 3.5.19+ re-applies `x-cloak` to morphed elements during wire:navigate
// (via replaceHtmlAttributes). With `[x-cloak]{display:none}` on the app wrapper,