Merge branch 'next' into services
This commit is contained in:
commit
01bffc4fd1
13 changed files with 187 additions and 153 deletions
|
|
@ -495,12 +495,7 @@ private function upload_to_s3(): void
|
||||||
} else {
|
} else {
|
||||||
$commands[] = "docker run -d --network {$network} --name backup-of-{$this->backup->uuid} --rm -v $this->backup_location:$this->backup_location:ro {$fullImageName}";
|
$commands[] = "docker run -d --network {$network} --name backup-of-{$this->backup->uuid} --rm -v $this->backup_location:$this->backup_location:ro {$fullImageName}";
|
||||||
}
|
}
|
||||||
if ($this->s3->isHetzner()) {
|
$commands[] = "docker exec backup-of-{$this->backup->uuid} mc config host add temporary {$endpoint} $key $secret";
|
||||||
$endpointWithoutBucket = 'https://'.str($endpoint)->after('https://')->after('.')->value();
|
|
||||||
$commands[] = "docker exec backup-of-{$this->backup->uuid} mc alias set --path=off --api=S3v4 temporary {$endpointWithoutBucket} $key $secret";
|
|
||||||
} else {
|
|
||||||
$commands[] = "docker exec backup-of-{$this->backup->uuid} mc config host add temporary {$endpoint} $key $secret";
|
|
||||||
}
|
|
||||||
$commands[] = "docker exec backup-of-{$this->backup->uuid} mc cp $this->backup_location temporary/$bucket{$this->backup_dir}/";
|
$commands[] = "docker exec backup-of-{$this->backup->uuid} mc cp $this->backup_location temporary/$bucket{$this->backup_dir}/";
|
||||||
instant_remote_process($commands, $this->server);
|
instant_remote_process($commands, $this->server);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,9 @@ public function instantSave()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($this->application->settings->is_container_label_readonly_enabled) {
|
||||||
|
$this->resetDefaultLabels(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadComposeFile($isInit = false)
|
public function loadComposeFile($isInit = false)
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public function submit()
|
||||||
$server->ip = $this->ssh_domain;
|
$server->ip = $this->ssh_domain;
|
||||||
$server->save();
|
$server->save();
|
||||||
$server->settings->save();
|
$server->settings->save();
|
||||||
$this->dispatch('warning', 'Cloudflare Tunnels configuration started.');
|
$this->dispatch('info', 'Cloudflare Tunnels configuration started.');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Livewire\Storage;
|
namespace App\Livewire\Storage;
|
||||||
|
|
||||||
use App\Models\S3Storage;
|
use App\Models\S3Storage;
|
||||||
|
use Illuminate\Support\Uri;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
class Create extends Component
|
class Create extends Component
|
||||||
|
|
@ -45,15 +46,24 @@ class Create extends Component
|
||||||
|
|
||||||
public function updatedEndpoint($value)
|
public function updatedEndpoint($value)
|
||||||
{
|
{
|
||||||
if (! str($value)->startsWith('https://') && ! str($value)->startsWith('http://')) {
|
try {
|
||||||
$this->endpoint = 'https://'.$value;
|
if (empty($value)) {
|
||||||
$value = $this->endpoint;
|
return;
|
||||||
}
|
}
|
||||||
|
if (str($value)->contains('digitaloceanspaces.com')) {
|
||||||
|
$uri = Uri::of($value);
|
||||||
|
$host = $uri->host();
|
||||||
|
|
||||||
if (str($value)->contains('your-objectstorage.com') && ! isset($this->bucket)) {
|
if (preg_match('/^(.+)\.([^.]+\.digitaloceanspaces\.com)$/', $host, $matches)) {
|
||||||
$this->bucket = str($value)->after('//')->before('.');
|
$host = $matches[2];
|
||||||
} elseif (str($value)->contains('your-objectstorage.com')) {
|
$value = "https://{$host}";
|
||||||
$this->bucket = $this->bucket ?: str($value)->after('//')->before('.');
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (! str($value)->startsWith('https://') && ! str($value)->startsWith('http://')) {
|
||||||
|
$value = 'https://'.$value;
|
||||||
|
}
|
||||||
|
$this->endpoint = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,16 +40,6 @@ public function awsUrl()
|
||||||
return "{$this->endpoint}/{$this->bucket}";
|
return "{$this->endpoint}/{$this->bucket}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isHetzner()
|
|
||||||
{
|
|
||||||
return str($this->endpoint)->contains('your-objectstorage.com');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function isDigitalOcean()
|
|
||||||
{
|
|
||||||
return str($this->endpoint)->contains('digitaloceanspaces.com');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testConnection(bool $shouldSave = false)
|
public function testConnection(bool $shouldSave = false)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,6 @@ function deleteBackupsS3(string|array|null $filenames, S3Storage $s3): void
|
||||||
'bucket' => $s3->bucket,
|
'bucket' => $s3->bucket,
|
||||||
'endpoint' => $s3->endpoint,
|
'endpoint' => $s3->endpoint,
|
||||||
'use_path_style_endpoint' => true,
|
'use_path_style_endpoint' => true,
|
||||||
'bucket_endpoint' => $s3->isHetzner() || $s3->isDigitalOcean(),
|
|
||||||
'aws_url' => $s3->awsUrl(),
|
'aws_url' => $s3->awsUrl(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
function set_s3_target(S3Storage $s3)
|
function set_s3_target(S3Storage $s3)
|
||||||
{
|
{
|
||||||
$is_digital_ocean = false;
|
|
||||||
|
|
||||||
config()->set('filesystems.disks.custom-s3', [
|
config()->set('filesystems.disks.custom-s3', [
|
||||||
'driver' => 's3',
|
'driver' => 's3',
|
||||||
'region' => $s3['region'],
|
'region' => $s3['region'],
|
||||||
|
|
@ -14,7 +12,6 @@ function set_s3_target(S3Storage $s3)
|
||||||
'bucket' => $s3['bucket'],
|
'bucket' => $s3['bucket'],
|
||||||
'endpoint' => $s3['endpoint'],
|
'endpoint' => $s3['endpoint'],
|
||||||
'use_path_style_endpoint' => true,
|
'use_path_style_endpoint' => true,
|
||||||
'bucket_endpoint' => $s3->isHetzner() || $s3->isDigitalOcean(),
|
|
||||||
'aws_url' => $s3->awsUrl(),
|
'aws_url' => $s3->awsUrl(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'coolify' => [
|
'coolify' => [
|
||||||
'version' => '4.0.0-beta.389',
|
'version' => '4.0.0-beta.390',
|
||||||
'helper_version' => '1.0.6',
|
'helper_version' => '1.0.6',
|
||||||
'realtime_version' => '1.0.5',
|
'realtime_version' => '1.0.5',
|
||||||
'self_hosted' => env('SELF_HOSTED', true),
|
'self_hosted' => env('SELF_HOSTED', true),
|
||||||
|
|
|
||||||
|
|
@ -71,27 +71,50 @@
|
||||||
@endif
|
@endif
|
||||||
@if ($application->build_pack !== 'dockercompose')
|
@if ($application->build_pack !== 'dockercompose')
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
|
@if ($application->settings->is_container_label_readonly_enabled == false)
|
||||||
<x-forms.input placeholder="https://coolify.io" wire:model.blur="application.fqdn" label="Domains"
|
<x-forms.input placeholder="https://coolify.io" wire:model.blur="application.fqdn"
|
||||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io,https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. " />
|
label="Domains" readonly
|
||||||
<x-forms.button wire:click="getWildcardDomain">Generate Domain
|
helper="Readonly labels are disabled. You can set the domains in the labels section." />
|
||||||
</x-forms.button>
|
@else
|
||||||
|
<x-forms.input placeholder="https://coolify.io" wire:model.blur="application.fqdn"
|
||||||
|
label="Domains"
|
||||||
|
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io,https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. " />
|
||||||
|
<x-forms.button wire:click="getWildcardDomain">Generate Domain
|
||||||
|
</x-forms.button>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<x-forms.select label="Direction" id="application.redirect" required
|
@if ($application->settings->is_container_label_readonly_enabled == false)
|
||||||
helper="You must need to add www and non-www as an A DNS record. Make sure the www domain is added under Domains.">
|
@if ($application->redirect === 'both')
|
||||||
<option value="both">Allow www & non-www.</option>
|
<x-forms.input label="Direction" value="Allow www & non-www." readonly
|
||||||
<option value="www">Redirect to www.</option>
|
helper="Readonly labels are disabled. You can set the direction in the labels section." />
|
||||||
<option value="non-www">Redirect to non-www.</option>
|
@elseif ($application->redirect === 'www')
|
||||||
</x-forms.select>
|
<x-forms.input label="Direction" value="Redirect to www." readonly
|
||||||
<x-modal-confirmation title="Confirm Redirection Setting?" buttonTitle="Set Direction"
|
helper="Readonly labels are disabled. You can set the direction in the labels section." />
|
||||||
submitAction="setRedirect" :actions="['All traffic will be redirected to the selected direction.']" confirmationText="{{ $application->fqdn . '/' }}"
|
@elseif ($application->redirect === 'non-www')
|
||||||
confirmationLabel="Please confirm the execution of the action by entering the Application URL below"
|
<x-forms.input label="Direction" value="Redirect to non-www." readonly
|
||||||
shortConfirmationLabel="Application URL" :confirmWithPassword="false" step2ButtonText="Set Direction">
|
helper="Readonly labels are disabled. You can set the direction in the labels section." />
|
||||||
<x-slot:customButton>
|
@endif
|
||||||
<div class="w-[7.2rem]">Set Direction</div>
|
@else
|
||||||
</x-slot:customButton>
|
<x-forms.select label="Direction" id="application.redirect" required
|
||||||
</x-modal-confirmation>
|
helper="You must need to add www and non-www as an A DNS record. Make sure the www domain is added under Domains.">
|
||||||
|
<option value="both">Allow www & non-www.</option>
|
||||||
|
<option value="www">Redirect to www.</option>
|
||||||
|
<option value="non-www">Redirect to non-www.</option>
|
||||||
|
</x-forms.select>
|
||||||
|
@if ($application->settings->is_container_label_readonly_enabled)
|
||||||
|
<x-modal-confirmation title="Confirm Redirection Setting?" buttonTitle="Set Direction"
|
||||||
|
submitAction="setRedirect" :actions="['All traffic will be redirected to the selected direction.']"
|
||||||
|
confirmationText="{{ $application->fqdn . '/' }}"
|
||||||
|
confirmationLabel="Please confirm the execution of the action by entering the Application URL below"
|
||||||
|
shortConfirmationLabel="Application URL" :confirmWithPassword="false"
|
||||||
|
step2ButtonText="Set Direction">
|
||||||
|
<x-slot:customButton>
|
||||||
|
<div class="w-[7.2rem]">Set Direction</div>
|
||||||
|
</x-slot:customButton>
|
||||||
|
</x-modal-confirmation>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
@ -285,7 +308,7 @@ class="underline" href="https://coolify.io/docs/knowledge-base/docker/registry"
|
||||||
helper="By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$.<br><br>If you want to use env variables inside the labels, turn this off."
|
helper="By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$.<br><br>If you want to use env variables inside the labels, turn this off."
|
||||||
id="application.settings.is_container_label_escape_enabled" instantSave></x-forms.checkbox>
|
id="application.settings.is_container_label_escape_enabled" instantSave></x-forms.checkbox>
|
||||||
{{-- <x-forms.checkbox label="Readonly labels"
|
{{-- <x-forms.checkbox label="Readonly labels"
|
||||||
helper="Labels are readonly by default. Readonly means that edits you do to the labels could be lost and Coolify will autogenrate the labels for you. If you want to edit the labels directly, disable this option. <br><br>Be careful, it could break the proxy configuration after you restart the container as Coolify will now NOT autogenrate the labels for you (ofc you can alway reset the labels to the coolify defaults manually)."
|
helper="Labels are readonly by default. Readonly means that edits you do to the labels could be lost and Coolify will autogenrate the labels for you. If you want to edit the labels directly, disable this option. <br><br>Be careful, it could break the proxy configuration after you restart the container as Coolify will now NOT autogenrate the labels for you (ofc you can always reset the labels to the coolify defaults manually)."
|
||||||
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox> --}}
|
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox> --}}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -299,9 +322,15 @@ class="underline" href="https://coolify.io/docs/knowledge-base/docker/registry"
|
||||||
@if ($application->settings->is_static || $application->build_pack === 'static')
|
@if ($application->settings->is_static || $application->build_pack === 'static')
|
||||||
<x-forms.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
<x-forms.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||||
@else
|
@else
|
||||||
<x-forms.input placeholder="3000,3001" id="application.ports_exposes" label="Ports Exposes"
|
@if ($application->settings->is_container_label_readonly_enabled === false)
|
||||||
required
|
<x-forms.input placeholder="3000,3001" id="application.ports_exposes"
|
||||||
helper="A comma separated list of ports your application uses. The first port will be used as default healthcheck port if nothing defined in the Healthcheck menu. Be sure to set this correctly." />
|
label="Ports Exposes" readonly
|
||||||
|
helper="Readonly labels are disabled. You can set the ports manually in the labels section." />
|
||||||
|
@else
|
||||||
|
<x-forms.input placeholder="3000,3001" id="application.ports_exposes"
|
||||||
|
label="Ports Exposes" required
|
||||||
|
helper="A comma separated list of ports your application uses. The first port will be used as default healthcheck port if nothing defined in the Healthcheck menu. Be sure to set this correctly." />
|
||||||
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@if (!$application->destination->server->isSwarm())
|
@if (!$application->destination->server->isSwarm())
|
||||||
<x-forms.input placeholder="3000:3000" id="application.ports_mappings" label="Ports Mappings"
|
<x-forms.input placeholder="3000:3000" id="application.ports_mappings" label="Ports Mappings"
|
||||||
|
|
@ -318,7 +347,7 @@ class="underline" href="https://coolify.io/docs/knowledge-base/docker/registry"
|
||||||
@endif
|
@endif
|
||||||
<div class="w-96">
|
<div class="w-96">
|
||||||
<x-forms.checkbox label="Readonly labels"
|
<x-forms.checkbox label="Readonly labels"
|
||||||
helper="Labels are readonly by default. Readonly means that edits you do to the labels could be lost and Coolify will autogenrate the labels for you. If you want to edit the labels directly, disable this option. <br><br>Be careful, it could break the proxy configuration after you restart the container as Coolify will now NOT autogenrate the labels for you (ofc you can alway reset the labels to the coolify defaults manually)."
|
helper="Labels are readonly by default. Readonly means that edits you do to the labels could be lost and Coolify will autogenrate the labels for you. If you want to edit the labels directly, disable this option. <br><br>Be careful, it could break the proxy configuration after you restart the container as Coolify will now NOT autogenrate the labels for you (ofc you can always reset the labels to the coolify defaults manually)."
|
||||||
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox>
|
id="application.settings.is_container_label_readonly_enabled" instantSave></x-forms.checkbox>
|
||||||
<x-forms.checkbox label="Escape special characters in labels?"
|
<x-forms.checkbox label="Escape special characters in labels?"
|
||||||
helper="By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$.<br><br>If you want to use env variables inside the labels, turn this off."
|
helper="By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$.<br><br>If you want to use env variables inside the labels, turn this off."
|
||||||
|
|
|
||||||
|
|
@ -34,72 +34,79 @@ class="{{ request()->routeIs('project.database.backup.index') ? 'dark:text-white
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
</nav>
|
</nav>
|
||||||
<div class="flex flex-wrap gap-2 items-center">
|
@if ($database->destination->server->isFunctional())
|
||||||
@if (!str($database->status)->startsWith('exited'))
|
<div class="flex flex-wrap gap-2 items-center">
|
||||||
<x-modal-confirmation title="Confirm Database Restart?" buttonTitle="Restart" submitAction="restart"
|
@if (!str($database->status)->startsWith('exited'))
|
||||||
:actions="[
|
<x-modal-confirmation title="Confirm Database Restart?" buttonTitle="Restart" submitAction="restart"
|
||||||
'This database will be unavailable during the restart.',
|
:actions="[
|
||||||
'If the database is currently in use data could be lost.',
|
'This database will be unavailable during the restart.',
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Restart Database"
|
'If the database is currently in use data could be lost.',
|
||||||
:dispatchEvent="true" dispatchEventType="restartEvent">
|
]" :confirmWithText="false" :confirmWithPassword="false" step2ButtonText="Restart Database"
|
||||||
<x-slot:button-title>
|
:dispatchEvent="true" dispatchEventType="restartEvent">
|
||||||
<svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
<x-slot:button-title>
|
||||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
<svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
stroke-width="2">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
|
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
||||||
<path d="M20 4v5h-5" />
|
stroke-width="2">
|
||||||
</g>
|
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
|
||||||
</svg>
|
<path d="M20 4v5h-5" />
|
||||||
Restart
|
</g>
|
||||||
</x-slot:button-title>
|
</svg>
|
||||||
</x-modal-confirmation>
|
Restart
|
||||||
<x-modal-confirmation title="Confirm Database Stopping?" buttonTitle="Stop" submitAction="stop"
|
</x-slot:button-title>
|
||||||
:checkboxes="$checkboxes" :actions="[
|
</x-modal-confirmation>
|
||||||
'This database will be stopped.',
|
<x-modal-confirmation title="Confirm Database Stopping?" buttonTitle="Stop" submitAction="stop"
|
||||||
'If the database is currently in use data could be lost.',
|
:checkboxes="$checkboxes" :actions="[
|
||||||
'All non-persistent data of this database (containers, networks, unused images) will be deleted (don\'t worry, no data is lost and you can start the database again).',
|
'This database will be stopped.',
|
||||||
]" :confirmWithText="false" :confirmWithPassword="false" step1ButtonText="Continue"
|
'If the database is currently in use data could be lost.',
|
||||||
step2ButtonText="Stop Database" :dispatchEvent="true" dispatchEventType="stopEvent">
|
'All non-persistent data of this database (containers, networks, unused images) will be deleted (don\'t worry, no data is lost and you can start the database again).',
|
||||||
<x-slot:button-title>
|
]" :confirmWithText="false" :confirmWithPassword="false"
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
|
step1ButtonText="Continue" step2ButtonText="Stop Database" :dispatchEvent="true"
|
||||||
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
dispatchEventType="stopEvent">
|
||||||
|
<x-slot:button-title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
|
||||||
|
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||||
|
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
|
||||||
|
</path>
|
||||||
|
<path
|
||||||
|
d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
|
||||||
|
</path>
|
||||||
|
</svg>
|
||||||
|
Stop
|
||||||
|
</x-slot:button-title>
|
||||||
|
</x-modal-confirmation>
|
||||||
|
@else
|
||||||
|
<button @click="$wire.dispatch('startEvent')" class="gap-2 button">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
||||||
|
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||||
stroke-linejoin="round">
|
stroke-linejoin="round">
|
||||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
|
<path d="M7 4v16l13 -8z" />
|
||||||
</path>
|
|
||||||
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
|
|
||||||
</path>
|
|
||||||
</svg>
|
</svg>
|
||||||
Stop
|
Start
|
||||||
</x-slot:button-title>
|
</button>
|
||||||
</x-modal-confirmation>
|
@endif
|
||||||
@else
|
@script
|
||||||
<button @click="$wire.dispatch('startEvent')" class="gap-2 button">
|
<script>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24"
|
$wire.$on('startEvent', () => {
|
||||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
window.dispatchEvent(new CustomEvent('startdatabase'));
|
||||||
stroke-linejoin="round">
|
$wire.$call('start');
|
||||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
});
|
||||||
<path d="M7 4v16l13 -8z" />
|
$wire.$on('stopEvent', () => {
|
||||||
</svg>
|
$wire.$dispatch('info', 'Stopping database.');
|
||||||
Start
|
$wire.$call('stop');
|
||||||
</button>
|
});
|
||||||
@endif
|
$wire.$on('restartEvent', () => {
|
||||||
@script
|
$wire.$dispatch('info', 'Restarting database.');
|
||||||
<script>
|
$wire.$call('restart');
|
||||||
$wire.$on('startEvent', () => {
|
});
|
||||||
window.dispatchEvent(new CustomEvent('startdatabase'));
|
</script>
|
||||||
$wire.$call('start');
|
@endscript
|
||||||
});
|
</div>
|
||||||
$wire.$on('stopEvent', () => {
|
@else
|
||||||
$wire.$dispatch('info', 'Stopping database.');
|
<div class="text-error">Underlying server is not functional.</div>
|
||||||
$wire.$call('stop');
|
@endif
|
||||||
});
|
|
||||||
$wire.$on('restartEvent', () => {
|
|
||||||
$wire.$dispatch('info', 'Restarting database.');
|
|
||||||
$wire.$call('restart');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endscript
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">Cancel
|
||||||
}, 5000)
|
}, 5000)
|
||||||
} else {
|
} else {
|
||||||
this.currentStatus =
|
this.currentStatus =
|
||||||
"Waiting for Coolify to come back from dead..."
|
"Waiting for Coolify to come back from the dead..."
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"coolify": {
|
"coolify": {
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.389"
|
"version": "4.0.0-beta.390"
|
||||||
},
|
},
|
||||||
"nightly": {
|
"nightly": {
|
||||||
"version": "4.0.0-beta.390"
|
"version": "4.0.0-beta.391"
|
||||||
},
|
},
|
||||||
"helper": {
|
"helper": {
|
||||||
"version": "1.0.6"
|
"version": "1.0.6"
|
||||||
|
|
|
||||||
|
|
@ -1,37 +1,41 @@
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig, loadEnv } from "vite";
|
||||||
import laravel from "laravel-vite-plugin";
|
import laravel from "laravel-vite-plugin";
|
||||||
import vue from "@vitejs/plugin-vue";
|
import vue from "@vitejs/plugin-vue";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ mode }) => {
|
||||||
server: {
|
const env = loadEnv(mode, process.cwd(), '')
|
||||||
watch: {
|
|
||||||
ignored: [
|
return {
|
||||||
"**/dev_*_data/**",
|
server: {
|
||||||
"**/storage/**",
|
watch: {
|
||||||
],
|
ignored: [
|
||||||
},
|
"**/dev_*_data/**",
|
||||||
host: "0.0.0.0",
|
"**/storage/**",
|
||||||
hmr: {
|
],
|
||||||
host: process.env.VITE_HOST,
|
},
|
||||||
},
|
host: "0.0.0.0",
|
||||||
},
|
hmr: {
|
||||||
plugins: [
|
host: env.VITE_HOST || '0.0.0.0'
|
||||||
laravel({
|
|
||||||
input: ["resources/css/app.css", "resources/js/app.js"],
|
|
||||||
refresh: true,
|
|
||||||
}),
|
|
||||||
vue({
|
|
||||||
template: {
|
|
||||||
transformAssetUrls: {
|
|
||||||
base: null,
|
|
||||||
includeAbsolute: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}),
|
|
||||||
],
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
vue: "vue/dist/vue.esm-bundler.js",
|
|
||||||
},
|
},
|
||||||
},
|
plugins: [
|
||||||
|
laravel({
|
||||||
|
input: ["resources/css/app.css", "resources/js/app.js"],
|
||||||
|
refresh: true,
|
||||||
|
}),
|
||||||
|
vue({
|
||||||
|
template: {
|
||||||
|
transformAssetUrls: {
|
||||||
|
base: null,
|
||||||
|
includeAbsolute: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
vue: "vue/dist/vue.esm-bundler.js",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue