wip
This commit is contained in:
parent
846e74b8b5
commit
28cf89627d
@ -3,9 +3,11 @@
|
||||
namespace App\Actions\Proxy;
|
||||
|
||||
use App\Enums\ActivityTypes;
|
||||
use App\Models\InstanceSettings;
|
||||
use App\Models\Server;
|
||||
use Spatie\Activitylog\Models\Activity;
|
||||
use Illuminate\Support\Str;
|
||||
use Spatie\Url\Url;
|
||||
|
||||
class InstallProxy
|
||||
{
|
||||
@ -61,8 +63,10 @@ public function __invoke(Server $server): Activity
|
||||
|
||||
protected function getEnvContents()
|
||||
{
|
||||
$instance_fqdn = InstanceSettings::find(1)->fqdn ?? config('app.url');
|
||||
$url = Url::fromString($instance_fqdn);
|
||||
$data = [
|
||||
'TRAEFIK_DASHBOARD_HOST' => '',
|
||||
'TRAEFIK_DASHBOARD_HOST' => $url->getHost(),
|
||||
'LETS_ENCRYPT_EMAIL' => '',
|
||||
];
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Spatie\Activitylog\Models\Activity;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
@ -379,8 +380,13 @@ private function set_labels_for_applications()
|
||||
if ($this->application->fqdn) {
|
||||
$url = Url::fromString($this->application->fqdn);
|
||||
$host = $url->getHost();
|
||||
$path = $url->getPath();
|
||||
$labels[] = 'traefik.enable=true';
|
||||
$labels[] = "traefik.http.routers.container.rule=Host(`{$host}`)";
|
||||
if ($path === '/') {
|
||||
$labels[] = "traefik.http.routers.container.rule=Host(`{$host}`) && PathPrefix(`{$path}`)";
|
||||
} else {
|
||||
$labels[] = "traefik.http.routers.container.rule=Host(`{$host}`) && PathPrefix(`{$path}`)";
|
||||
}
|
||||
}
|
||||
return $labels;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div x-data="{ deleteApplication: false }">
|
||||
<x-naked-modal show="deleteApplication" />
|
||||
@if ($application->status === 'running')
|
||||
<x-inputs.button wire:click='start'>Restart</x-inputs.button>
|
||||
<x-inputs.button wire:click='start'>Rebuild</x-inputs.button>
|
||||
<x-inputs.button wire:click='forceRebuild'>Force Rebuild</x-inputs.button>
|
||||
<x-inputs.button wire:click='stop'>Stop</x-inputs.button>
|
||||
@else
|
||||
|
@ -23,7 +23,7 @@ function sync-bunny {
|
||||
php artisan sync:bunny --env=secrets
|
||||
}
|
||||
function queue {
|
||||
bash vendor/bin/spin exec -u webuser coolify php artisan horizon
|
||||
bash vendor/bin/spin exec -u webuser coolify php artisan queue:listen
|
||||
}
|
||||
function schedule {
|
||||
bash vendor/bin/spin exec -u webuser coolify php artisan schedule:work
|
||||
|
Loading…
Reference in New Issue
Block a user