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.

refactor: update container name assignment in Application model

Andras Bacsai6493ce3fe054
diff --git a/app/Models/Application.php b/app/Models/Application.php
index c76a42d71d..8113f5ec9c 100644
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@ -1171,7 +1171,7 @@ class Application extends BaseModel
public function getMetrics(int $mins = 5)
{
$server = $this->destination->server;
- $container_name = generateApplicationContainerName($this);
+ $container_name = $this->uuid;
if ($server->isMetricsEnabled()) {
$from = now()->subMinutes($mins)->toIso8601ZuluString();
$metrics = instant_remote_process(["docker exec coolify-sentinel sh -c 'curl -H \"Authorization: Bearer {$server->settings->metrics_token}\" http://localhost:8888/api/container/{$container_name}/metrics/history?from=$from'"], $server, false);