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