Skip to content

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.

wip

Andras Bacsai28cf89627dfe
diff --git a/app/Actions/Proxy/InstallProxy.php b/app/Actions/Proxy/InstallProxy.php
index 090a849907..4607275141 100644
--- a/app/Actions/Proxy/InstallProxy.php
+++ b/app/Actions/Proxy/InstallProxy.php
@@ -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 @@ class InstallProxy
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' => '',
];
diff --git a/app/Jobs/DeployApplicationJob.php b/app/Jobs/DeployApplicationJob.php
index 71c965fac3..1b8dce6125 100644
--- a/app/Jobs/DeployApplicationJob.php
+++ b/app/Jobs/DeployApplicationJob.php
@@ -13,6 +13,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
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 @@ COPY --from={$this->application->uuid}:{$this->git_commit}-build /app/{$this->ap
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;
}
diff --git a/resources/views/livewire/project/application/deploy.blade.php b/resources/views/livewire/project/application/deploy.blade.php
index fcb0ca71bf..d2e2cec6db 100644
--- a/resources/views/livewire/project/application/deploy.blade.php
+++ b/resources/views/livewire/project/application/deploy.blade.php
@@ -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
diff --git a/scripts/run b/scripts/run
index f08d133bcb..44fe4ca7d6 100755
--- a/scripts/run
+++ b/scripts/run
@@ -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
@@ -39,7 +39,7 @@ function mfs {
}
function reset-db-production {
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 {
bash vendor/bin/spin exec -u webuser coolify bash