fixes
This commit is contained in:
parent
114647810b
commit
3575972c43
@ -8,13 +8,13 @@
|
||||
|
||||
class CheckProxySettingsInSync
|
||||
{
|
||||
public function __invoke(Server $server)
|
||||
public function __invoke(Server $server, bool $reset = false)
|
||||
{
|
||||
$proxy_path = config('coolify.proxy_config_path');
|
||||
$output = instantRemoteProcess([
|
||||
"cat $proxy_path/docker-compose.yml",
|
||||
], $server, false);
|
||||
if (is_null($output)) {
|
||||
if (is_null($output) || $reset) {
|
||||
$final_output = Str::of(getProxyConfiguration($server))->trim()->value;
|
||||
} else {
|
||||
$final_output = Str::of($output)->trim()->value;
|
||||
|
@ -65,7 +65,7 @@ public function saveConfiguration()
|
||||
public function checkProxySettingsInSync()
|
||||
{
|
||||
try {
|
||||
$this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server);
|
||||
$this->proxy_settings = resolve(CheckProxySettingsInSync::class)($this->server, true);
|
||||
} catch (\Exception $e) {
|
||||
return generalErrorHandler($e);
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
use Spatie\Activitylog\Models\Activity;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
use Illuminate\Support\Str;
|
||||
use Spatie\Url\Url;
|
||||
|
||||
class DeployApplicationJob implements ShouldQueue
|
||||
{
|
||||
@ -376,8 +377,10 @@ private function set_labels_for_applications()
|
||||
$labels[] = 'coolify.type=application';
|
||||
$labels[] = 'coolify.name=' . $this->application->name;
|
||||
if ($this->application->fqdn) {
|
||||
$url = Url::fromString($this->application->fqdn);
|
||||
$host = $url->getHost();
|
||||
$labels[] = 'traefik.enable=true';
|
||||
$labels[] = "traefik.http.routers.container.rule=Host(`{$this->application->fqdn}`)";
|
||||
$labels[] = "traefik.http.routers.container.rule=Host(`{$host}`)";
|
||||
}
|
||||
return $labels;
|
||||
}
|
||||
|
@ -41,6 +41,9 @@
|
||||
wire:click.prevent="installProxy">
|
||||
Apply
|
||||
</x-inputs.button>
|
||||
<x-inputs.button isBold wire:click.prevent="checkProxySettingsInSync">
|
||||
Default
|
||||
</x-inputs.button>
|
||||
<textarea wire:model.defer="proxy_settings" class="w-full" rows="30"></textarea>
|
||||
</form>
|
||||
@endisset
|
||||
|
Loading…
Reference in New Issue
Block a user