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
puh, fixes
Andras Bacsaifabb97330aea
diff --git a/app/Actions/Service/StartService.php b/app/Actions/Service/StartService.phpindex a843e7fc25..4ca2b71144 100644--- a/app/Actions/Service/StartService.php+++ b/app/Actions/Service/StartService.php@@ -12,6 +12,7 @@ class StartService{$service->saveComposeConfigs();$commands[] = "cd " . $service->workdir();+ $commands[] = "echo '####### Saved configuration files to {$service->workdir()}.'";$commands[] = "echo '####### Starting service {$service->name} on {$service->server->name}.'";$commands[] = "echo '####### Pulling images.'";$commands[] = "docker compose pull";diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.phpindex a0038a5975..97b61eb878 100644--- a/app/Http/Controllers/ProjectController.php+++ b/app/Http/Controllers/ProjectController.php@@ -69,7 +69,12 @@ class ProjectController extends Controllerif ($type->startsWith('one-click-service-')) {$oneClickServiceName = $type->after('one-click-service-')->value();$oneClickService = data_get($services, "$oneClickServiceName.compose");- $oneClickDotEnvs = collect(data_get($services, "$oneClickServiceName.envs", []));+ $oneClickDotEnvs = data_get($services, "$oneClickServiceName.envs", null);+ $oneClickRequiredFqdn = data_get($services, "$oneClickServiceName.generateFqdn", []);+ $oneClickRequiredFqdn = collect($oneClickRequiredFqdn);+ if ($oneClickDotEnvs) {+ $oneClickDotEnvs = Str::of(base64_decode($oneClickDotEnvs))->split('/\r\n|\r|\n/');+ }if ($oneClickService) {$service = Service::create(['name' => "$oneClickServiceName-" . Str::random(10),@@ -77,18 +82,37 @@ class ProjectController extends Controller'environment_id' => $environment->id,'server_id' => (int) $server_id,]);- if ($oneClickDotEnvs->count() > 0) {- $oneClickDotEnvs->each(function ($value, $key) use ($service) {+ $service->name = "$oneClickServiceName-" . $service->uuid;+ $service->save();+ if ($oneClickDotEnvs && $oneClickDotEnvs->count() > 0) {+ $oneClickDotEnvs->each(function ($value) use ($service) {+ $key = Str::before($value, '=');+ $value = Str::of(Str::after($value, '='));+ if ($value->contains('SERVICE_USER')) {+ $value = Str::of(Str::random(10));+ }+ if ($value->contains('SERVICE_PASSWORD')) {+ $value = Str::of(Str::password(symbols: false));+ }+ if ($value->contains('SERVICE_BASE64')) {+ $length = Str::of($value)->after('SERVICE_BASE64_')->beforeLast('_')->value();+ if (is_numeric($length)) {+ $length = (int) $length;+ } else {+ $length = 1;+ }+ $value = Str::of(base64_encode(Str::password(length: $length, symbols: false)));+ }EnvironmentVariable::create(['key' => $key,- 'value' => $value,+ 'value' => $value->value(),'service_id' => $service->id,'is_build_time' => false,'is_preview' => false,]);});}- $service->parse(isNew: true);+ $service->parse(isNew: true, requiredFqdns: $oneClickRequiredFqdn);return redirect()->route('project.service', ['service_uuid' => $service->uuid,diff --git a/app/Http/Livewire/Project/New/DockerCompose.php b/app/Http/Livewire/Project/New/DockerCompose.phpindex 2e95eaf9df..a43fd0c660 100644--- a/app/Http/Livewire/Project/New/DockerCompose.php+++ b/app/Http/Livewire/Project/New/DockerCompose.php@@ -2,6 +2,7 @@namespace App\Http\Livewire\Project\New;+use App\Models\EnvironmentVariable;use App\Models\Project;use App\Models\Service;use Livewire\Component;@@ -11,6 +12,7 @@ use Symfony\Component\Yaml\Yaml;class DockerCompose extends Component{public string $dockerComposeRaw = '';+ public string $envFile = '';public array $parameters;public array $query;public function mount()@@ -45,13 +47,22 @@ class DockerCompose extends Component$project = Project::where('uuid', $this->parameters['project_uuid'])->first();$environment = $project->load(['environments'])->environments->where('name', $this->parameters['environment_name'])->first();-$service = Service::create(['name' => 'service' . Str::random(10),'docker_compose_raw' => $this->dockerComposeRaw,'environment_id' => $environment->id,'server_id' => (int) $server_id,]);+ $variables = parseEnvFormatToArray($this->envFile);+ foreach ($variables as $key => $variable) {+ EnvironmentVariable::create([+ 'key' => $key,+ 'value' => $variable,+ 'is_build_time' => false,+ 'is_preview' => false,+ 'service_id' => $service->id,+ ]);+ }$service->name = "service-$service->uuid";$service->parse(isNew: true);@@ -64,6 +75,5 @@ class DockerCompose extends Component} catch (\Throwable $e) {return handleError($e, $this);}-}}diff --git a/app/Http/Livewire/Project/New/Select.php b/app/Http/Livewire/Project/New/Select.phpindex dd9334e011..a9b50c624e 100644--- a/app/Http/Livewire/Project/New/Select.php+++ b/app/Http/Livewire/Project/New/Select.php@@ -29,6 +29,7 @@ class Select extends Componentprotected $queryString = ['server',];+public function mount(){$this->parameters = get_route_parameters();@@ -46,6 +47,7 @@ class Select extends Component// return handleError($e, $this);// }// }+public function loadThings(){$this->loadServices();@@ -77,7 +79,6 @@ class Select extends Component});}$this->services = $cached;-} catch (\Throwable $e) {ray($e);return handleError($e, $this);diff --git a/app/Http/Livewire/Project/Service/Application.php b/app/Http/Livewire/Project/Service/Application.phpindex 44538278e7..cf464b4423 100644--- a/app/Http/Livewire/Project/Service/Application.php+++ b/app/Http/Livewire/Project/Service/Application.php@@ -3,26 +3,29 @@namespace App\Http\Livewire\Project\Service;use App\Models\ServiceApplication;+use Illuminate\Support\Collection;use Livewire\Component;class Application extends Component{public ServiceApplication $application;public $parameters;- public $fileStorages = null;+ public $fileStorages;protected $listeners = ["refreshFileStorages"];protected $rules = ['application.human_name' => 'nullable','application.description' => 'nullable','application.fqdn' => 'nullable',- 'application.image_tag' => 'required',- 'application.ignore_from_status' => 'required|boolean',+ 'application.image' => 'required',+ 'application.exclude_from_status' => 'required|boolean',+ 'application.required_fqdn' => 'required|boolean',];public function render(){return view('livewire.project.service.application');}- public function instantSave() {+ public function instantSave()+ {$this->submit();}public function refreshFileStorages()@@ -42,6 +45,7 @@ class Application extends Componentpublic function mount(){$this->parameters = get_route_parameters();+ $this->fileStorages = collect();$this->refreshFileStorages();}public function submit()@@ -49,6 +53,7 @@ class Application extends Componenttry {$this->validate();$this->application->save();+ switchImage($this->application);$this->emit('success', 'Application saved successfully.');} catch (\Throwable $e) {ray($e);diff --git a/app/Http/Livewire/Project/Service/Database.php b/app/Http/Livewire/Project/Service/Database.phpindex 36dd96d364..0a1b13dbc2 100644--- a/app/Http/Livewire/Project/Service/Database.php+++ b/app/Http/Livewire/Project/Service/Database.php@@ -8,25 +8,34 @@ use Livewire\Component;class Database extends Component{public ServiceDatabase $database;+ public $fileStorages;+ protected $listeners = ["refreshFileStorages"];protected $rules = ['database.human_name' => 'nullable','database.description' => 'nullable',- 'database.image_tag' => 'required',- 'database.ignore_from_status' => 'required|boolean',-+ 'database.image' => 'required',+ 'database.exclude_from_status' => 'required|boolean',];public function render(){return view('livewire.project.service.database');}+ public function mount() {+ $this->refreshFileStorages();+ }public function instantSave() {$this->submit();}+ public function refreshFileStorages()+ {+ $this->fileStorages = $this->database->fileStorages()->get();+ }public function submit(){try {$this->validate();$this->database->save();+ switchImage($this->database);$this->emit('success', 'Database saved successfully.');} catch (\Throwable $e) {ray($e);diff --git a/app/Http/Livewire/Project/Service/FileStorage.php b/app/Http/Livewire/Project/Service/FileStorage.phpindex b3bed85280..9e80b663b9 100644--- a/app/Http/Livewire/Project/Service/FileStorage.php+++ b/app/Http/Livewire/Project/Service/FileStorage.php@@ -15,6 +15,7 @@ class FileStorage extends Componentpublic string $fs_path;protected $rules = [+ 'fileStorage.is_directory' => 'required','fileStorage.fs_path' => 'required','fileStorage.mount_path' => 'required','fileStorage.content' => 'nullable',@@ -39,6 +40,9 @@ class FileStorage extends Componentreturn handleError($e, $this);}}+ public function instantSave() {+ $this->submit();+ }public function render(){return view('livewire.project.service.file-storage');diff --git a/app/Http/Livewire/Project/Service/Index.php b/app/Http/Livewire/Project/Service/Index.phpindex c294edc54a..88d8679bc4 100644--- a/app/Http/Livewire/Project/Service/Index.php+++ b/app/Http/Livewire/Project/Service/Index.php@@ -3,32 +3,57 @@namespace App\Http\Livewire\Project\Service;use App\Models\Service;-use App\Models\ServiceApplication;+use DanHarrin\LivewireRateLimiting\WithRateLimiting;use Livewire\Component;class Index extends Component{+ use WithRateLimiting;public Service $service;public $applications;public $databases;public array $parameters;public array $query;-protected $rules = ['service.docker_compose_raw' => 'required','service.docker_compose' => 'required','service.name' => 'required','service.description' => 'nullable',];-+ public function manualRefreshStack() {+ try {+ $this->rateLimit(5);+ $this->refreshStack();+ } catch(\Throwable $e) {+ return handleError($e, $this);+ }+ }+ public function refreshStack()+ {+ $this->applications = $this->service->applications->sort();+ $this->applications->each(function ($application) {+ $application->fileStorages()->get()->each(function ($fileStorage) use ($application) {+ if (!$fileStorage->is_directory && $fileStorage->content == null) {+ $application->hasMissingFiles = true;+ }+ });+ });+ $this->databases = $this->service->databases->sort();+ $this->databases->each(function ($database) {+ $database->fileStorages()->get()->each(function ($fileStorage) use ($database) {+ if (!$fileStorage->is_directory && $fileStorage->content == null) {+ $database->hasMissingFiles = true;+ }+ });+ });+ $this->emit('success', 'Stack refreshed successfully.');+ }public function mount(){$this->parameters = get_route_parameters();$this->query = request()->query();$this->service = Service::whereUuid($this->parameters['service_uuid'])->firstOrFail();- $this->applications = $this->service->applications->sort();- $this->databases = $this->service->databases->sort();-+ $this->refreshStack();}public function render(){@@ -43,7 +68,7 @@ class Index extends Component$this->emit('refreshEnvs');$this->emit('success', 'Service saved successfully.');$this->service->saveComposeConfigs();- } catch(\Throwable $e) {+ } catch (\Throwable $e) {return handleError($e, $this);}}diff --git a/app/Http/Livewire/Project/Service/Navbar.php b/app/Http/Livewire/Project/Service/Navbar.phpindex b7f2730b6c..e4980696c3 100644--- a/app/Http/Livewire/Project/Service/Navbar.php+++ b/app/Http/Livewire/Project/Service/Navbar.php@@ -39,5 +39,6 @@ class Navbar extends Component{StopService::run($this->service);$this->service->refresh();+ $this->emit('success', 'Service stopped successfully.');}}diff --git a/app/Http/Livewire/Project/Shared/Danger.php b/app/Http/Livewire/Project/Shared/Danger.phpindex 0de51939f1..b3288fe609 100644--- a/app/Http/Livewire/Project/Shared/Danger.php+++ b/app/Http/Livewire/Project/Shared/Danger.php@@ -20,6 +20,7 @@ class Danger extends Componentpublic function delete(){+ // Should be queuedtry {if ($this->resource->type() === 'service') {$server = $this->resource->server;diff --git a/app/Http/Livewire/Project/Shared/EnvironmentVariable/Add.php b/app/Http/Livewire/Project/Shared/EnvironmentVariable/Add.phpindex af94ed77f7..0150fbb65c 100644--- a/app/Http/Livewire/Project/Shared/EnvironmentVariable/Add.php+++ b/app/Http/Livewire/Project/Shared/EnvironmentVariable/Add.php@@ -9,13 +9,13 @@ class Add extends Componentpublic $parameters;public bool $is_preview = false;public string $key;- public string $value;+ public ?string $value = null;public bool $is_build_time = false;protected $listeners = ['clearAddEnv' => 'clear'];protected $rules = ['key' => 'required|string',- 'value' => 'required|string',+ 'value' => 'nullable','is_build_time' => 'required|boolean',];protected $validationAttributes = [@@ -32,6 +32,7 @@ class Add extends Componentpublic function submit(){$this->validate();+ ray($this->key, $this->value, $this->is_build_time);$this->emitUp('submit', ['key' => $this->key,'value' => $this->value,diff --git a/app/Http/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Http/Livewire/Project/Shared/EnvironmentVariable/All.phpindex 6d494e2936..59d5566440 100644--- a/app/Http/Livewire/Project/Shared/EnvironmentVariable/All.php+++ b/app/Http/Livewire/Project/Shared/EnvironmentVariable/All.php@@ -53,11 +53,11 @@ class All extends Component$this->resource->environment_variables_preview()->delete();} else {$variables = parseEnvFormatToArray($this->variables);- ray($variables);$existingVariables = $this->resource->environment_variables();$this->resource->environment_variables()->delete();}foreach ($variables as $key => $variable) {+ ray($key, $variable);$found = $existingVariables->where('key', $key)->first();if ($found) {$found->value = $variable;@@ -110,11 +110,16 @@ class All extends Component$environment->is_build_time = $data['is_build_time'];$environment->is_preview = $data['is_preview'];- if ($this->resource->type() === 'application') {- $environment->application_id = $this->resource->id;- }- if ($this->resource->type() === 'standalone-postgresql') {- $environment->standalone_postgresql_id = $this->resource->id;+ switch ($this->resource->type()) {+ case 'application':+ $environment->application_id = $this->resource->id;+ break;+ case 'standalone-postgresql':+ $environment->standalone_postgresql_id = $this->resource->id;+ break;+ case 'service':+ $environment->service_id = $this->resource->id;+ break;}$environment->save();$this->refreshEnvs();diff --git a/app/Http/Livewire/Project/Shared/EnvironmentVariable/Show.php b/app/Http/Livewire/Project/Shared/EnvironmentVariable/Show.phpindex 4eaa1231c1..ec4205b9e0 100644--- a/app/Http/Livewire/Project/Shared/EnvironmentVariable/Show.php+++ b/app/Http/Livewire/Project/Shared/EnvironmentVariable/Show.php@@ -15,7 +15,7 @@ class Show extends Componentprotected $rules = ['env.key' => 'required|string',- 'env.value' => 'required|string',+ 'env.value' => 'nullable','env.is_build_time' => 'required|boolean',];protected $validationAttributes = [diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.phpindex 137fadb6e3..0cfd9b3738 100644--- a/app/Jobs/ContainerStatusJob.php+++ b/app/Jobs/ContainerStatusJob.php@@ -151,6 +151,9 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted$subType = data_get($labels, 'coolify.service.subType');$subId = data_get($labels, 'coolify.service.subId');$service = $services->where('id', $serviceLabelId)->first();+ if (!$service) {+ continue;+ }if ($subType === 'application') {$service = $service->applications()->where('id', $subId)->first();} else {diff --git a/app/Models/Service.php b/app/Models/Service.phpindex f6c12ccffb..bf44b8264b 100644--- a/app/Models/Service.php+++ b/app/Models/Service.php@@ -96,21 +96,47 @@ class Service extends BaseModelforeach ($envs as $env) {$commands[] = "echo '{$env->key}={$env->value}' >> .env";}+ if ($envs->count() === 0) {+ $commands[] = "touch .env";+ }instant_remote_process($commands, $this->server);}- private function generateFqdn($serviceVariables, $serviceName)+ private function sslip(Server $server)+ {+ if (isDev()) {+ return "127.0.0.1.sslip.io";+ }+ return "{$server->ip}.sslip.io";+ }+ private function generateFqdn($serviceVariables, $serviceName, Collection $requiredFqdns){// Add sslip.io to the service- // if (Str::of($serviceVariables)->contains('SERVICE_FQDN') || Str::of($serviceVariables)->contains('SERVICE_URL')) {- $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.{$this->server->ip}.sslip.io";- if (isDev()) {- $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.127.0.0.1.sslip.io";+ $defaultUsableFqdn = null;+ $sslip = $this->sslip($this->server);+ if (Str::of($serviceVariables)->contains('SERVICE_FQDN') || Str::of($serviceVariables)->contains('SERVICE_URL')) {+ $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.{$sslip}";+ }+ if ($requiredFqdns->count() > 0) {+ foreach ($requiredFqdns as $requiredFqdn) {+ $requiredFqdn = (array)$requiredFqdn;+ $name = data_get($requiredFqdn, 'name');+ $path = data_get($requiredFqdn, 'path');+ $customFqdn = data_get($requiredFqdn, 'customFqdn');+ if ($serviceName === $name) {+ $defaultUsableFqdn = "http://$serviceName-{$this->uuid}.{$sslip}{$path}";+ if ($customFqdn) {+ $defaultUsableFqdn = "http://$customFqdn-{$this->uuid}.{$sslip}{$path}";+ }+ }}- // }+ }return $defaultUsableFqdn ?? null;}- public function parse(bool $isNew = false): Collection+ public function parse(bool $isNew = false, ?Collection $requiredFqdns = null): Collection{+ if (!$requiredFqdns) {+ $requiredFqdns = collect([]);+ }ray('parsing');// ray()->clearAll();if ($this->docker_compose_raw) {@@ -130,16 +156,26 @@ class Service extends BaseModel$envs = collect([]);$ports = collect([]);- $services = collect($services)->map(function ($service, $serviceName) use ($composeVolumes, $composeNetworks, $definedNetwork, $envs, $volumes, $ports, $isNew) {+ $services = collect($services)->map(function ($service, $serviceName) use ($composeVolumes, $composeNetworks, $definedNetwork, $envs, $volumes, $ports, $isNew, $requiredFqdns) {$container_name = "$serviceName-{$this->uuid}";$isDatabase = false;$serviceVariables = collect(data_get($service, 'environment', []));+ // Add env_file with at least .env to the service+ $envFile = collect(data_get($service, 'env_file', []));+ if ($envFile->count() > 0) {+ if (!$envFile->contains('.env')) {+ $envFile->push('.env');+ }+ } else {+ $envFile = collect(['.env']);+ }+ data_set($service, 'env_file', $envFile->toArray());+// Decide if the service is a database$image = data_get($service, 'image');if ($image) {$imageName = Str::of($image)->before(':');- $imageTag = Str::of($image)->after(':') ?? 'latest';if (collect(DATABASE_DOCKER_IMAGES)->contains($imageName)) {$isDatabase = true;data_set($service, 'is_database', true);@@ -160,17 +196,29 @@ class Service extends BaseModelif ($isDatabase) {$savedService = ServiceDatabase::create(['name' => $serviceName,- 'image_tag' => $imageTag,+ 'image' => $image,'service_id' => $this->id]);} else {$savedService = ServiceApplication::create(['name' => $serviceName,- 'fqdn' => $this->generateFqdn($serviceVariables, $serviceName),- 'image_tag' => $imageTag,+ 'fqdn' => $this->generateFqdn($serviceVariables, $serviceName, $requiredFqdns),+ 'image' => $image,'service_id' => $this->id]);}+ if ($requiredFqdns->count() > 0) {+ $found = false;+ foreach ($requiredFqdns as $requiredFqdn) {+ $requiredFqdn = (array)$requiredFqdn;+ $name = data_get($requiredFqdn, 'name');+ if ($serviceName === $name) {+ $savedService->required_fqdn = true;+ $savedService->save();+ break;+ }+ }+ }} else {if ($isDatabase) {$savedService = $this->databases()->whereName($serviceName)->first();@@ -179,14 +227,13 @@ class Service extends BaseModelif (data_get($savedService, 'fqdn')) {$defaultUsableFqdn = data_get($savedService, 'fqdn', null);} else {- $defaultUsableFqdn = $this->generateFqdn($serviceVariables, $serviceName);+ $defaultUsableFqdn = $this->generateFqdn($serviceVariables, $serviceName, $requiredFqdns);}$savedService->fqdn = $defaultUsableFqdn;$savedService->save();}}- // Set image tag$fqdns = data_get($savedService, 'fqdn');if ($fqdns) {$fqdns = collect(Str::of($fqdns)->explode(','));@@ -209,6 +256,7 @@ class Service extends BaseModel}$savedService->ports = $collectedPorts->implode(',');$savedService->save();+// Collect volumes$serviceVolumes = collect(data_get($service, 'volumes', []));if ($serviceVolumes->count() > 0) {@@ -341,6 +389,7 @@ class Service extends BaseModel$value = Str::after($variable, '=');if (!Str::startsWith($value, '$SERVICE_') && !Str::startsWith($value, '${SERVICE_') && Str::startsWith($value, '$')) {$value = Str::of(replaceVariables(Str::of($value)));+ $nakedName = $nakedValue = null;if ($value->contains(':')) {$nakedName = $value->before(':');$nakedValue = $value->after(':');@@ -464,6 +513,7 @@ class Service extends BaseModel$number = 0;}$fqdn = getFqdnWithoutPort(data_get($fqdns, $number, $fqdns->first()));+ ray($fqdns);$environments = collect(data_get($service, 'environment'));$environments = $environments->map(function ($envValue) use ($value, $fqdn) {$envValue = Str::of($envValue)->replace($value, $fqdn);@@ -491,6 +541,7 @@ class Service extends BaseModel}}}+// Add labels to the service$labels = collect(data_get($service, 'labels', []));$labels = collect([]);diff --git a/app/Models/ServiceApplication.php b/app/Models/ServiceApplication.phpindex 2c3bc4f7c4..e7bb84d683 100644--- a/app/Models/ServiceApplication.php+++ b/app/Models/ServiceApplication.php@@ -18,7 +18,6 @@ class ServiceApplication extends BaseModel{$services = Cache::get('services', []);$service = data_get($services, $this->name, []);- ray($this->name);return data_get($service, 'documentation', 'https://coolify.io/docs');}public function service()diff --git a/bootstrap/helpers/services.php b/bootstrap/helpers/services.phpindex af99f77f08..830c17b39e 100644--- a/bootstrap/helpers/services.php+++ b/bootstrap/helpers/services.php@@ -3,7 +3,9 @@use App\Models\Service;use App\Models\ServiceApplication;use App\Models\ServiceDatabase;+use Illuminate\Support\Facades\Storage;use Illuminate\Support\Str;+use Symfony\Component\Yaml\Yaml;function replaceRegex(?string $name = null){@@ -22,33 +24,41 @@ function serviceStatus(Service $service){$foundRunning = false;$isDegraded = false;+ $foundRestaring = false;$applications = $service->applications;$databases = $service->databases;foreach ($applications as $application) {- if ($application->ignore_from_status) {+ if ($application->exclude_from_status) {continue;}if (Str::of($application->status)->startsWith('running')) {$foundRunning = true;+ } else if (Str::of($application->status)->startsWith('restarting')) {+ $foundRestaring = true;} else {$isDegraded = true;}}foreach ($databases as $database) {- if ($database->ignore_from_status) {+ if ($database->exclude_from_status) {continue;}if (Str::of($database->status)->startsWith('running')) {$foundRunning = true;+ } else if (Str::of($database->status)->startsWith('restarting')) {+ $foundRestaring = true;} else {$isDegraded = true;}}+ if ($foundRestaring) {+ return 'degraded';+ }if ($foundRunning && !$isDegraded) {return 'running';} else if ($foundRunning && $isDegraded) {return 'degraded';- } else if (!$foundRunning && $isDegraded) {+ } else if (!$foundRunning && !$isDegraded) {return 'exited';}return 'exited';@@ -60,19 +70,25 @@ function saveFileVolumesHelper(ServiceApplication|ServiceDatabase $oneService)$server = $oneService->service->server;$applicationFileVolume = $oneService->fileStorages()->get();$commands = collect([- "mkdir -p $workdir",+ "mkdir -p $workdir > /dev/null 2>&1 || true","cd $workdir"]);foreach ($applicationFileVolume as $fileVolume) {- $content = $fileVolume->content;$path = Str::of($fileVolume->fs_path);+ if ($fileVolume->is_directory) {+ $commands->push("test -f $path && rm -f $path > /dev/null 2>&1 || true");+ $commands->push("mkdir -p $path > /dev/null 2>&1 || true");+ continue;+ }+ $content = $fileVolume->content;$dir = $path->beforeLast('/');if ($dir->startsWith('.')) {$dir = $dir->after('.');$dir = $workdir . $dir;}$content = base64_encode($content);- $commands->push("mkdir -p $dir");+ $commands->push("test -d $path && rm -rf $path > /dev/null 2>&1 || true");+ $commands->push("mkdir -p $dir > /dev/null 2>&1 || true");$commands->push("echo '$content' | base64 -d > $path");}return instant_remote_process($commands, $server);@@ -80,3 +96,18 @@ function saveFileVolumesHelper(ServiceApplication|ServiceDatabase $oneService)return handleError($e);}}+function switchImage($resource)+{+ try {+ $name = data_get($resource, 'name');+ $dockerComposeRaw = data_get($resource, 'service.docker_compose_raw');+ $image = data_get($resource, 'image');+ $dockerCompose = Yaml::parse($dockerComposeRaw);+ data_set($dockerCompose, "services.{$name}.image", $image);+ $dockerComposeRaw = Yaml::dump($dockerCompose, 10, 2);+ $resource->service->docker_compose_raw = $dockerComposeRaw;+ $resource->service->save();+ } catch (\Throwable $e) {+ return handleError($e);+ }+}diff --git a/database/migrations/2023_09_23_111811_update_service_applications_table.php b/database/migrations/2023_09_23_111811_update_service_applications_table.phpindex 68ddab8d59..7e3e5984b9 100644--- a/database/migrations/2023_09_23_111811_update_service_applications_table.php+++ b/database/migrations/2023_09_23_111811_update_service_applications_table.php@@ -12,8 +12,9 @@ return new class extends Migrationpublic function up(): void{Schema::table('service_applications', function (Blueprint $table) {- $table->boolean('ignore_from_status')->default(false);- $table->string('image_tag')->nullable();+ $table->boolean('exclude_from_status')->default(false);+ $table->boolean('required_fqdn')->default(false);+ $table->string('image')->nullable();});}@@ -23,8 +24,9 @@ return new class extends Migrationpublic function down(): void{Schema::table('service_applications', function (Blueprint $table) {- $table->dropColumn('ignore_from_status');- $table->dropColumn('image_tag');+ $table->dropColumn('exclude_from_status');+ $table->dropColumn('required_fqdn');+ $table->dropColumn('image');});}};diff --git a/database/migrations/2023_09_23_111812_update_service_databases_table.php b/database/migrations/2023_09_23_111812_update_service_databases_table.phpindex bcf42abfd4..2f02b5afe7 100644--- a/database/migrations/2023_09_23_111812_update_service_databases_table.php+++ b/database/migrations/2023_09_23_111812_update_service_databases_table.php@@ -12,8 +12,8 @@ return new class extends Migrationpublic function up(): void{Schema::table('service_databases', function (Blueprint $table) {- $table->boolean('ignore_from_status')->default(false);- $table->string('image_tag')->nullable();+ $table->boolean('exclude_from_status')->default(false);+ $table->string('image')->nullable();});}@@ -23,8 +23,8 @@ return new class extends Migrationpublic function down(): void{Schema::table('service_databases', function (Blueprint $table) {- $table->dropColumn('ignore_from_status');- $table->dropColumn('image_tag');+ $table->dropColumn('exclude_from_status');+ $table->dropColumn('image');});}};diff --git a/database/migrations/2023_09_23_111814_update_local_file_volumes_table.php b/database/migrations/2023_09_23_111814_update_local_file_volumes_table.phpnew file mode 100644index 0000000000..c1ccd80247--- /dev/null+++ b/database/migrations/2023_09_23_111814_update_local_file_volumes_table.php@@ -0,0 +1,28 @@+<?php++use Illuminate\Database\Migrations\Migration;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Support\Facades\Schema;++return new class extends Migration+{+ /**+ * Run the migrations.+ */+ public function up(): void+ {+ Schema::table('local_file_volumes', function (Blueprint $table) {+ $table->boolean('is_directory')->default(false);+ });+ }++ /**+ * Reverse the migrations.+ */+ public function down(): void+ {+ Schema::table('local_file_volumes', function (Blueprint $table) {+ $table->dropColumn('is_directory');+ });+ }+};diff --git a/examples/service-templates.json b/examples/service-templates.jsonindex a102b87841..f5f4ab5c2b 100644--- a/examples/service-templates.json+++ b/examples/service-templates.json@@ -5,6 +5,38 @@},"uptime-kuma": {"documentation": "https://github.com/louislam/uptime-kuma",+ "generateFqdn": [+ {+ "name": "uptime-kuma",+ "path": "/"+ }+ ],"compose": "c2VydmljZXM6CiAgdXB0aW1lLWt1bWE6CiAgICBpbWFnZTogbG91aXNsYW0vdXB0aW1lLWt1bWE6MQogICAgdm9sdW1lczoKICAgICAgLSB1cHRpbWUta3VtYTovYXBwL2RhdGEK"+ },+ "appsmith": {+ "documentation": "https://docs.appsmith.com/",+ "generateFqdn": [+ {+ "name": "appsmith"+ }+ ],+ "envs": "QVBQU01JVEhfTUFJTF9FTkFCTEVEPWZhbHNlCkFQUFNNSVRIX0RJU0FCTEVfVEVMRU1FVFJZPXRydWUKQVBQU01JVEhfRElTQUJMRV9JTlRFUkNPTT10cnVlCkFQUFNNSVRIX1NFTlRSWV9EU049CkFQUFNNSVRIX1NNQVJUX0xPT0tfSUQ9",+ "compose": "c2VydmljZXM6CiAgYXBwc21pdGg6CiAgICBpbWFnZTogaW5kZXguZG9ja2VyLmlvL2FwcHNtaXRoL2FwcHNtaXRoLWNlCiAgICB2b2x1bWVzOgogICAgICAtIHN0YWNrcy1kYXRhOi9hcHBzbWl0aC1zdGFja3M="+ },+ "appwrite": {+ "documentation": "https://appwrite.io/docs",+ "generateFqdn": [+ {+ "name": "appwrite",+ "path": "/"+ },+ {+ "name": "appwrite-realtime",+ "customFqdn": "appwrite",+ "path": "/v1/realtime"+ }+ ],+ "envs": "X0FQUF9FTlY9cHJvZHVjdGlvbgpfQVBQX0xPQ0FMRT1lbgpfQVBQX09QVElPTlNfQUJVU0U9ZW5hYmxlZApfQVBQX09QVElPTlNfRk9SQ0VfSFRUUFM9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i4wCiAgICB2b2x1bWVzOgogICAgICAtIGFwcHdyaXRlLXVwbG9hZHM6L3N0b3JhZ2UvdXBsb2FkcwoKICBpbmZsdXhkYjoKICAgIGltYWdlOiBhcHB3cml0ZS9pbmZsdXhkYjoxLjUuMAogICAgPDw6ICp4LWxvZ2dpbmcKICAgIHZvbHVtZXM6CiAgICAgIC0gYXBwd3JpdGUtaW5mbHV4ZGI6L3Zhci9saWIvaW5mbHV4ZGI6cncKCiAgdGVsZWdyYWY6CiAgICBpbWFnZTogYXBwd3JpdGUvdGVsZWdyYWY6MS40LjAKICAgIDw8OiAqeC1sb2dnaW5nCg== "}}diff --git a/resources/views/components/navbar-subscription.blade.php b/resources/views/components/navbar-subscription.blade.phpindex 6269d20084..91629f99e3 100644--- a/resources/views/components/navbar-subscription.blade.php+++ b/resources/views/components/navbar-subscription.blade.php@@ -11,12 +11,13 @@</svg></a></li>- <li title="Send feedback or get help" class="fixed top-0 right-0 p-2 px-4 pt-2 mt-auto">- <div class="justify-center text-xs text-warning" wire:click="help" onclick="help.showModal()">- <svg class="w-4 h-4" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">- <path fill="currentColor" d="M22 5.5H9c-1.1 0-2 .9-2 2v9a2 2 0 0 0 2 2h13c1.11 0 2-.89 2-2v-9a2 2 0 0 0-2-2m0 11H9V9.17l6.5 3.33L22 9.17v7.33m-6.5-5.69L9 7.5h13l-6.5 3.31M5 16.5c0 .17.03.33.05.5H1c-.552 0-1-.45-1-1s.448-1 1-1h4v1.5M3 7h2.05c-.02.17-.05.33-.05.5V9H3c-.55 0-1-.45-1-1s.45-1 1-1m-2 5c0-.55.45-1 1-1h3v2H2c-.55 0-1-.45-1-1Z"/>+ <li title="Send feedback or get help" class="fixed top-0 right-0 p-2 px-4 pt-4 mt-auto">+ <div class="justify-center" wire:click="help" onclick="help.showModal()">+ <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">+ <path fill="currentColor"+ d="M22 5.5H9c-1.1 0-2 .9-2 2v9a2 2 0 0 0 2 2h13c1.11 0 2-.89 2-2v-9a2 2 0 0 0-2-2m0 11H9V9.17l6.5 3.33L22 9.17v7.33m-6.5-5.69L9 7.5h13l-6.5 3.31M5 16.5c0 .17.03.33.05.5H1c-.552 0-1-.45-1-1s.448-1 1-1h4v1.5M3 7h2.05c-.02.17-.05.33-.05.5V9H3c-.55 0-1-.45-1-1s.45-1 1-1m-2 5c0-.55.45-1 1-1h3v2H2c-.55 0-1-.45-1-1Z" /></svg>- Feedback+ Feedback</div></li><li class="pb-6" title="Logout">diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.phpindex c6ed31ef71..4a86f7dd5b 100644--- a/resources/views/components/navbar.blade.php+++ b/resources/views/components/navbar.blade.php@@ -116,8 +116,8 @@@endif@if (isSubscriptionActive() || isDev())<li title="Send feedback or get help" class="fixed top-0 right-0 p-2 px-4 pt-4 mt-auto">- <div class="justify-center text-xs text-warning" wire:click="help" onclick="help.showModal()">- <svg class="w-4 h-4" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">+ <div class="justify-center" wire:click="help" onclick="help.showModal()">+ <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor"d="M22 5.5H9c-1.1 0-2 .9-2 2v9a2 2 0 0 0 2 2h13c1.11 0 2-.89 2-2v-9a2 2 0 0 0-2-2m0 11H9V9.17l6.5 3.33L22 9.17v7.33m-6.5-5.69L9 7.5h13l-6.5 3.31M5 16.5c0 .17.03.33.05.5H1c-.552 0-1-.45-1-1s.448-1 1-1h4v1.5M3 7h2.05c-.02.17-.05.33-.05.5V9H3c-.55 0-1-.45-1-1s.45-1 1-1m-2 5c0-.55.45-1 1-1h3v2H2c-.55 0-1-.45-1-1Z" /></svg>diff --git a/resources/views/components/services/navbar.blade.php b/resources/views/components/services/navbar.blade.phpindex 779e8ccfe4..0bf49f3e32 100644--- a/resources/views/components/services/navbar.blade.php+++ b/resources/views/components/services/navbar.blade.php@@ -1,27 +1,7 @@<div class="navbar-main"><x-services.links :service="$service" /><div class="flex-1"></div>- @if (serviceStatus($service) === 'running')- <button wire:click='stop' class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">- <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24" stroke-width="2"- stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">- <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>- <path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>- <path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>- </svg>- Stop- </button>- @elseif(serviceStatus($service) === 'exited')- <button wire:click='deploy' onclick="startService.showModal()"- class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">- <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-warning" viewBox="0 0 24 24" stroke-width="1.5"- stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">- <path stroke="none" d="M0 0h24v24H0z" fill="none" />- <path d="M7 4v16l13 -8z" />- </svg>- Deploy- </button>- @elseif (serviceStatus($service) === 'degraded')+ @if (serviceStatus($service) === 'degraded')<button wire:click='deploy' onclick="startService.showModal()"class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400"><svg class="w-5 h-5 text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">@@ -42,4 +22,34 @@Stop</button>@endif+ @if (serviceStatus($service) === 'running')+ <button wire:click='stop' class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">+ <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24" stroke-width="2"+ stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">+ <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>+ <path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>+ <path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>+ </svg>+ Stop+ </button>+ @endif+ @if (serviceStatus($service) === 'exited')+ <button wire:click='stop' class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">+ <svg class="w-5 h-5 " viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">+ <path fill="red" d="M26 20h-6v-2h6zm4 8h-6v-2h6zm-2-4h-6v-2h6z" />+ <path fill="red"+ d="M17.003 20a4.895 4.895 0 0 0-2.404-4.173L22 3l-1.73-1l-7.577 13.126a5.699 5.699 0 0 0-5.243 1.503C3.706 20.24 3.996 28.682 4.01 29.04a1 1 0 0 0 1 .96h14.991a1 1 0 0 0 .6-1.8c-3.54-2.656-3.598-8.146-3.598-8.2Zm-5.073-3.003A3.11 3.11 0 0 1 15.004 20c0 .038.002.208.017.469l-5.9-2.624a3.8 3.8 0 0 1 2.809-.848ZM15.45 28A5.2 5.2 0 0 1 14 25h-2a6.5 6.5 0 0 0 .968 3h-2.223A16.617 16.617 0 0 1 10 24H8a17.342 17.342 0 0 0 .665 4H6c.031-1.836.29-5.892 1.803-8.553l7.533 3.35A13.025 13.025 0 0 0 17.596 28Z" />+ </svg>+ Force cleanup containers+ </button>+ <button wire:click='deploy' onclick="startService.showModal()"+ class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">+ <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-warning" viewBox="0 0 24 24" stroke-width="1.5"+ stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />+ <path d="M7 4v16l13 -8z" />+ </svg>+ Deploy+ </button>+ @endif</div>diff --git a/resources/views/livewire/activity-monitor.blade.php b/resources/views/livewire/activity-monitor.blade.phpindex 2b83d863a6..97d3bd64c4 100644--- a/resources/views/livewire/activity-monitor.blade.php+++ b/resources/views/livewire/activity-monitor.blade.php@@ -10,7 +10,7 @@</div>@endif<div- class="scrollbar flex flex-col-reverse w-full overflow-y-auto border border-solid rounded border-coolgray-300 max-h-[32rem] p-4 text-xs text-white">+ class="scrollbar flex flex-col-reverse w-full overflow-y-auto border border-solid rounded border-coolgray-300 max-h-[32rem] p-4 pt-6 text-xs text-white"><pre class="font-mono whitespace-pre-wrap" @if ($isPollingActive) wire:poll.2000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($this->activity) }}</pre></div>diff --git a/resources/views/livewire/project/new/docker-compose.blade.php b/resources/views/livewire/project/new/docker-compose.blade.phpindex 8869dde0bd..2ec301b6b3 100644--- a/resources/views/livewire/project/new/docker-compose.blade.php+++ b/resources/views/livewire/project/new/docker-compose.blade.php@@ -44,5 +44,6 @@- MYSQL_DATABASE=${MYSQL_DATABASE}- MYSQL_ROOT_PASSWORD=${SERVICE_PASSWORD_MYSQL_ROOT}'></x-forms.textarea>+ <x-forms.textarea label="Environment File" rows="20" id="envFile"></x-forms.textarea></form></div>diff --git a/resources/views/livewire/project/service/application.blade.php b/resources/views/livewire/project/service/application.blade.phpindex 69f47fc5d3..5c26c950bb 100644--- a/resources/views/livewire/project/service/application.blade.php+++ b/resources/views/livewire/project/service/application.blade.php@@ -17,22 +17,30 @@<x-forms.input label="Description" id="application.description"></x-forms.input></div><div class="flex gap-2">- <x-forms.input placeholder="https://app.coolify.io" label="Domains"- id="application.fqdn"></x-forms.input>- <x-forms.input required helper="You can change the image tag you would like to deploy.<br><br><span class='text-warning'>WARNING. You could corrupt your data. Only do it if you know what you are doing.</span>" label="Image Tag" id="application.image_tag"></x-forms.input>+ @if ($application->required_fqdn)+ <x-forms.input required placeholder="https://app.coolify.io" label="Domains"+ id="application.fqdn"></x-forms.input>+ @else+ <x-forms.input placeholder="https://app.coolify.io" label="Domains"+ id="application.fqdn"></x-forms.input>+ @endif+ <x-forms.input required+ helper="You can change the image you would like to deploy.<br><br><span class='text-warning'>WARNING. You could corrupt your data. Only do it if you know what you are doing.</span>"+ label="Image" id="application.image"></x-forms.input></div></div>+<h3 class="pt-2">Advanced</h3><div class="w-64">- <x-forms.checkbox instantSave label="Ignore from service status"+ <x-forms.checkbox instantSave label="Exclude from service status"helper="If you do not need to monitor this resource, enable. Useful if this service is optional."- id="application.ignore_from_status"></x-forms.checkbox>+ id="application.exclude_from_status"></x-forms.checkbox></div></form>@if ($fileStorages->count() > 0)- <h3 class="py-4">Files</h3>+ <h3 class="py-4">Mounted Files (binds)</h3><div class="flex flex-col gap-4">- @foreach ($fileStorages->get() as $fileStorage)+ @foreach ($fileStorages as $fileStorage)<livewire:project.service.file-storage :fileStorage="$fileStorage" wire:key="{{ $loop->index }}" />@endforeach</div>diff --git a/resources/views/livewire/project/service/database.blade.php b/resources/views/livewire/project/service/database.blade.phpindex 596ef3ec7d..fbde06a74d 100644--- a/resources/views/livewire/project/service/database.blade.php+++ b/resources/views/livewire/project/service/database.blade.php@@ -15,21 +15,21 @@<x-forms.input label="Description" id="database.description"></x-forms.input></div><div class="flex gap-2">- <x-forms.input required helper="You can change the image tag you would like to deploy.<br><br><span class='text-warning'>WARNING. You could corrupt your data. Only do it if you know what you are doing.</span>" label="Image Tag"- id="database.image_tag"></x-forms.input>+ <x-forms.input required helper="You can change the image you would like to deploy.<br><br><span class='text-warning'>WARNING. You could corrupt your data. Only do it if you know what you are doing.</span>" label="Image Tag"+ id="database.image"></x-forms.input></div></div><h3 class="pt-2">Advanced</h3><div class="w-64">- <x-forms.checkbox instantSave label="Ignore from service status"+ <x-forms.checkbox instantSave label="Exclude from service status"helper="If you do not need to monitor this resource, enable. Useful if this service is optional."- id="database.ignore_from_status"></x-forms.checkbox>+ id="database.exclude_from_status"></x-forms.checkbox></div></form>- @if ($database->fileStorages()->get()->count() > 0)+ @if ($fileStorages->count() > 0)<h3 class="py-4">Mounted Files (binds)</h3><div class="flex flex-col gap-4">- @foreach ($database->fileStorages()->get() as $fileStorage)+ @foreach ($fileStorages as $fileStorage)<livewire:project.service.file-storage :fileStorage="$fileStorage" wire:key="{{ $loop->index }}" />@endforeach</div>diff --git a/resources/views/livewire/project/service/file-storage.blade.php b/resources/views/livewire/project/service/file-storage.blade.phpindex b70d505dd1..ab90058bf4 100644--- a/resources/views/livewire/project/service/file-storage.blade.php+++ b/resources/views/livewire/project/service/file-storage.blade.php@@ -1,20 +1,26 @@<x-collapsible><x-slot:title><div>{{ $fileStorage->mount_path }}- @empty($fileStorage->content)+ @if(is_null($fileStorage->content) && !$fileStorage->is_directory)<span class="text-xs text-warning">(empty)</span>- @endempty+ @endif</div></x-slot:title><x-slot:action><form wire:submit.prevent='submit' class="flex flex-col gap-2">- <div class="flex gap-2">- <x-forms.input readonly label="File in Docker Compose file" id="fileStorage.fs_path"></x-forms.input>- <x-forms.input readonly label="File on Filesystem" id="fs_path"></x-forms.input>+ <div class="w-64">+ <x-forms.checkbox instantSave label="Is directory?" id="fileStorage.is_directory"></x-forms.checkbox></div>- <x-forms.input readonly label="Mount (in container)" id="fileStorage.mount_path"></x-forms.input>- <x-forms.textarea label="Content" rows="20" id="fileStorage.content"></x-forms.textarea>- <x-forms.button type="submit">Save</x-forms.button>+ <x-forms.input readonly label="Save your required files here:" id="fs_path"></x-forms.input>+ @if (!$fileStorage->is_directory)+ <div class="flex gap-2">+ <x-forms.input readonly label="File in Docker Compose file" id="fileStorage.fs_path"></x-forms.input>+ <x-forms.input readonly label="File on Filesystem" id="fs_path"></x-forms.input>+ </div>+ <x-forms.input readonly label="Mount (in container)" id="fileStorage.mount_path"></x-forms.input>+ <x-forms.textarea label="Content" rows="20" id="fileStorage.content"></x-forms.textarea>+ <x-forms.button type="submit">Save</x-forms.button>+ @endif</form></x-slot:action></x-collapsible>diff --git a/resources/views/livewire/project/service/index.blade.php b/resources/views/livewire/project/service/index.blade.phpindex bc6cd94cd8..b2fc8c422b 100644--- a/resources/views/livewire/project/service/index.blade.php+++ b/resources/views/livewire/project/service/index.blade.php@@ -28,7 +28,10 @@<x-forms.input id="service.description" label="Description" /></div></form>- <h2 class="pb-4"> Service Stack </h2>+ <div class="flex gap-2">+ <h2 class="pb-4"> Service Stack </h2>+ <x-forms.button wire:click='manualRefreshStack'>Refresh</x-forms.button>+ </div><div class="grid grid-cols-1 gap-2 xl:grid-cols-3 ">@foreach ($applications as $application)<a @class([@@ -46,6 +49,9 @@@else{{ Str::headline($application->name) }}@endif+ @if ($application->hasMissingFiles)+ <span class="text-xs text-error">(has missing files)</span>+ @endif@if ($application->description)<span class="text-xs">{{ $application->description }}</span>@endif@@ -58,11 +64,11 @@@foreach ($databases as $database)<a @class(['border-l border-dashed border-red-500' => Str::of(- $application->status)->contains(['exited']),+ $database->status)->contains(['exited']),'border-l border-dashed border-success' => Str::of(- $application->status)->contains(['running']),+ $database->status)->contains(['running']),'border-l border-dashed border-warning' => Str::of(- $application->status)->contains(['restarting']),+ $database->status)->contains(['restarting']),'flex flex-col justify-center box',])href="{{ route('project.service.show', [...$parameters, 'service_name' => $database->name]) }}">@@ -71,10 +77,13 @@@else{{ Str::headline($database->name) }}@endif+ @if ($database->hasMissingFiles)+ <span class="text-xs text-error">(has missing files)</span>+ @endif@if ($database->description)<span class="text-xs">{{ $database->description }}</span>@endif- <div class="text-xs">{{ $application->status }}</div>+ <div class="text-xs">{{ $database->status }}</div></a>@endforeach</div>diff --git a/resources/views/livewire/project/shared/environment-variable/all.blade.php b/resources/views/livewire/project/shared/environment-variable/all.blade.phpindex fe9788fa6d..6297f38229 100644--- a/resources/views/livewire/project/shared/environment-variable/all.blade.php+++ b/resources/views/livewire/project/shared/environment-variable/all.blade.php@@ -28,13 +28,13 @@@endif@else<form wire:submit.prevent='saveVariables(false)' class="flex flex-col gap-2">- <x-forms.textarea rows=5 class="whitespace-pre-wrap"+ <x-forms.textarea rows=25 class="whitespace-pre-wrap"id="variables"></x-forms.textarea><x-forms.button type="submit" class="btn btn-primary">Save</x-forms.button></form>@if ($showPreview)<form wire:submit.prevent='saveVariables(true)' class="flex flex-col gap-2">- <x-forms.textarea rows=5 class="whitespace-pre-wrap" label="Preview Environment Variables"+ <x-forms.textarea rows=25 class="whitespace-pre-wrap" label="Preview Environment Variables"id="variablesPreview"></x-forms.textarea><x-forms.button type="submit" class="btn btn-primary">Save</x-forms.button></form>diff --git a/resources/views/livewire/server/proxy/status.blade.php b/resources/views/livewire/server/proxy/status.blade.phpindex 69007d59f2..b477752d7b 100644--- a/resources/views/livewire/server/proxy/status.blade.php+++ b/resources/views/livewire/server/proxy/status.blade.php@@ -8,16 +8,7 @@@else<x-status.stopped status="Proxy Stopped" />@endif- <button wire:loading.remove.delay.longer wire:click.prevent='getProxyStatusWithNoti'>- <svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">- <g fill="#FCD44F">- <path- d="M12.079 3v-.75V3Zm-8.4 8.333h-.75h.75Zm0 1.667l-.527.532a.75.75 0 0 0 1.056 0L3.68 13Zm2.209-1.134A.75.75 0 1 0 4.83 10.8l1.057 1.065ZM2.528 10.8a.75.75 0 0 0-1.056 1.065L2.528 10.8Zm16.088-3.408a.75.75 0 1 0 1.277-.786l-1.277.786ZM12.079 2.25c-5.047 0-9.15 4.061-9.15 9.083h1.5c0-4.182 3.42-7.583 7.65-7.583v-1.5Zm-9.15 9.083V13h1.5v-1.667h-1.5Zm1.28 2.2l1.679-1.667L4.83 10.8l-1.68 1.667l1.057 1.064Zm0-1.065L2.528 10.8l-1.057 1.065l1.68 1.666l1.056-1.064Zm15.684-5.86A9.158 9.158 0 0 0 12.08 2.25v1.5a7.658 7.658 0 0 1 6.537 3.643l1.277-.786Z" />- <path fill="#fff"- d="M11.883 21v.75V21Zm8.43-8.333h.75h-.75Zm0-1.667l.528-.533a.75.75 0 0 0-1.055 0l.528.533ZM18.1 12.133a.75.75 0 1 0 1.055 1.067L18.1 12.133Zm3.373 1.067a.75.75 0 1 0 1.054-1.067L21.473 13.2ZM5.318 16.606a.75.75 0 1 0-1.277.788l1.277-.788Zm6.565 5.144c5.062 0 9.18-4.058 9.18-9.083h-1.5c0 4.18-3.43 7.583-7.68 7.583v1.5Zm9.18-9.083V11h-1.5v1.667h1.5Zm-1.277-2.2L18.1 12.133l1.055 1.067l1.686-1.667l-1.055-1.066Zm0 1.066l1.687 1.667l1.054-1.067l-1.686-1.666l-1.055 1.066Zm-15.745 5.86a9.197 9.197 0 0 0 7.841 4.357v-1.5a7.697 7.697 0 0 1-6.564-3.644l-1.277.788Z"- opacity=".5" />- </g>- </svg></button>+ <x-forms.button wire:click='getProxyStatusWithNoti'>Refresh </x-forms.button></div>@endif</div>