wip
This commit is contained in:
parent
846e74b8b5
commit
28cf89627d
@ -3,9 +3,11 @@
|
|||||||
namespace App\Actions\Proxy;
|
namespace App\Actions\Proxy;
|
||||||
|
|
||||||
use App\Enums\ActivityTypes;
|
use App\Enums\ActivityTypes;
|
||||||
|
use App\Models\InstanceSettings;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Spatie\Activitylog\Models\Activity;
|
use Spatie\Activitylog\Models\Activity;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
use Spatie\Url\Url;
|
||||||
|
|
||||||
class InstallProxy
|
class InstallProxy
|
||||||
{
|
{
|
||||||
@ -61,8 +63,10 @@ class InstallProxy
|
|||||||
|
|
||||||
protected function getEnvContents()
|
protected function getEnvContents()
|
||||||
{
|
{
|
||||||
|
$instance_fqdn = InstanceSettings::find(1)->fqdn ?? config('app.url');
|
||||||
|
$url = Url::fromString($instance_fqdn);
|
||||||
$data = [
|
$data = [
|
||||||
'TRAEFIK_DASHBOARD_HOST' => '',
|
'TRAEFIK_DASHBOARD_HOST' => $url->getHost(),
|
||||||
'LETS_ENCRYPT_EMAIL' => '',
|
'LETS_ENCRYPT_EMAIL' => '',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
|
|||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Storage;
|
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;
|
||||||
@ -379,8 +380,13 @@ COPY --from={$this->application->uuid}:{$this->git_commit}-build /app/{$this->ap
|
|||||||
if ($this->application->fqdn) {
|
if ($this->application->fqdn) {
|
||||||
$url = Url::fromString($this->application->fqdn);
|
$url = Url::fromString($this->application->fqdn);
|
||||||
$host = $url->getHost();
|
$host = $url->getHost();
|
||||||
|
$path = $url->getPath();
|
||||||
$labels[] = 'traefik.enable=true';
|
$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;
|
return $labels;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div x-data="{ deleteApplication: false }">
|
<div x-data="{ deleteApplication: false }">
|
||||||
<x-naked-modal show="deleteApplication" />
|
<x-naked-modal show="deleteApplication" />
|
||||||
@if ($application->status === 'running')
|
@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='forceRebuild'>Force Rebuild</x-inputs.button>
|
||||||
<x-inputs.button wire:click='stop'>Stop</x-inputs.button>
|
<x-inputs.button wire:click='stop'>Stop</x-inputs.button>
|
||||||
@else
|
@else
|
||||||
|
@ -23,7 +23,7 @@ function sync-bunny {
|
|||||||
php artisan sync:bunny --env=secrets
|
php artisan sync:bunny --env=secrets
|
||||||
}
|
}
|
||||||
function queue {
|
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 {
|
function schedule {
|
||||||
bash vendor/bin/spin exec -u webuser coolify php artisan schedule:work
|
bash vendor/bin/spin exec -u webuser coolify php artisan schedule:work
|
||||||
@ -39,7 +39,7 @@ function mfs {
|
|||||||
}
|
}
|
||||||
function reset-db-production {
|
function reset-db-production {
|
||||||
bash vendor/bin/spin exec -u webuser coolify php artisan migrate:fresh --force --seed --seeder=ProductionSeeder ||
|
bash vendor/bin/spin exec -u webuser coolify php artisan migrate:fresh --force --seed --seeder=ProductionSeeder ||
|
||||||
php artisan migrate:fresh --force --seed --seeder=ProductionSeeder
|
php artisan migrate:fresh --force --seed --seeder=ProductionSeeder
|
||||||
}
|
}
|
||||||
function coolify {
|
function coolify {
|
||||||
bash vendor/bin/spin exec -u webuser coolify bash
|
bash vendor/bin/spin exec -u webuser coolify bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user