mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-05 12:34:11 +00:00
Compare commits
36 Commits
v4.0.0-bet
...
v4.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56be0744f0 | ||
|
|
d874c71e0b | ||
|
|
0452a4e1ac | ||
|
|
959a03214a | ||
|
|
fe22dfc531 | ||
|
|
139e258664 | ||
|
|
d1ab14966b | ||
|
|
75d77a3648 | ||
|
|
17e81ab6bd | ||
|
|
70e1ec2cd2 | ||
|
|
c6a7fd405b | ||
|
|
4f0d1704c4 | ||
|
|
a966a5097e | ||
|
|
080db4d462 | ||
|
|
4af766162e | ||
|
|
57d67bc4a8 | ||
|
|
16278f36ec | ||
|
|
05c6d67cab | ||
|
|
0c516843d8 | ||
|
|
d400ac57d5 | ||
|
|
2644efd9f7 | ||
|
|
11baa97ef6 | ||
|
|
c36636bd2d | ||
|
|
6bb05a6780 | ||
|
|
360f5db2cf | ||
|
|
bbbeacee4d | ||
|
|
94ad56fc96 | ||
|
|
3df80f2653 | ||
|
|
bb6c9cf49e | ||
|
|
ae12222687 | ||
|
|
e4aa3d310f | ||
|
|
8551e6e74a | ||
|
|
3582cb3f46 | ||
|
|
23de13b82c | ||
|
|
93acd4f18f | ||
|
|
c4dfd99a8c |
@@ -83,7 +83,7 @@ class Kernel extends ConsoleKernel
|
|||||||
}
|
}
|
||||||
private function instance_auto_update($schedule)
|
private function instance_auto_update($schedule)
|
||||||
{
|
{
|
||||||
if (isDev()) {
|
if (isDev() || isCloud()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$settings = InstanceSettings::get();
|
$settings = InstanceSettings::get();
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
private ?string $buildTarget = null;
|
private ?string $buildTarget = null;
|
||||||
private Collection $saved_outputs;
|
private Collection $saved_outputs;
|
||||||
private ?string $full_healthcheck_url = null;
|
private ?string $full_healthcheck_url = null;
|
||||||
private bool $custom_healthcheck_found = false;
|
|
||||||
|
|
||||||
private string $serverUser = 'root';
|
private string $serverUser = 'root';
|
||||||
private string $serverUserHomeDir = '/root';
|
private string $serverUserHomeDir = '/root';
|
||||||
@@ -903,10 +902,13 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if ($this->server->isSwarm()) {
|
if ($this->server->isSwarm()) {
|
||||||
// Implement healthcheck for swarm
|
// Implement healthcheck for swarm
|
||||||
} else {
|
} else {
|
||||||
if ($this->application->isHealthcheckDisabled() && $this->custom_healthcheck_found === false) {
|
if ($this->application->isHealthcheckDisabled() && $this->application->custom_healthcheck_found === false) {
|
||||||
$this->newVersionIsHealthy = true;
|
$this->newVersionIsHealthy = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($this->application->custom_healthcheck_found) {
|
||||||
|
$this->application_deployment_queue->addLogEntry("Custom healthcheck found, skipping default healthcheck.");
|
||||||
|
}
|
||||||
// ray('New container name: ', $this->container_name);
|
// ray('New container name: ', $this->container_name);
|
||||||
if ($this->container_name) {
|
if ($this->container_name) {
|
||||||
$counter = 1;
|
$counter = 1;
|
||||||
@@ -914,6 +916,12 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if ($this->full_healthcheck_url) {
|
if ($this->full_healthcheck_url) {
|
||||||
$this->application_deployment_queue->addLogEntry("Healthcheck URL (inside the container): {$this->full_healthcheck_url}");
|
$this->application_deployment_queue->addLogEntry("Healthcheck URL (inside the container): {$this->full_healthcheck_url}");
|
||||||
}
|
}
|
||||||
|
$this->application_deployment_queue->addLogEntry("Waiting for the start period ({$this->application->health_check_start_period} seconds) before starting healthcheck.");
|
||||||
|
$sleeptime = 0;
|
||||||
|
while ($sleeptime < $this->application->health_check_start_period) {
|
||||||
|
Sleep::for(1)->seconds();
|
||||||
|
$sleeptime++;
|
||||||
|
}
|
||||||
while ($counter <= $this->application->health_check_retries) {
|
while ($counter <= $this->application->health_check_retries) {
|
||||||
$this->execute_remote_command(
|
$this->execute_remote_command(
|
||||||
[
|
[
|
||||||
@@ -936,7 +944,11 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$counter++;
|
$counter++;
|
||||||
Sleep::for($this->application->health_check_interval)->seconds();
|
$sleeptime = 0;
|
||||||
|
while ($sleeptime < $this->application->health_check_interval) {
|
||||||
|
Sleep::for(1)->seconds();
|
||||||
|
$sleeptime++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1262,16 +1274,14 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
return escapeDollarSign($value);
|
return escapeDollarSign($value);
|
||||||
});
|
});
|
||||||
$labels = $labels->merge(defaultLabels($this->application->id, $this->application->uuid, $this->pull_request_id))->toArray();
|
$labels = $labels->merge(defaultLabels($this->application->id, $this->application->uuid, $this->pull_request_id))->toArray();
|
||||||
|
|
||||||
// Check for custom HEALTHCHECK
|
// Check for custom HEALTHCHECK
|
||||||
$this->custom_healthcheck_found = false;
|
|
||||||
if ($this->application->build_pack === 'dockerfile' || $this->application->dockerfile) {
|
if ($this->application->build_pack === 'dockerfile' || $this->application->dockerfile) {
|
||||||
$this->execute_remote_command([
|
$this->execute_remote_command([
|
||||||
executeInDocker($this->deployment_uuid, "cat {$this->workdir}{$this->dockerfile_location}"), "hidden" => true, "save" => 'dockerfile_from_repo', "ignore_errors" => true
|
executeInDocker($this->deployment_uuid, "cat {$this->workdir}{$this->dockerfile_location}"), "hidden" => true, "save" => 'dockerfile_from_repo', "ignore_errors" => true
|
||||||
]);
|
]);
|
||||||
$dockerfile = collect(Str::of($this->saved_outputs->get('dockerfile_from_repo'))->trim()->explode("\n"));
|
$dockerfile = collect(Str::of($this->saved_outputs->get('dockerfile_from_repo'))->trim()->explode("\n"));
|
||||||
if (str($dockerfile)->contains('HEALTHCHECK')) {
|
$this->application->parseHealthcheckFromDockerfile($dockerfile);
|
||||||
$this->custom_healthcheck_found = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$docker_compose = [
|
$docker_compose = [
|
||||||
'version' => '3.8',
|
'version' => '3.8',
|
||||||
@@ -1317,18 +1327,17 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if (!is_null($this->env_filename)) {
|
if (!is_null($this->env_filename)) {
|
||||||
$docker_compose['services'][$this->container_name]['env_file'] = [$this->env_filename];
|
$docker_compose['services'][$this->container_name]['env_file'] = [$this->env_filename];
|
||||||
}
|
}
|
||||||
if (!$this->custom_healthcheck_found) {
|
$docker_compose['services'][$this->container_name]['healthcheck'] = [
|
||||||
$docker_compose['services'][$this->container_name]['healthcheck'] = [
|
'test' => [
|
||||||
'test' => [
|
'CMD-SHELL',
|
||||||
'CMD-SHELL',
|
$this->generate_healthcheck_commands()
|
||||||
$this->generate_healthcheck_commands()
|
],
|
||||||
],
|
'interval' => $this->application->health_check_interval . 's',
|
||||||
'interval' => $this->application->health_check_interval . 's',
|
'timeout' => $this->application->health_check_timeout . 's',
|
||||||
'timeout' => $this->application->health_check_timeout . 's',
|
'retries' => $this->application->health_check_retries,
|
||||||
'retries' => $this->application->health_check_retries,
|
'start_period' => $this->application->health_check_start_period . 's'
|
||||||
'start_period' => $this->application->health_check_start_period . 's'
|
];
|
||||||
];
|
|
||||||
}
|
|
||||||
if (!is_null($this->application->limits_cpuset)) {
|
if (!is_null($this->application->limits_cpuset)) {
|
||||||
data_set($docker_compose, 'services.' . $this->container_name . '.cpuset', $this->application->limits_cpuset);
|
data_set($docker_compose, 'services.' . $this->container_name . '.cpuset', $this->application->limits_cpuset);
|
||||||
}
|
}
|
||||||
@@ -1595,10 +1604,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
|
|
||||||
private function generate_healthcheck_commands()
|
private function generate_healthcheck_commands()
|
||||||
{
|
{
|
||||||
if ($this->application->dockerfile || $this->application->build_pack === 'dockerfile' || $this->application->build_pack === 'dockerimage') {
|
// if ($this->application->dockerfile || $this->application->build_pack === 'dockerfile' || $this->application->build_pack === 'dockerimage') {
|
||||||
// TODO: disabled HC because there are several ways to hc a simple docker image, hard to figure out a good way. Like some docker images (pocketbase) does not have curl.
|
// // TODO: disabled HC because there are several ways to hc a simple docker image, hard to figure out a good way. Like some docker images (pocketbase) does not have curl.
|
||||||
return 'exit 0';
|
// return 'exit 0';
|
||||||
}
|
// }
|
||||||
if (!$this->application->health_check_port) {
|
if (!$this->application->health_check_port) {
|
||||||
$health_check_port = $this->application->ports_exposes_array[0];
|
$health_check_port = $this->application->ports_exposes_array[0];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if ($this->backup->save_s3) {
|
if ($this->backup->save_s3) {
|
||||||
$this->upload_to_s3();
|
$this->upload_to_s3();
|
||||||
}
|
}
|
||||||
$this->team?->notify(new BackupSuccess($this->backup, $this->database));
|
$this->team?->notify(new BackupSuccess($this->backup, $this->database, $database));
|
||||||
$this->backup_log->update([
|
$this->backup_log->update([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'message' => $this->backup_output,
|
'message' => $this->backup_output,
|
||||||
@@ -305,8 +305,7 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
send_internal_notification('DatabaseBackupJob failed with: ' . $e->getMessage());
|
send_internal_notification('DatabaseBackupJob failed with: ' . $e->getMessage());
|
||||||
$this->team?->notify(new BackupFailed($this->backup, $this->database, $this->backup_output));
|
$this->team?->notify(new BackupFailed($this->backup, $this->database, $this->backup_output, $database));
|
||||||
throw $e;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
@@ -319,10 +318,15 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
private function backup_standalone_mongodb(string $databaseWithCollections): void
|
private function backup_standalone_mongodb(string $databaseWithCollections): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
ray($this->database->toArray());
|
||||||
$url = $this->database->get_db_url(useInternal: true);
|
$url = $this->database->get_db_url(useInternal: true);
|
||||||
if ($databaseWithCollections === 'all') {
|
if ($databaseWithCollections === 'all') {
|
||||||
$commands[] = "mkdir -p " . $this->backup_dir;
|
$commands[] = "mkdir -p " . $this->backup_dir;
|
||||||
$commands[] = "docker exec $this->container_name mongodump --authenticationDatabase=admin --uri=$url --gzip --archive > $this->backup_location";
|
if (str($this->database->image)->startsWith('mongo:4.0')) {
|
||||||
|
$commands[] = "docker exec $this->container_name mongodump --uri=$url --gzip --archive > $this->backup_location";
|
||||||
|
} else {
|
||||||
|
$commands[] = "docker exec $this->container_name mongodump --authenticationDatabase=admin --uri=$url --gzip --archive > $this->backup_location";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (str($databaseWithCollections)->contains(':')) {
|
if (str($databaseWithCollections)->contains(':')) {
|
||||||
$databaseName = str($databaseWithCollections)->before(':');
|
$databaseName = str($databaseWithCollections)->before(':');
|
||||||
@@ -333,9 +337,17 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
$commands[] = "mkdir -p " . $this->backup_dir;
|
$commands[] = "mkdir -p " . $this->backup_dir;
|
||||||
if ($collectionsToExclude->count() === 0) {
|
if ($collectionsToExclude->count() === 0) {
|
||||||
$commands[] = "docker exec $this->container_name mongodump --authenticationDatabase=admin --uri=$url --db $databaseName --gzip --archive > $this->backup_location";
|
if (str($this->database->image)->startsWith('mongo:4.0')) {
|
||||||
|
$commands[] = "docker exec $this->container_name mongodump --uri=$url --gzip --archive > $this->backup_location";
|
||||||
|
} else {
|
||||||
|
$commands[] = "docker exec $this->container_name mongodump --authenticationDatabase=admin --uri=$url --db $databaseName --gzip --archive > $this->backup_location";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$commands[] = "docker exec $this->container_name mongodump --authenticationDatabase=admin --uri=$url --db $databaseName --gzip --excludeCollection " . $collectionsToExclude->implode(' --excludeCollection ') . " --archive > $this->backup_location";
|
if (str($this->database->image)->startsWith('mongo:4.0')) {
|
||||||
|
$commands[] = "docker exec $this->container_name mongodump --uri=$url --gzip --excludeCollection " . $collectionsToExclude->implode(' --excludeCollection ') . " --archive > $this->backup_location";
|
||||||
|
} else {
|
||||||
|
$commands[] = "docker exec $this->container_name mongodump --authenticationDatabase=admin --uri=$url --db $databaseName --gzip --excludeCollection " . $collectionsToExclude->implode(' --excludeCollection ') . " --archive > $this->backup_location";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->backup_output = instant_remote_process($commands, $this->server);
|
$this->backup_output = instant_remote_process($commands, $this->server);
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique, ShouldBeEncr
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
public $timeout = 120;
|
public $timeout = 600;
|
||||||
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(private bool $force = false)
|
public function __construct(private bool $force = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,11 +20,12 @@ class SendMessageToDiscordJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $tries = 5;
|
public $tries = 5;
|
||||||
|
public $backoff = 10;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum number of unhandled exceptions to allow before failing.
|
* The maximum number of unhandled exceptions to allow before failing.
|
||||||
*/
|
*/
|
||||||
public int $maxExceptions = 3;
|
public int $maxExceptions = 5;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $text,
|
public string $text,
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class SendMessageToTelegramJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$payload = [
|
$payload = [
|
||||||
'parse_mode' => 'markdown',
|
// 'parse_mode' => 'markdown',
|
||||||
'reply_markup' => json_encode([
|
'reply_markup' => json_encode([
|
||||||
'inline_keyboard' => [
|
'inline_keyboard' => [
|
||||||
[...$inlineButtons],
|
[...$inlineButtons],
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ class General extends Component
|
|||||||
$this->dispatch('success', 'Docker compose file loaded.');
|
$this->dispatch('success', 'Docker compose file loaded.');
|
||||||
$this->dispatch('compose_loaded');
|
$this->dispatch('compose_loaded');
|
||||||
$this->dispatch('refresh_storages');
|
$this->dispatch('refresh_storages');
|
||||||
|
$this->dispatch('refreshEnvs');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->application->docker_compose_location = $this->initialDockerComposeLocation;
|
$this->application->docker_compose_location = $this->initialDockerComposeLocation;
|
||||||
$this->application->docker_compose_pr_location = $this->initialDockerComposePrLocation;
|
$this->application->docker_compose_pr_location = $this->initialDockerComposePrLocation;
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ class Heading extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($showNotification) $this->dispatch('success', "Success", "Application status updated.");
|
if ($showNotification) $this->dispatch('success', "Success", "Application status updated.");
|
||||||
$this->dispatch('configurationChanged');
|
// Removed because it caused flickering
|
||||||
|
// $this->dispatch('configurationChanged');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function force_deploy_without_cache()
|
public function force_deploy_without_cache()
|
||||||
|
|||||||
@@ -35,11 +35,6 @@ class Execution extends Component
|
|||||||
$this->executions = $executions;
|
$this->executions = $executions;
|
||||||
$this->s3s = currentTeam()->s3s;
|
$this->s3s = currentTeam()->s3s;
|
||||||
}
|
}
|
||||||
public function cleanupFailed()
|
|
||||||
{
|
|
||||||
$this->backup->executions()->where('status', 'failed')->delete();
|
|
||||||
$this->dispatch('refreshBackupExecutions');
|
|
||||||
}
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return view('livewire.project.database.backup.execution');
|
return view('livewire.project.database.backup.execution');
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Livewire\Project\Database;
|
namespace App\Livewire\Project\Database;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
|
||||||
|
|
||||||
class BackupExecutions extends Component
|
class BackupExecutions extends Component
|
||||||
{
|
{
|
||||||
@@ -16,11 +14,15 @@ class BackupExecutions extends Component
|
|||||||
$userId = auth()->user()->id;
|
$userId = auth()->user()->id;
|
||||||
return [
|
return [
|
||||||
"echo-private:team.{$userId},BackupCreated" => 'refreshBackupExecutions',
|
"echo-private:team.{$userId},BackupCreated" => 'refreshBackupExecutions',
|
||||||
"refreshBackupExecutions",
|
|
||||||
"deleteBackup"
|
"deleteBackup"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function cleanupFailed()
|
||||||
|
{
|
||||||
|
$this->backup->executions()->where('status', 'failed')->delete();
|
||||||
|
$this->refreshBackupExecutions();
|
||||||
|
}
|
||||||
public function deleteBackup($exeuctionId)
|
public function deleteBackup($exeuctionId)
|
||||||
{
|
{
|
||||||
$execution = $this->backup->executions()->where('id', $exeuctionId)->first();
|
$execution = $this->backup->executions()->where('id', $exeuctionId)->first();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class Import extends Component
|
|||||||
public string $postgresqlRestoreCommand = 'pg_restore -U $POSTGRES_USER -d $POSTGRES_DB';
|
public string $postgresqlRestoreCommand = 'pg_restore -U $POSTGRES_USER -d $POSTGRES_DB';
|
||||||
public string $mysqlRestoreCommand = 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE';
|
public string $mysqlRestoreCommand = 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE';
|
||||||
public string $mariadbRestoreCommand = 'mariadb -u $MARIADB_USER -p$MARIADB_PASSWORD $MARIADB_DATABASE';
|
public string $mariadbRestoreCommand = 'mariadb -u $MARIADB_USER -p$MARIADB_PASSWORD $MARIADB_DATABASE';
|
||||||
|
public string $mongodbRestoreCommand = 'mongorestore --authenticationDatabase=admin --username $MONGO_INITDB_ROOT_USERNAME --password $MONGO_INITDB_ROOT_PASSWORD --uri mongodb://localhost:27017 --gzip --archive=';
|
||||||
|
|
||||||
public function getListeners()
|
public function getListeners()
|
||||||
{
|
{
|
||||||
@@ -62,8 +63,7 @@ class Import extends Component
|
|||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneRedis' ||
|
$this->resource->getMorphClass() == 'App\Models\StandaloneRedis' ||
|
||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneKeydb' ||
|
$this->resource->getMorphClass() == 'App\Models\StandaloneKeydb' ||
|
||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneDragonfly' ||
|
$this->resource->getMorphClass() == 'App\Models\StandaloneDragonfly' ||
|
||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneClickhouse' ||
|
$this->resource->getMorphClass() == 'App\Models\StandaloneClickhouse'
|
||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneMongodb'
|
|
||||||
) {
|
) {
|
||||||
$this->unsupported = true;
|
$this->unsupported = true;
|
||||||
}
|
}
|
||||||
@@ -101,6 +101,10 @@ class Import extends Component
|
|||||||
$this->importCommands[] = "docker exec {$this->container} sh -c '{$this->postgresqlRestoreCommand} {$tmpPath}'";
|
$this->importCommands[] = "docker exec {$this->container} sh -c '{$this->postgresqlRestoreCommand} {$tmpPath}'";
|
||||||
$this->importCommands[] = "rm {$tmpPath}";
|
$this->importCommands[] = "rm {$tmpPath}";
|
||||||
break;
|
break;
|
||||||
|
case 'App\Models\StandaloneMongodb':
|
||||||
|
$this->importCommands[] = "docker exec {$this->container} sh -c '{$this->mongodbRestoreCommand}{$tmpPath}'";
|
||||||
|
$this->importCommands[] = "rm {$tmpPath}";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->importCommands[] = "docker exec {$this->container} sh -c 'rm {$tmpPath}'";
|
$this->importCommands[] = "docker exec {$this->container} sh -c 'rm {$tmpPath}'";
|
||||||
|
|||||||
@@ -94,6 +94,17 @@ class PublicGitRepository extends Component
|
|||||||
$repository = str($this->repository_url)->after(':')->before('.git');
|
$repository = str($this->repository_url)->after(':')->before('.git');
|
||||||
$this->repository_url = 'https://' . str($github_instance) . '/' . $repository;
|
$this->repository_url = 'https://' . str($github_instance) . '/' . $repository;
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
(str($this->repository_url)->startsWith('https://') ||
|
||||||
|
str($this->repository_url)->startsWith('http://')) &&
|
||||||
|
!str($this->repository_url)->endsWith('.git') &&
|
||||||
|
!str($this->repository_url)->contains('github.com')
|
||||||
|
) {
|
||||||
|
$this->repository_url = $this->repository_url . '.git';
|
||||||
|
}
|
||||||
|
if (str($this->repository_url)->contains('github.com')) {
|
||||||
|
$this->repository_url = str($this->repository_url)->before('.git')->value();
|
||||||
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@@ -170,7 +181,6 @@ class PublicGitRepository extends Component
|
|||||||
'name' => generate_random_name(),
|
'name' => generate_random_name(),
|
||||||
'git_repository' => $this->git_repository,
|
'git_repository' => $this->git_repository,
|
||||||
'git_branch' => $this->git_branch,
|
'git_branch' => $this->git_branch,
|
||||||
'build_pack' => 'nixpacks',
|
|
||||||
'ports_exposes' => $this->port,
|
'ports_exposes' => $this->port,
|
||||||
'publish_directory' => $this->publish_directory,
|
'publish_directory' => $this->publish_directory,
|
||||||
'environment_id' => $environment->id,
|
'environment_id' => $environment->id,
|
||||||
@@ -183,7 +193,6 @@ class PublicGitRepository extends Component
|
|||||||
'name' => generate_application_name($this->git_repository, $this->git_branch),
|
'name' => generate_application_name($this->git_repository, $this->git_branch),
|
||||||
'git_repository' => $this->git_repository,
|
'git_repository' => $this->git_repository,
|
||||||
'git_branch' => $this->git_branch,
|
'git_branch' => $this->git_branch,
|
||||||
'build_pack' => 'nixpacks',
|
|
||||||
'ports_exposes' => $this->port,
|
'ports_exposes' => $this->port,
|
||||||
'publish_directory' => $this->publish_directory,
|
'publish_directory' => $this->publish_directory,
|
||||||
'environment_id' => $environment->id,
|
'environment_id' => $environment->id,
|
||||||
@@ -195,7 +204,6 @@ class PublicGitRepository extends Component
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$application = Application::create($application_init);
|
$application = Application::create($application_init);
|
||||||
|
|
||||||
$application->settings->is_static = $this->is_static;
|
$application->settings->is_static = $this->is_static;
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ CMD ["nginx", "-g", "daemon off;"]
|
|||||||
'fqdn' => $fqdn
|
'fqdn' => $fqdn
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$application->parseHealthcheckFromDockerfile(dockerfile: collect(str($this->dockerfile)->trim()->explode("\n")), isInit: true);
|
||||||
|
|
||||||
return redirect()->route('project.application.configuration', [
|
return redirect()->route('project.application.configuration', [
|
||||||
'application_uuid' => $application->uuid,
|
'application_uuid' => $application->uuid,
|
||||||
'environment_name' => $environment->name,
|
'environment_name' => $environment->name,
|
||||||
|
|||||||
@@ -91,15 +91,35 @@ class GetLogs extends Component
|
|||||||
if ($this->container) {
|
if ($this->container) {
|
||||||
if ($this->showTimeStamps) {
|
if ($this->showTimeStamps) {
|
||||||
if ($this->server->isSwarm()) {
|
if ($this->server->isSwarm()) {
|
||||||
$sshCommand = generateSshCommand($this->server, "docker service logs -n {$this->numberOfLines} -t {$this->container}");
|
$command = "docker service logs -n {$this->numberOfLines} -t {$this->container}";
|
||||||
|
if ($this->server->isNonRoot()) {
|
||||||
|
$command = parseCommandsByLineForSudo(collect($command), $this->server);
|
||||||
|
$command = $command[0];
|
||||||
|
}
|
||||||
|
$sshCommand = generateSshCommand($this->server, $command);
|
||||||
} else {
|
} else {
|
||||||
$sshCommand = generateSshCommand($this->server, "docker logs -n {$this->numberOfLines} -t {$this->container}");
|
$command = "docker logs -n {$this->numberOfLines} -t {$this->container}";
|
||||||
|
if ($this->server->isNonRoot()) {
|
||||||
|
$command = parseCommandsByLineForSudo(collect($command), $this->server);
|
||||||
|
$command = $command[0];
|
||||||
|
}
|
||||||
|
$sshCommand = generateSshCommand($this->server, $command);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($this->server->isSwarm()) {
|
if ($this->server->isSwarm()) {
|
||||||
$sshCommand = generateSshCommand($this->server, "docker service logs -n {$this->numberOfLines} {$this->container}");
|
$command = "docker service logs -n {$this->numberOfLines} {$this->container}";
|
||||||
|
if ($this->server->isNonRoot()) {
|
||||||
|
$command = parseCommandsByLineForSudo(collect($command), $this->server);
|
||||||
|
$command = $command[0];
|
||||||
|
}
|
||||||
|
$sshCommand = generateSshCommand($this->server, $command);
|
||||||
} else {
|
} else {
|
||||||
$sshCommand = generateSshCommand($this->server, "docker logs -n {$this->numberOfLines} {$this->container}");
|
$command = "docker logs -n {$this->numberOfLines} {$this->container}";
|
||||||
|
if ($this->server->isNonRoot()) {
|
||||||
|
$command = parseCommandsByLineForSudo(collect($command), $this->server);
|
||||||
|
$command = $command[0];
|
||||||
|
}
|
||||||
|
$sshCommand = generateSshCommand($this->server, $command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($refresh) {
|
if ($refresh) {
|
||||||
|
|||||||
@@ -17,18 +17,17 @@ class HealthChecks extends Component
|
|||||||
'resource.health_check_return_code' => 'integer',
|
'resource.health_check_return_code' => 'integer',
|
||||||
'resource.health_check_scheme' => 'string',
|
'resource.health_check_scheme' => 'string',
|
||||||
'resource.health_check_response_text' => 'nullable|string',
|
'resource.health_check_response_text' => 'nullable|string',
|
||||||
'resource.health_check_interval' => 'integer',
|
'resource.health_check_interval' => 'integer|min:1',
|
||||||
'resource.health_check_timeout' => 'integer',
|
'resource.health_check_timeout' => 'integer|min:1',
|
||||||
'resource.health_check_retries' => 'integer',
|
'resource.health_check_retries' => 'integer|min:1',
|
||||||
'resource.health_check_start_period' => 'integer',
|
'resource.health_check_start_period' => 'integer',
|
||||||
|
'resource.custom_healthcheck_found' => 'boolean',
|
||||||
|
|
||||||
];
|
];
|
||||||
public function instantSave()
|
public function instantSave()
|
||||||
{
|
{
|
||||||
$this->resource->save();
|
$this->resource->save();
|
||||||
$this->dispatch('success', 'Health check updated.');
|
$this->dispatch('success', 'Health check updated.');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ class Create extends Component
|
|||||||
public string $endpoint;
|
public string $endpoint;
|
||||||
public S3Storage $storage;
|
public S3Storage $storage;
|
||||||
protected $rules = [
|
protected $rules = [
|
||||||
'name' => 'nullable|min:3|max:255',
|
'name' => 'required|min:3|max:255',
|
||||||
'description' => 'nullable|min:3|max:255',
|
'description' => 'nullable|min:3|max:255',
|
||||||
'region' => 'required|max:255',
|
'region' => 'required|max:255',
|
||||||
'key' => 'required|max:255',
|
'key' => 'required|max:255',
|
||||||
'secret' => 'required|max:255',
|
'secret' => 'required|max:255',
|
||||||
'bucket' => 'required|max:255',
|
'bucket' => 'required|max:255',
|
||||||
'endpoint' => 'nullable|url|max:255',
|
'endpoint' => 'required|url|max:255',
|
||||||
];
|
];
|
||||||
protected $validationAttributes = [
|
protected $validationAttributes = [
|
||||||
'name' => 'Name',
|
'name' => 'Name',
|
||||||
|
|||||||
@@ -963,4 +963,51 @@ class Application extends BaseModel
|
|||||||
{
|
{
|
||||||
getFilesystemVolumesFromServer($this, $isInit);
|
getFilesystemVolumesFromServer($this, $isInit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function parseHealthcheckFromDockerfile($dockerfile, bool $isInit = false) {
|
||||||
|
if (str($dockerfile)->contains('HEALTHCHECK') && ($this->isHealthcheckDisabled() || $isInit)) {
|
||||||
|
$healthcheckCommand = null;
|
||||||
|
$lines = $dockerfile->toArray();
|
||||||
|
foreach ($lines as $line) {
|
||||||
|
$trimmedLine = trim($line);
|
||||||
|
if (str_starts_with($trimmedLine, 'HEALTHCHECK')) {
|
||||||
|
$healthcheckCommand .= trim($trimmedLine, '\\ ');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isset($healthcheckCommand) && str_contains($trimmedLine, '\\')) {
|
||||||
|
$healthcheckCommand .= ' ' . trim($trimmedLine, '\\ ');
|
||||||
|
}
|
||||||
|
if (isset($healthcheckCommand) && !str_contains($trimmedLine, '\\') && !empty($healthcheckCommand)) {
|
||||||
|
$healthcheckCommand .= ' ' . $trimmedLine;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (str($healthcheckCommand)->isNotEmpty()) {
|
||||||
|
$interval = str($healthcheckCommand)->match('/--interval=(\d+)/');
|
||||||
|
$timeout = str($healthcheckCommand)->match('/--timeout=(\d+)/');
|
||||||
|
$start_period = str($healthcheckCommand)->match('/--start-period=(\d+)/');
|
||||||
|
$start_interval = str($healthcheckCommand)->match('/--start-interval=(\d+)/');
|
||||||
|
$retries = str($healthcheckCommand)->match('/--retries=(\d+)/');
|
||||||
|
if ($interval->isNotEmpty()) {
|
||||||
|
$this->health_check_interval = $interval->toInteger();
|
||||||
|
}
|
||||||
|
if ($timeout->isNotEmpty()) {
|
||||||
|
$this->health_check_timeout = $timeout->toInteger();
|
||||||
|
}
|
||||||
|
if ($start_period->isNotEmpty()) {
|
||||||
|
$this->health_check_start_period = $start_period->toInteger();
|
||||||
|
}
|
||||||
|
// if ($start_interval) {
|
||||||
|
// $this->health_check_start_interval = $start_interval->value();
|
||||||
|
// }
|
||||||
|
if ($retries->isNotEmpty()) {
|
||||||
|
$this->health_check_retries = $retries->toInteger();
|
||||||
|
}
|
||||||
|
if ($interval || $timeout || $start_period || $start_interval || $retries) {
|
||||||
|
$this->custom_healthcheck_found = true;
|
||||||
|
$this->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,4 @@ class StandaloneClickhouse extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
public function database_name() {
|
|
||||||
return $this->clickhouse_db;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,4 @@ class StandaloneDragonfly extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
public function database_name() {
|
|
||||||
return '0';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,4 @@ class StandaloneKeydb extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
public function database_name() {
|
|
||||||
return '0';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,4 @@ class StandaloneMariadb extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
public function database_name() {
|
|
||||||
return $this->mariadb_database;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,7 +223,4 @@ class StandaloneMongodb extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
public function database_name() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,7 +209,4 @@ class StandaloneMysql extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
public function database_name() {
|
|
||||||
return $this->mysql_database;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,4 @@ class StandalonePostgresql extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
public function database_name() {
|
|
||||||
return $this->postgres_db;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,4 @@ class StandaloneRedis extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
public function database_name() {
|
|
||||||
return '0';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ class DeploymentFailed extends Notification implements ShouldQueue
|
|||||||
public function toDiscord(): string
|
public function toDiscord(): string
|
||||||
{
|
{
|
||||||
if ($this->preview) {
|
if ($this->preview) {
|
||||||
$message = 'Coolify: Pull request #' . $this->preview->pull_request_id . ' of **' . $this->application_name . '** (' . $this->preview->fqdn . ') deployment failed: ';
|
$message = 'Coolify: Pull request #' . $this->preview->pull_request_id . ' of ' . $this->application_name . ' (' . $this->preview->fqdn . ') deployment failed: ';
|
||||||
$message .= '[View Deployment Logs](' . $this->deployment_url . ')';
|
$message .= '[View Deployment Logs](' . $this->deployment_url . ')';
|
||||||
} else {
|
} else {
|
||||||
$message = 'Coolify: Deployment failed of **' . $this->application_name . '** (' . $this->fqdn . '): ';
|
$message = 'Coolify: Deployment failed of ' . $this->application_name . ' (' . $this->fqdn . '): ';
|
||||||
$message .= '[View Deployment Logs](' . $this->deployment_url . ')';
|
$message .= '[View Deployment Logs](' . $this->deployment_url . ')';
|
||||||
}
|
}
|
||||||
return $message;
|
return $message;
|
||||||
@@ -80,9 +80,9 @@ class DeploymentFailed extends Notification implements ShouldQueue
|
|||||||
public function toTelegram(): array
|
public function toTelegram(): array
|
||||||
{
|
{
|
||||||
if ($this->preview) {
|
if ($this->preview) {
|
||||||
$message = 'Coolify: Pull request #' . $this->preview->pull_request_id . ' of **' . $this->application_name . '** (' . $this->preview->fqdn . ') deployment failed: ';
|
$message = 'Coolify: Pull request #' . $this->preview->pull_request_id . ' of ' . $this->application_name . ' (' . $this->preview->fqdn . ') deployment failed: ';
|
||||||
} else {
|
} else {
|
||||||
$message = 'Coolify: Deployment failed of **' . $this->application_name . '** (' . $this->fqdn . '): ';
|
$message = 'Coolify: Deployment failed of ' . $this->application_name . ' (' . $this->fqdn . '): ';
|
||||||
}
|
}
|
||||||
$buttons[] = [
|
$buttons[] = [
|
||||||
"text" => "Deployment logs",
|
"text" => "Deployment logs",
|
||||||
|
|||||||
@@ -43,15 +43,8 @@ class DeploymentSuccess extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
$channels = setNotificationChannels($notifiable, 'deployments');
|
return setNotificationChannels($notifiable, 'deployments');
|
||||||
if (isCloud()) {
|
|
||||||
$channels = array_filter($channels, function ($channel) {
|
|
||||||
return $channel !== 'App\Notifications\Channels\EmailChannel';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return $channels;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toMail(): MailMessage
|
public function toMail(): MailMessage
|
||||||
{
|
{
|
||||||
$mail = new MailMessage();
|
$mail = new MailMessage();
|
||||||
|
|||||||
@@ -15,21 +15,20 @@ class BackupFailed extends Notification implements ShouldQueue
|
|||||||
{
|
{
|
||||||
use Queueable;
|
use Queueable;
|
||||||
|
|
||||||
public $tries = 1;
|
public $backoff = 10;
|
||||||
|
public $tries = 2;
|
||||||
public string $name;
|
public string $name;
|
||||||
public ?string $database_name = null;
|
|
||||||
public string $frequency;
|
public string $frequency;
|
||||||
|
|
||||||
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $output)
|
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $output, public $database_name)
|
||||||
{
|
{
|
||||||
$this->name = $database->name;
|
$this->name = $database->name;
|
||||||
$this->database_name = $database->database_name();
|
|
||||||
$this->frequency = $backup->frequency;
|
$this->frequency = $backup->frequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
return [DiscordChannel::class, TelegramChannel::class, MailChannel::class];
|
return setNotificationChannels($notifiable, 'database_backups');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toMail(): MailMessage
|
public function toMail(): MailMessage
|
||||||
@@ -47,11 +46,11 @@ class BackupFailed extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function toDiscord(): string
|
public function toDiscord(): string
|
||||||
{
|
{
|
||||||
return "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was FAILED.\n\nReason: {$this->output}";
|
return "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was FAILED.\n\nReason:\n{$this->output}";
|
||||||
}
|
}
|
||||||
public function toTelegram(): array
|
public function toTelegram(): array
|
||||||
{
|
{
|
||||||
$message = "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was FAILED.\n\nReason: {$this->output}";
|
$message = "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was FAILED.\n\nReason:\n{$this->output}";
|
||||||
return [
|
return [
|
||||||
"message" => $message,
|
"message" => $message,
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -12,15 +12,14 @@ class BackupSuccess extends Notification implements ShouldQueue
|
|||||||
{
|
{
|
||||||
use Queueable;
|
use Queueable;
|
||||||
|
|
||||||
public $tries = 1;
|
public $backoff = 10;
|
||||||
|
public $tries = 3;
|
||||||
public string $name;
|
public string $name;
|
||||||
public ?string $database_name = null;
|
|
||||||
public string $frequency;
|
public string $frequency;
|
||||||
|
|
||||||
public function __construct(ScheduledDatabaseBackup $backup, public $database)
|
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $database_name)
|
||||||
{
|
{
|
||||||
$this->name = $database->name;
|
$this->name = $database->name;
|
||||||
$this->database_name = $database->database_name();
|
|
||||||
$this->frequency = $backup->frequency;
|
$this->frequency = $backup->frequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,6 +47,7 @@ class BackupSuccess extends Notification implements ShouldQueue
|
|||||||
public function toTelegram(): array
|
public function toTelegram(): array
|
||||||
{
|
{
|
||||||
$message = "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was successful.";
|
$message = "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was successful.";
|
||||||
|
ray($message);
|
||||||
return [
|
return [
|
||||||
"message" => $message,
|
"message" => $message,
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use App\Models\ServiceApplication;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Spatie\Url\Url;
|
use Spatie\Url\Url;
|
||||||
|
use Visus\Cuid2\Cuid2;
|
||||||
|
|
||||||
function getCurrentApplicationContainerStatus(Server $server, int $id, ?int $pullRequestId = null, ?bool $includePullrequests = false): Collection
|
function getCurrentApplicationContainerStatus(Server $server, int $id, ?int $pullRequestId = null, ?bool $includePullrequests = false): Collection
|
||||||
{
|
{
|
||||||
@@ -272,7 +273,7 @@ function fqdnLabelsForCaddy(string $network, string $uuid, Collection $domains,
|
|||||||
}
|
}
|
||||||
return $labels->sort();
|
return $labels->sort();
|
||||||
}
|
}
|
||||||
function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_https_enabled = false, $onlyPort = null, ?Collection $serviceLabels = null, ?bool $is_gzip_enabled = true, ?bool $is_stripprefix_enabled = true, ?string $service_name = null)
|
function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_https_enabled = false, $onlyPort = null, ?Collection $serviceLabels = null, ?bool $is_gzip_enabled = true, ?bool $is_stripprefix_enabled = true, ?string $service_name = null, bool $generate_unique_uuid = false)
|
||||||
{
|
{
|
||||||
$labels = collect([]);
|
$labels = collect([]);
|
||||||
$labels->push('traefik.enable=true');
|
$labels->push('traefik.enable=true');
|
||||||
@@ -313,7 +314,9 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_
|
|||||||
}
|
}
|
||||||
foreach ($domains as $loop => $domain) {
|
foreach ($domains as $loop => $domain) {
|
||||||
try {
|
try {
|
||||||
// $uuid = new Cuid2(7);
|
if ($generate_unique_uuid) {
|
||||||
|
$uuid = new Cuid2(7);
|
||||||
|
}
|
||||||
$url = Url::fromString($domain);
|
$url = Url::fromString($domain);
|
||||||
$host = $url->getHost();
|
$host = $url->getHost();
|
||||||
$path = $url->getPath();
|
$path = $url->getPath();
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function collectRegex(string $name)
|
|||||||
}
|
}
|
||||||
function replaceVariables($variable)
|
function replaceVariables($variable)
|
||||||
{
|
{
|
||||||
return $variable->replaceFirst('$', '')->replaceFirst('{', '')->replaceLast('}', '');
|
return $variable->before('}')->replaceFirst('$', '')->replaceFirst('{', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Application $oneService, bool $isInit = false)
|
function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Application $oneService, bool $isInit = false)
|
||||||
@@ -27,7 +27,7 @@ function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Appli
|
|||||||
if ($oneService->getMorphClass() === 'App\Models\Application') {
|
if ($oneService->getMorphClass() === 'App\Models\Application') {
|
||||||
$workdir = $oneService->workdir();
|
$workdir = $oneService->workdir();
|
||||||
$server = $oneService->destination->server;
|
$server = $oneService->destination->server;
|
||||||
} else{
|
} else {
|
||||||
$workdir = $oneService->service->workdir();
|
$workdir = $oneService->service->workdir();
|
||||||
$server = $oneService->service->server;
|
$server = $oneService->service->server;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1620,7 +1620,8 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik(
|
$serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik(
|
||||||
uuid: $resource->uuid,
|
uuid: $resource->uuid,
|
||||||
domains: $fqdns,
|
domains: $fqdns,
|
||||||
serviceLabels: $serviceLabels
|
serviceLabels: $serviceLabels,
|
||||||
|
generate_unique_uuid: $resource->build_pack === 'dockercompose'
|
||||||
));
|
));
|
||||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForCaddy(
|
$serviceLabels = $serviceLabels->merge(fqdnLabelsForCaddy(
|
||||||
network: $resource->destination->network,
|
network: $resource->destination->network,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ return [
|
|||||||
'basic' => env('LIMIT_SERVER_BASIC', 2),
|
'basic' => env('LIMIT_SERVER_BASIC', 2),
|
||||||
'pro' => env('LIMIT_SERVER_PRO', 10),
|
'pro' => env('LIMIT_SERVER_PRO', 10),
|
||||||
'ultimate' => env('LIMIT_SERVER_ULTIMATE', 25),
|
'ultimate' => env('LIMIT_SERVER_ULTIMATE', 25),
|
||||||
|
'dynamic' => env('LIMIT_SERVER_DYNAMIC', 2),
|
||||||
],
|
],
|
||||||
'email' => [
|
'email' => [
|
||||||
'zero' => true,
|
'zero' => true,
|
||||||
@@ -39,6 +40,7 @@ return [
|
|||||||
'basic' => true,
|
'basic' => true,
|
||||||
'pro' => true,
|
'pro' => true,
|
||||||
'ultimate' => true,
|
'ultimate' => true,
|
||||||
|
'dynamic' => true,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ return [
|
|||||||
|
|
||||||
// The release version of your application
|
// The release version of your application
|
||||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||||
'release' => '4.0.0-beta.270',
|
'release' => '4.0.0-beta.272',
|
||||||
// When left empty or `null` the Laravel environment will be used
|
// When left empty or `null` the Laravel environment will be used
|
||||||
'environment' => config('app.env'),
|
'environment' => config('app.env'),
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return '4.0.0-beta.270';
|
return '4.0.0-beta.272';
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('applications', function (Blueprint $table) {
|
||||||
|
$table->boolean('custom_healthcheck_found')->default(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('applications', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('custom_healthcheck_found');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
wire:dirty.class.remove='dark:focus:ring-coolgray-300 dark:ring-coolgray-300'
|
wire:dirty.class.remove='dark:focus:ring-coolgray-300 dark:ring-coolgray-300'
|
||||||
wire:dirty.class="dark:focus:ring-warning dark:ring-warning" wire:loading.attr="disabled"
|
wire:dirty.class="dark:focus:ring-warning dark:ring-warning" wire:loading.attr="disabled"
|
||||||
type="{{ $type }}" @disabled($disabled)
|
type="{{ $type }}" @disabled($disabled)
|
||||||
|
min="{{ $attributes->get('min') }}" max="{{ $attributes->get('max') }}"
|
||||||
@if ($id !== 'null') id={{ $id }} @endif name="{{ $name }}"
|
@if ($id !== 'null') id={{ $id }} @endif name="{{ $name }}"
|
||||||
placeholder="{{ $attributes->get('placeholder') }}">
|
placeholder="{{ $attributes->get('placeholder') }}">
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -6,23 +6,28 @@
|
|||||||
x-transition:enter-start="translate-y-full" x-transition:enter-end="translate-y-0"
|
x-transition:enter-start="translate-y-full" x-transition:enter-end="translate-y-0"
|
||||||
x-transition:leave="transition ease-in duration-300" x-transition:leave-start="translate-y-0"
|
x-transition:leave="transition ease-in duration-300" x-transition:leave-start="translate-y-0"
|
||||||
x-transition:leave-end="translate-y-full" x-init="setTimeout(() => { bannerVisible = true }, bannerVisibleAfter);"
|
x-transition:leave-end="translate-y-full" x-init="setTimeout(() => { bannerVisible = true }, bannerVisibleAfter);"
|
||||||
class="fixed bottom-0 right-0 h-auto duration-300 ease-out px-5 pb-5 max-w-[46rem] z-[999]"
|
class="fixed bottom-0 right-0 h-auto duration-300 ease-out px-5 pb-5 max-w-[46rem] z-[999]" x-cloak>
|
||||||
x-cloak>
|
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-center justify-between w-full h-full max-w-4xl p-6 mx-auto bg-white border shadow-lg lg:border-t dark:border-coolgray-300 dark:bg-coolgray-100 lg:p-8 lg:flex-row sm:rounded">
|
class="flex flex-col items-center justify-between w-full h-full max-w-4xl p-6 mx-auto bg-white border shadow-lg lg:border-t dark:border-coolgray-300 dark:bg-coolgray-100/40 hover:dark:bg-coolgray-100/100 lg:p-8 lg:flex-row sm:rounded">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-start h-full pb-0 text-xs lg:items-center lg:flex-row lg:pr-6 lg:space-x-5 dark:text-neutral-300 ">
|
class="flex flex-col items-start h-full pb-0 text-xs lg:items-center lg:flex-row lg:pr-6 lg:space-x-5 dark:text-neutral-300 ">
|
||||||
@if (isset($icon))
|
@if (isset($icon))
|
||||||
{{ $icon }}
|
{{ $icon }}
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="pt-0">
|
<div class="pt-0">
|
||||||
<h4 class="w-full mb-1 text-base font-bold leading-none -translate-y-1 lg:text-xl text-neutral-900 dark:text-white">
|
<h4
|
||||||
|
class="w-full mb-1 text-base font-bold leading-none -translate-y-1 text-neutral-900 dark:text-white">
|
||||||
{{ $title }}
|
{{ $title }}
|
||||||
</h4>
|
</h4>
|
||||||
<p class="">{{ $description }}</span></p>
|
<div>{{ $description }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button @click="bannerVisible=false">
|
||||||
|
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||||
|
stroke-width="1.5" stroke="currentColor" class="w-full h-full">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
<h1>Dashboard</h1>
|
<h1>Dashboard</h1>
|
||||||
<div class="subtitle">Your self-hosted infrastructure.</div>
|
<div class="subtitle">Your self-hosted infrastructure.</div>
|
||||||
@if (request()->query->get('success'))
|
@if (request()->query->get('success'))
|
||||||
<div class="mb-10 rounded dark:text-white alert-success">
|
<div class="items-center justify-center mb-10 font-bold rounded alert alert-success">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
|
||||||
viewBox="0 0 24 24">
|
viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||||
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>Your subscription has been activated! Welcome onboard! <br>It could take a few seconds before your
|
Your subscription has been activated! Welcome onboard! <br>It could take a few seconds before your
|
||||||
subscription is activated.<br> Please be patient.</span>
|
subscription is activated.<br> Please be patient.
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<h3 class="pb-4">Projects</h3>
|
<h3 class="pb-4">Projects</h3>
|
||||||
|
|||||||
@@ -1,43 +1,51 @@
|
|||||||
<div class="flex flex-col-reverse gap-2">
|
<div>
|
||||||
@forelse($executions as $execution)
|
<div class="flex items-center gap-2">
|
||||||
<form wire:key="{{ data_get($execution, 'id') }}"
|
<h3 class="py-4">Executions</h3>
|
||||||
class="relative flex flex-col p-4 bg-white box-without-bg dark:bg-coolgray-100" @class([
|
<x-forms.button wire:click='cleanupFailed'>Cleanup Failed Backups</x-forms.button>
|
||||||
'border-green-500' => data_get($execution, 'status') === 'success',
|
</div>
|
||||||
'border-red-500' => data_get($execution, 'status') === 'failed',
|
<div class="flex flex-col-reverse gap-2">
|
||||||
])>
|
@forelse($executions as $execution)
|
||||||
@if (data_get($execution, 'status') === 'running')
|
<form wire:key="{{ data_get($execution, 'id') }}"
|
||||||
<div class="absolute top-2 right-2">
|
class="relative flex flex-col p-4 bg-white box-without-bg dark:bg-coolgray-100"
|
||||||
<x-loading />
|
@class([
|
||||||
</div>
|
'border-green-500' => data_get($execution, 'status') === 'success',
|
||||||
@endif
|
'border-red-500' => data_get($execution, 'status') === 'failed',
|
||||||
<div>Database: {{ data_get($execution, 'database_name', 'N/A') }}</div>
|
])>
|
||||||
<div>Status: {{ data_get($execution, 'status') }}</div>
|
@if (data_get($execution, 'status') === 'running')
|
||||||
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
|
<div class="absolute top-2 right-2">
|
||||||
@if (data_get($execution, 'message'))
|
<x-loading />
|
||||||
<div>Message: {{ data_get($execution, 'message') }}</div>
|
</div>
|
||||||
@endif
|
|
||||||
<div>Size: {{ data_get($execution, 'size') }} B / {{ round((int) data_get($execution, 'size') / 1024, 2) }}
|
|
||||||
kB / {{ round((int) data_get($execution, 'size') / 1024 / 1024, 3) }} MB
|
|
||||||
</div>
|
|
||||||
<div>Location: {{ data_get($execution, 'filename', 'N/A') }}</div>
|
|
||||||
<div class="flex gap-2">
|
|
||||||
<div class="flex-1"></div>
|
|
||||||
@if (data_get($execution, 'status') === 'success')
|
|
||||||
<x-forms.button class=" dark:hover:bg-coolgray-400"
|
|
||||||
x-on:click="download_file('{{ data_get($execution, 'id') }}')">Download</x-forms.button>
|
|
||||||
@endif
|
@endif
|
||||||
<x-modal-confirmation isErrorButton action="deleteBackup({{ data_get($execution, 'id') }})">
|
<div>Database: {{ data_get($execution, 'database_name', 'N/A') }}</div>
|
||||||
<x-slot:button-title>
|
<div>Status: {{ data_get($execution, 'status') }}</div>
|
||||||
Delete
|
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
|
||||||
</x-slot:button-title>
|
@if (data_get($execution, 'message'))
|
||||||
This will delete this backup. It is not reversible.<br>Please think again.
|
<div>Message: {{ data_get($execution, 'message') }}</div>
|
||||||
</x-modal-confirmation>
|
@endif
|
||||||
</div>
|
<div>Size: {{ data_get($execution, 'size') }} B /
|
||||||
</form>
|
{{ round((int) data_get($execution, 'size') / 1024, 2) }}
|
||||||
|
kB / {{ round((int) data_get($execution, 'size') / 1024 / 1024, 3) }} MB
|
||||||
|
</div>
|
||||||
|
<div>Location: {{ data_get($execution, 'filename', 'N/A') }}</div>
|
||||||
|
<div class="flex gap-2">
|
||||||
|
<div class="flex-1"></div>
|
||||||
|
@if (data_get($execution, 'status') === 'success')
|
||||||
|
<x-forms.button class=" dark:hover:bg-coolgray-400"
|
||||||
|
x-on:click="download_file('{{ data_get($execution, 'id') }}')">Download</x-forms.button>
|
||||||
|
@endif
|
||||||
|
<x-modal-confirmation isErrorButton action="deleteBackup({{ data_get($execution, 'id') }})">
|
||||||
|
<x-slot:button-title>
|
||||||
|
Delete
|
||||||
|
</x-slot:button-title>
|
||||||
|
This will delete this backup. It is not reversible.<br>Please think again.
|
||||||
|
</x-modal-confirmation>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
@empty
|
@empty
|
||||||
<div>No executions found.</div>
|
<div>No executions found.</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function download_file(executionId) {
|
function download_file(executionId) {
|
||||||
window.open('/download/backup/' + executionId, '_blank');
|
window.open('/download/backup/' + executionId, '_blank');
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
<livewire:project.database.heading :database="$database" />
|
<livewire:project.database.heading :database="$database" />
|
||||||
<div class="pt-6">
|
<div class="pt-6">
|
||||||
<livewire:project.database.backup-edit :backup="$backup" :s3s="$s3s" :status="data_get($database, 'status')" />
|
<livewire:project.database.backup-edit :backup="$backup" :s3s="$s3s" :status="data_get($database, 'status')" />
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<h3 class="py-4">Executions</h3>
|
|
||||||
<x-forms.button wire:click='cleanupFailed'>Cleanup Failed Backups</x-forms.button>
|
|
||||||
</div>
|
|
||||||
<livewire:project.database.backup-executions :backup="$backup" :executions="$executions" />
|
<livewire:project.database.backup-executions :backup="$backup" :executions="$executions" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,21 +2,21 @@
|
|||||||
<div class="flex flex-wrap gap-2">
|
<div class="flex flex-wrap gap-2">
|
||||||
@forelse($database->scheduledBackups as $backup)
|
@forelse($database->scheduledBackups as $backup)
|
||||||
@if ($type == 'database')
|
@if ($type == 'database')
|
||||||
<div class="box">
|
<a class="box"
|
||||||
<a class="flex flex-col"
|
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
|
||||||
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
|
<div class="flex flex-col">
|
||||||
<div>Frequency: {{ $backup->frequency }}</div>
|
<div>Frequency: {{ $backup->frequency }}</div>
|
||||||
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
|
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
|
||||||
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
|
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
@else
|
@else
|
||||||
<div class="box">
|
<div class="box" wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')">
|
||||||
<div @class([
|
<div @class([
|
||||||
'border-coollabs' =>
|
'border-coollabs' =>
|
||||||
data_get($backup, 'id') === data_get($selectedBackup, 'id'),
|
data_get($backup, 'id') === data_get($selectedBackup, 'id'),
|
||||||
'flex flex-col border-l-2 border-transparent',
|
'flex flex-col border-l-2 border-transparent',
|
||||||
]) wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')">
|
])>
|
||||||
<div>Frequency: {{ $backup->frequency }}</div>
|
<div>Frequency: {{ $backup->frequency }}</div>
|
||||||
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
|
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
|
||||||
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
|
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="pb-4">Deploy any public Git repositories.</div>
|
<div class="pb-4">Deploy any public Git repositories.</div>
|
||||||
<form class="flex flex-col gap-2" wire:submit='load_branch'>
|
<form class="flex flex-col gap-2" wire:submit='load_branch'>
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<x-forms.input required id="repository_url" label="Repository URL (https://)" helper="{!! __('repository.url') !!}" />
|
<x-forms.input required id="repository_url" label="Repository URL (https://)" helper="{!! __('repository.url') !!}" />
|
||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
The latest configuration has not been applied
|
The latest configuration has not been applied
|
||||||
</x-slot:title>
|
</x-slot:title>
|
||||||
<x-slot:icon>
|
<x-slot:icon>
|
||||||
<svg class="hidden w-16 h-16 dark:text-warning lg:block" viewBox="0 0 256 256"
|
<svg class="hidden w-10 h-10 dark:text-warning lg:block" viewBox="0 0 256 256"
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<path fill="currentColor"
|
<path fill="currentColor"
|
||||||
d="M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16" />
|
d="M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16" />
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
stroke-width="2" d="M12 5v14m4-4l-4 4m-4-4l4 4" />
|
stroke-width="2" d="M12 5v14m4-4l-4 4m-4-4l4 4" />
|
||||||
</svg></button>
|
</svg></button>
|
||||||
|
|
||||||
<button title="Fullscreen" x-show="!fullscreen" class="absolute top-6 right-4"
|
<button title="Fullscreen" x-show="!fullscreen" class="absolute top-5 right-1"
|
||||||
x-on:click="makeFullscreen"><svg class="icon" viewBox="0 0 24 24"
|
x-on:click="makeFullscreen"><svg class="icon" viewBox="0 0 24 24"
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="none">
|
<g fill="none">
|
||||||
|
|||||||
@@ -5,27 +5,33 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pb-4">Define how your resource's health should be checked.</div>
|
<div class="pb-4">Define how your resource's health should be checked.</div>
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
|
@if ($resource->custom_healthcheck_found)
|
||||||
|
<div class="text-warning">A custom health check has been found and will be used until you enable this.</div>
|
||||||
|
@endif
|
||||||
<div class="w-32">
|
<div class="w-32">
|
||||||
<x-forms.checkbox instantSave id="resource.health_check_enabled" label="Enabled" />
|
<x-forms.checkbox instantSave id="resource.health_check_enabled" label="Enabled" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input id="resource.health_check_method" placeholder="GET" label="Method" required />
|
<x-forms.input id="resource.health_check_method" placeholder="GET" label="Method" required />
|
||||||
|
|
||||||
<x-forms.input id="resource.health_check_scheme" placeholder="http" label="Scheme" required />
|
<x-forms.input id="resource.health_check_scheme" placeholder="http" label="Scheme" required />
|
||||||
<x-forms.input id="resource.health_check_host" placeholder="localhost" label="Host" required />
|
<x-forms.input id="resource.health_check_host" placeholder="localhost" label="Host" required />
|
||||||
<x-forms.input id="resource.health_check_port"
|
<x-forms.input type="number" id="resource.health_check_port"
|
||||||
helper="If no port is defined, the first exposed port will be used." placeholder="80" label="Port" />
|
helper="If no port is defined, the first exposed port will be used." placeholder="80" label="Port" />
|
||||||
<x-forms.input id="resource.health_check_path" placeholder="/health" label="Path" required />
|
<x-forms.input id="resource.health_check_path" placeholder="/health" label="Path" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input id="resource.health_check_return_code" placeholder="200" label="Return Code" required />
|
<x-forms.input type="number" id="resource.health_check_return_code" placeholder="200" label="Return Code"
|
||||||
|
required />
|
||||||
<x-forms.input id="resource.health_check_response_text" placeholder="OK" label="Response Text" />
|
<x-forms.input id="resource.health_check_response_text" placeholder="OK" label="Response Text" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input id="resource.health_check_interval" placeholder="30" label="Interval" required />
|
<x-forms.input min=1 type="number" id="resource.health_check_interval" placeholder="30" label="Interval"
|
||||||
<x-forms.input id="resource.health_check_timeout" placeholder="30" label="Timeout" required />
|
required />
|
||||||
<x-forms.input id="resource.health_check_retries" placeholder="3" label="Retries" required />
|
<x-forms.input type="number" id="resource.health_check_timeout" placeholder="30" label="Timeout"
|
||||||
<x-forms.input id="resource.health_check_start_period" placeholder="30" label="Start Period" required />
|
required />
|
||||||
|
<x-forms.input type="number" id="resource.health_check_retries" placeholder="3" label="Retries" required />
|
||||||
|
<x-forms.input min=1 type="number" id="resource.health_check_start_period" placeholder="30"
|
||||||
|
label="Start Period" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,58 +1,53 @@
|
|||||||
<div>
|
<div>
|
||||||
<h2>Resource Operations</h2>
|
<h2>Resource Operations</h2>
|
||||||
<div class="pb-4">You can easily make different kind of operations on this resource.</div>
|
<div class="pb-4">You can easily make different kind of operations on this resource.</div>
|
||||||
<h4>Clone</h4>
|
<h3>Clone</h3>
|
||||||
<div class="pb-8">
|
<div class="pb-4">To another project / environment on a different server.</div>
|
||||||
<div class="pb-2">
|
<div class="pb-4">
|
||||||
Clone this resource to another project / environment.
|
<div class="flex flex-col flex-wrap gap-2">
|
||||||
</div>
|
|
||||||
<div class="flex flex-col">
|
|
||||||
@foreach ($servers->sortBy('id') as $server)
|
@foreach ($servers->sortBy('id') as $server)
|
||||||
<div>
|
<h5>Server: <span class="font-bold text-white">{{ $server->name }}</span></h5>
|
||||||
<div class="grid grid-cols-1 gap-2 pb-4 lg:grid-cols-4">
|
@foreach ($server->destinations() as $destination)
|
||||||
@foreach ($server->destinations() as $destination)
|
<x-modal-confirmation action="cloneTo({{ data_get($destination, 'id') }})">
|
||||||
<x-modal-confirmation action="cloneTo({{ data_get($destination, 'id') }})">
|
<x:slot name="content">
|
||||||
<x:slot name="content">
|
<div class="box group">
|
||||||
<div class="box">
|
<div class="flex flex-col">
|
||||||
<div class="flex flex-col">
|
<div class="box-title">Network</div>
|
||||||
<div class="box-title">{{ $server->name }}</div>
|
<div class="box-description">{{ $destination->name }}</div>
|
||||||
<div class="box-description">{{ $destination->name }}</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</x:slot>
|
||||||
</x:slot>
|
<div>You are about to clone this resource.</div>
|
||||||
<div>You are about to clone this resource.</div>
|
</x-modal-confirmation>
|
||||||
</x-modal-confirmation>
|
@endforeach
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h4>Move</h4>
|
<h3>Move</h3>
|
||||||
|
<div class="pb-4">Between projects / environments.</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="pb-8">
|
<div class="pb-2">
|
||||||
This resource is currently in the <span
|
This resource is currently in the <span
|
||||||
class="font-bold dark:text-warning">{{ $resource->environment->project->name }} /
|
class="font-bold dark:text-warning">{{ $resource->environment->project->name }} /
|
||||||
{{ $resource->environment->name }}</span> environment.
|
{{ $resource->environment->name }}</span> environment.
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-wrap gap-2">
|
<div class="flex flex-col flex-wrap gap-2">
|
||||||
@forelse ($projects as $project)
|
@forelse ($projects as $project)
|
||||||
<div class="flex flex-wrap gap-2">
|
<h5>Project: <span class="font-bold text-white">{{ $project->name }}</span></h5>
|
||||||
@foreach ($project->environments as $environment)
|
|
||||||
<x-modal-confirmation action="moveTo({{ data_get($environment, 'id') }})">
|
@foreach ($project->environments as $environment)
|
||||||
<x:slot name="content">
|
<x-modal-confirmation action="moveTo({{ data_get($environment, 'id') }})">
|
||||||
<div class="box">
|
<x:slot name="content">
|
||||||
<div class="flex flex-col">
|
<div class="box group">
|
||||||
<div class="box-title">{{ $project->name }}</div>
|
<div class="flex flex-col">
|
||||||
<div class="box-description">environment: {{ $environment->name }}
|
<div class="box-title">Environment</div>
|
||||||
</div>
|
<div class="box-description">{{ $environment->name }}</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</x:slot>
|
</div>
|
||||||
<div>You are about to move this resource.</div>
|
</x:slot>
|
||||||
</x-modal-confirmation>
|
<div>You are about to move this resource.</div>
|
||||||
@endforeach
|
</x-modal-confirmation>
|
||||||
</div>
|
@endforeach
|
||||||
@empty
|
@empty
|
||||||
<div>No projects found to move to</div>
|
<div>No projects found to move to</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
|
|||||||
@@ -4,8 +4,12 @@
|
|||||||
@if ($isFirst)
|
@if ($isFirst)
|
||||||
<x-forms.input id="storage.name" label="Volume Name" required
|
<x-forms.input id="storage.name" label="Volume Name" required
|
||||||
helper="Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing." />
|
helper="Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||||
<x-forms.input id="storage.host_path" label="Source Path (on host)" helper="Warning: Changing the source path after the initial start could cause problems. Only use it when you know what are you doing." />
|
<x-forms.input id="storage.host_path" label="Source Path (on host)"
|
||||||
|
helper="Warning: Changing the source path after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||||
<x-forms.input id="storage.mount_path" label="Destination Path (in container)" required readonly />
|
<x-forms.input id="storage.mount_path" label="Destination Path (in container)" required readonly />
|
||||||
|
<x-forms.button type="submit">
|
||||||
|
Update
|
||||||
|
</x-forms.button>
|
||||||
@else
|
@else
|
||||||
<x-forms.input id="storage.name" required readonly
|
<x-forms.input id="storage.name" required readonly
|
||||||
helper="Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing." />
|
helper="Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
<div class="subtitle">S3 Storage used to save backups / files.</div>
|
<div class="subtitle">S3 Storage used to save backups / files.</div>
|
||||||
<form class="flex flex-col gap-2" wire:submit='submit'>
|
<form class="flex flex-col gap-2" wire:submit='submit'>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input label="Name" id="name" />
|
<x-forms.input required label="Name" id="name" />
|
||||||
<x-forms.input label="Description" id="description" />
|
<x-forms.input label="Description" id="description" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input type="url" label="Endpoint" id="endpoint" />
|
<x-forms.input required type="url" label="Endpoint" id="endpoint" />
|
||||||
<x-forms.input required label="Bucket" id="bucket" />
|
<x-forms.input required label="Bucket" id="bucket" />
|
||||||
<x-forms.input required label="Region" id="region" />
|
<x-forms.input required label="Region" id="region" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,34 +3,50 @@
|
|||||||
<div class="pt-4">
|
<div class="pt-4">
|
||||||
<h2>Your current plan</h2>
|
<h2>Your current plan</h2>
|
||||||
<div class="pb-4">Tier: <strong
|
<div class="pb-4">Tier: <strong
|
||||||
class="dark:text-warning">{{ data_get(currentTeam(), 'subscription')->type() }}</strong></div>
|
class="dark:text-warning">
|
||||||
|
@if (data_get(currentTeam(), 'subscription')->type() == 'dynamic')
|
||||||
|
Pay-as-you-go
|
||||||
|
@else
|
||||||
|
{{ data_get(currentTeam(), 'subscription')->type() }}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</strong></div>
|
||||||
|
|
||||||
@if (currentTeam()->subscription->stripe_cancel_at_period_end)
|
@if (currentTeam()->subscription->stripe_cancel_at_period_end)
|
||||||
<div>Subscription is active but on cancel period.</div>
|
<div class="pb-2">Subscription is active but on cancel period.</div>
|
||||||
@else
|
@else
|
||||||
<div>Subscription is active. Last invoice is
|
<div class="pb-2">Subscription is active. Last invoice is
|
||||||
{{ currentTeam()->subscription->stripe_invoice_paid ? 'paid' : 'not paid' }}.</div>
|
{{ currentTeam()->subscription->stripe_invoice_paid ? 'paid' : 'not paid' }}.</div>
|
||||||
@endif
|
@endif
|
||||||
<div>Number of paid servers: {{ $server_limits }}</div>
|
<div class="flex items-center gap-2">
|
||||||
<div>Currently active servers: {{ currentTeam()->servers->count() }}</div>
|
<div class="w-48">Number of paid servers:</div>
|
||||||
|
<div class="text-xl font-bold dark:text-white">{{ $server_limits }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<div class="w-48">Currently active servers:</div>
|
||||||
|
<div class="text-xl font-bold dark:text-white">{{ currentTeam()->servers->count() }}</div>
|
||||||
|
</div>
|
||||||
@if (currentTeam()->serverOverflow())
|
@if (currentTeam()->serverOverflow())
|
||||||
<div class="py-4"><span class="font-bold text-red-500">WARNING:</span> You must delete
|
<div class="py-4"><span class="font-bold text-red-500">WARNING:</span> You must delete
|
||||||
{{ currentTeam()->servers->count() - $server_limits }} servers,
|
{{ currentTeam()->servers->count() - $server_limits }} servers,
|
||||||
or upgrade your subscription. {{ currentTeam()->servers->count() - $server_limits }} servers will be
|
or upgrade your subscription. {{ currentTeam()->servers->count() - $server_limits }} servers will be
|
||||||
deactivated.</div>
|
deactivated.</div>
|
||||||
@endif
|
@endif
|
||||||
|
<x-forms.button class="gap-2" wire:click='stripeCustomerPortal'>Change Server Quantity
|
||||||
|
</x-forms.button>
|
||||||
<h2 class="pt-4">Manage your subscription</h2>
|
<h2 class="pt-4">Manage your subscription</h2>
|
||||||
<div class="pb-4">Cancel, upgrade or downgrade your subscription.</div>
|
<div class="pb-4">Cancel, upgrade or downgrade your subscription.</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.button class="gap-2" wire:click='stripeCustomerPortal'>Go to <svg xmlns="http://www.w3.org/2000/svg"
|
<x-forms.button class="gap-2" wire:click='stripeCustomerPortal'>Go to <svg
|
||||||
class="w-12 " viewBox="0 0 512 214">
|
xmlns="http://www.w3.org/2000/svg" class="w-12 " viewBox="0 0 512 214">
|
||||||
<path fill="#635BFF"
|
<path fill="#635BFF"
|
||||||
d="M512 110.08c0-36.409-17.636-65.138-51.342-65.138c-33.85 0-54.33 28.73-54.33 64.854c0 42.808 24.179 64.426 58.88 64.426c16.925 0 29.725-3.84 39.396-9.244v-28.445c-9.67 4.836-20.764 7.823-34.844 7.823c-13.796 0-26.027-4.836-27.591-21.618h69.547c0-1.85.284-9.245.284-12.658Zm-70.258-13.511c0-16.071 9.814-22.756 18.774-22.756c8.675 0 17.92 6.685 17.92 22.756h-36.694Zm-90.31-51.627c-13.939 0-22.899 6.542-27.876 11.094l-1.85-8.818h-31.288v165.83l35.555-7.537l.143-40.249c5.12 3.698 12.657 8.96 25.173 8.96c25.458 0 48.64-20.48 48.64-65.564c-.142-41.245-23.609-63.716-48.498-63.716Zm-8.534 97.991c-8.391 0-13.37-2.986-16.782-6.684l-.143-52.765c3.698-4.124 8.818-6.968 16.925-6.968c12.942 0 21.902 14.506 21.902 33.137c0 19.058-8.818 33.28-21.902 33.28ZM241.493 36.551l35.698-7.68V0l-35.698 7.538V36.55Zm0 10.809h35.698v124.444h-35.698V47.36Zm-38.257 10.524L200.96 47.36h-30.72v124.444h35.556V87.467c8.39-10.951 22.613-8.96 27.022-7.396V47.36c-4.551-1.707-21.191-4.836-29.582 10.524Zm-71.112-41.386l-34.702 7.395l-.142 113.92c0 21.05 15.787 36.551 36.836 36.551c11.662 0 20.195-2.133 24.888-4.693V140.8c-4.55 1.849-27.022 8.391-27.022-12.658V77.653h27.022V47.36h-27.022l.142-30.862ZM35.982 83.484c0-5.546 4.551-7.68 12.09-7.68c10.808 0 24.461 3.272 35.27 9.103V51.484c-11.804-4.693-23.466-6.542-35.27-6.542C19.2 44.942 0 60.018 0 85.192c0 39.252 54.044 32.995 54.044 49.92c0 6.541-5.688 8.675-13.653 8.675c-11.804 0-26.88-4.836-38.827-11.378v33.849c13.227 5.689 26.596 8.106 38.827 8.106c29.582 0 49.92-14.648 49.92-40.106c-.142-42.382-54.329-34.845-54.329-50.774Z" />
|
d="M512 110.08c0-36.409-17.636-65.138-51.342-65.138c-33.85 0-54.33 28.73-54.33 64.854c0 42.808 24.179 64.426 58.88 64.426c16.925 0 29.725-3.84 39.396-9.244v-28.445c-9.67 4.836-20.764 7.823-34.844 7.823c-13.796 0-26.027-4.836-27.591-21.618h69.547c0-1.85.284-9.245.284-12.658Zm-70.258-13.511c0-16.071 9.814-22.756 18.774-22.756c8.675 0 17.92 6.685 17.92 22.756h-36.694Zm-90.31-51.627c-13.939 0-22.899 6.542-27.876 11.094l-1.85-8.818h-31.288v165.83l35.555-7.537l.143-40.249c5.12 3.698 12.657 8.96 25.173 8.96c25.458 0 48.64-20.48 48.64-65.564c-.142-41.245-23.609-63.716-48.498-63.716Zm-8.534 97.991c-8.391 0-13.37-2.986-16.782-6.684l-.143-52.765c3.698-4.124 8.818-6.968 16.925-6.968c12.942 0 21.902 14.506 21.902 33.137c0 19.058-8.818 33.28-21.902 33.28ZM241.493 36.551l35.698-7.68V0l-35.698 7.538V36.55Zm0 10.809h35.698v124.444h-35.698V47.36Zm-38.257 10.524L200.96 47.36h-30.72v124.444h35.556V87.467c8.39-10.951 22.613-8.96 27.022-7.396V47.36c-4.551-1.707-21.191-4.836-29.582 10.524Zm-71.112-41.386l-34.702 7.395l-.142 113.92c0 21.05 15.787 36.551 36.836 36.551c11.662 0 20.195-2.133 24.888-4.693V140.8c-4.55 1.849-27.022 8.391-27.022-12.658V77.653h27.022V47.36h-27.022l.142-30.862ZM35.982 83.484c0-5.546 4.551-7.68 12.09-7.68c10.808 0 24.461 3.272 35.27 9.103V51.484c-11.804-4.693-23.466-6.542-35.27-6.542C19.2 44.942 0 60.018 0 85.192c0 39.252 54.044 32.995 54.044 49.92c0 6.541-5.688 8.675-13.653 8.675c-11.804 0-26.88-4.836-38.827-11.378v33.849c13.227 5.689 26.596 8.106 38.827 8.106c29.582 0 49.92-14.648 49.92-40.106c-.142-42.382-54.329-34.845-54.329-50.774Z" />
|
||||||
</svg></x-forms.button>
|
</svg>
|
||||||
|
</x-forms.button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4">
|
<div class="pt-4">
|
||||||
If you have any problem, please <a class="dark:text-white underline" href="{{ config('coolify.contact') }}"
|
If you have any problem, please <a class="underline dark:text-white" href="{{ config('coolify.contact') }}"
|
||||||
target="_blank">contact us.</a>
|
target="_blank">contact us.</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -40,7 +56,7 @@
|
|||||||
@if (currentTeam()->subscription->lemon_status === 'cancelled')
|
@if (currentTeam()->subscription->lemon_status === 'cancelled')
|
||||||
<div class="pb-4">Subscriptions ends at: {{ getRenewDate() }}</div>
|
<div class="pb-4">Subscriptions ends at: {{ getRenewDate() }}</div>
|
||||||
<div class="py-4">If you would like to change the subscription to a lower/higher plan, <a
|
<div class="py-4">If you would like to change the subscription to a lower/higher plan, <a
|
||||||
class="dark:text-white underline" href="{{ config('coolify.contact') }}" target="_blank">please
|
class="underline dark:text-white" href="{{ config('coolify.contact') }}" target="_blank">please
|
||||||
contact
|
contact
|
||||||
us.</a></div>
|
us.</a></div>
|
||||||
@else
|
@else
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (config('subscription.provider') !== null)
|
@if (config('subscription.provider') === 'stripe')
|
||||||
<livewire:subscription.pricing-plans />
|
<livewire:subscription.pricing-plans />
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,120 +0,0 @@
|
|||||||
<div x-data="{ selected: 'monthly' }" class="w-full pb-20">
|
|
||||||
<div class="max-w-2xl px-6 mx-auto lg:px-8">
|
|
||||||
<div class="flex justify-center">
|
|
||||||
<fieldset
|
|
||||||
class="grid grid-cols-2 p-1 text-xs font-semibold leading-5 text-center rounded dark:text-white gap-x-1 bg-white/5">
|
|
||||||
<legend class="sr-only">Payment frequency</legend>
|
|
||||||
<label class="cursor-pointer rounded px-2.5 py-1"
|
|
||||||
:class="selected === 'monthly' ? 'bg-coollabs-100 text-white' : ''">
|
|
||||||
<input type="radio" x-on:click="selected = 'monthly'" name="frequency" value="monthly"
|
|
||||||
class="sr-only">
|
|
||||||
<span>Monthly</span>
|
|
||||||
</label>
|
|
||||||
<label class="cursor-pointer rounded px-2.5 py-1"
|
|
||||||
:class="selected === 'yearly' ? 'bg-coollabs-100 text-white' : ''">
|
|
||||||
<input type="radio" x-on:click="selected = 'yearly'" name="frequency" value="annually"
|
|
||||||
class="sr-only">
|
|
||||||
<span>Annually</span>
|
|
||||||
</label>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<div x-show="selected === 'monthly'" class="flex justify-center h-10 mt-3 text-sm leading-6 ">
|
|
||||||
<div>Save <span class="font-bold text-black dark:text-warning">10%</span> annually with the yearly plans.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div x-show="selected === 'yearly'" class="flex justify-center h-10 mt-3 text-sm leading-6 ">
|
|
||||||
<div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flow-root mt-12">
|
|
||||||
<div class="pb-10 text-xl text-center">For the detailed list of features, please visit our landing page: <a
|
|
||||||
class="font-bold underline dark:text-white" href="https://coolify.io">coolify.io</a></div>
|
|
||||||
<div
|
|
||||||
class="grid max-w-sm grid-cols-1 -mt-16 divide-y divide-neutral-200 dark:divide-coolgray-500 isolate gap-y-16 sm:mx-auto lg:-mx-8 lg:mt-0 lg:max-w-none lg:grid-cols-1 lg:divide-x lg:divide-y-0 xl:-mx-4">
|
|
||||||
<div class="pt-16 lg:px-8 lg:pt-0 xl:px-14">
|
|
||||||
<h3 id="tier-dynamic" class="text-4xl font-semibold leading-7 dark:text-white">Dynamic</h3>
|
|
||||||
<p class="flex items-baseline mt-6 gap-x-1">
|
|
||||||
<span x-show="selected === 'monthly'" x-cloak>
|
|
||||||
<span class="text-4xl font-bold tracking-tight dark:text-white">$5</span>
|
|
||||||
<span class="text-sm font-semibold leading-6 "> for the first 2 servers</span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span x-show="selected === 'yearly'" x-cloak>
|
|
||||||
<span class="text-4xl font-bold tracking-tight dark:text-white">$4</span>
|
|
||||||
<span class="text-sm font-semibold leading-6 ">/month + VAT</span>
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p class="flex items-baseline gap-x-1">
|
|
||||||
<span x-show="selected === 'monthly'" x-cloak>
|
|
||||||
<span class="text-2xl font-bold tracking-tight dark:text-white">$3</span>
|
|
||||||
<span class="text-sm font-semibold leading-6 "> for any additional</span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span x-show="selected === 'yearly'" x-cloak>
|
|
||||||
<span class="text-4xl font-bold tracking-tight dark:text-white">$4</span>
|
|
||||||
<span class="text-sm font-semibold leading-6 ">/month + VAT</span>
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<span x-show="selected === 'monthly'" x-cloak>
|
|
||||||
<span>billed monthly (+VAT)</span>
|
|
||||||
</span>
|
|
||||||
<span x-show="selected === 'yearly'" x-cloak>
|
|
||||||
<span>billed annually</span>
|
|
||||||
</span>
|
|
||||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-basic"
|
|
||||||
class="w-full h-10 buyme" wire:click="subscribeStripe('dynamic-monthly')">
|
|
||||||
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
|
||||||
</x-forms.button>
|
|
||||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-basic"
|
|
||||||
class="w-full h-10 buyme" wire:click="subscribeStripe('dynamic-yearly')">
|
|
||||||
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
|
||||||
</x-forms.button>
|
|
||||||
<p class="mt-10 text-sm leading-6 dark:text-white h-[6.5rem]">Begin hosting your own services in the
|
|
||||||
cloud.
|
|
||||||
</p>
|
|
||||||
<ul role="list" class="space-y-3 text-sm leading-6 ">
|
|
||||||
<li class="flex">
|
|
||||||
<svg class="flex-none w-5 h-6 mr-3 dark:text-warning" viewBox="0 0 20 20"
|
|
||||||
fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd"
|
|
||||||
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.775 0 001.137-.089l4-5.5z"
|
|
||||||
clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
Connect <span class="px-1 font-bold dark:text-white">2</span> servers
|
|
||||||
</li>
|
|
||||||
<li class="flex gap-x-3">
|
|
||||||
<svg class="flex-none w-5 h-6 dark:text-warning" viewBox="0 0 20 20" fill="currentColor"
|
|
||||||
aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd"
|
|
||||||
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
|
|
||||||
clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
Included Email System
|
|
||||||
</li>
|
|
||||||
<li class="flex gap-x-3">
|
|
||||||
<svg class="flex-none w-5 h-6 dark:text-warning" viewBox="0 0 20 20" fill="currentColor"
|
|
||||||
aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd"
|
|
||||||
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
|
|
||||||
clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
Email Support
|
|
||||||
</li>
|
|
||||||
<li class="flex font-bold dark:text-white gap-x-3">
|
|
||||||
<svg width="512" height="512" class="flex-none w-5 h-6 text-green-600"
|
|
||||||
viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
|
||||||
stroke-width="2">
|
|
||||||
<path
|
|
||||||
d="M4 13a8 8 0 0 1 7 7a6 6 0 0 0 3-5a9 9 0 0 0 6-8a3 3 0 0 0-3-3a9 9 0 0 0-8 6a6 6 0 0 0-5 3" />
|
|
||||||
<path d="M7 14a6 6 0 0 0-3 6a6 6 0 0 0 6-3m4-8a1 1 0 1 0 2 0a1 1 0 1 0-2 0" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
+ All upcoming features
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<x-pricing-plans>
|
||||||
|
@if (config('subscription.provider') === 'stripe')
|
||||||
|
<x-slot:basic>
|
||||||
|
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-basic" class="w-full h-10 buyme"
|
||||||
|
wire:click="subscribeStripe('basic-monthly')">
|
||||||
|
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||||
|
</x-forms.button>
|
||||||
|
|
||||||
|
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-basic" class="w-full h-10 buyme"
|
||||||
|
wire:click="subscribeStripe('basic-yearly')">
|
||||||
|
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||||
|
</x-forms.button>
|
||||||
|
</x-slot:basic>
|
||||||
|
<x-slot:pro>
|
||||||
|
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-pro" class="w-full h-10 buyme"
|
||||||
|
wire:click="subscribeStripe('pro-monthly')">
|
||||||
|
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||||
|
</x-forms.button>
|
||||||
|
|
||||||
|
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-pro" class="w-full h-10 buyme"
|
||||||
|
wire:click="subscribeStripe('pro-yearly')"> {{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||||
|
</x-forms.button>
|
||||||
|
</x-slot:pro>
|
||||||
|
<x-slot:ultimate>
|
||||||
|
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-ultimate" class="w-full h-10 buyme"
|
||||||
|
wire:click="subscribeStripe('ultimate-monthly')">
|
||||||
|
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||||
|
</x-forms.button>
|
||||||
|
|
||||||
|
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-ultimate" class="w-full h-10 buyme"
|
||||||
|
wire:click="subscribeStripe('ultimate-yearly')"> {{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||||
|
</x-forms.button>
|
||||||
|
</x-slot:ultimate>
|
||||||
|
@endif
|
||||||
|
@if (config('subscription.provider') === 'paddle')
|
||||||
|
<x-paddle />
|
||||||
|
@endif
|
||||||
|
@if (config('subscription.provider') === 'lemon')
|
||||||
|
<x-slot:basic>
|
||||||
|
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-basic"
|
||||||
|
class="w-full h-10 buyme" wire:click="getSubscriptionLink('basic-monthly')"> Subscribe
|
||||||
|
</x-forms.button>
|
||||||
|
|
||||||
|
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-basic"
|
||||||
|
class="w-full h-10 buyme" wire:click="getSubscriptionLink('basic-yearly')"> Subscribe
|
||||||
|
</x-forms.button>
|
||||||
|
</x-slot:basic>
|
||||||
|
<x-slot:pro>
|
||||||
|
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-pro"
|
||||||
|
class="w-full h-10 buyme" wire:click="getSubscriptionLink('pro-monthly')"> Subscribe
|
||||||
|
</x-forms.button>
|
||||||
|
|
||||||
|
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-pro" class="w-full h-10 buyme"
|
||||||
|
wire:click="getSubscriptionLink('pro-yearly')"> Subscribe
|
||||||
|
</x-forms.button>
|
||||||
|
</x-slot:pro>
|
||||||
|
<x-slot:ultimate>
|
||||||
|
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-ultimate"
|
||||||
|
class="w-full h-10 buyme" wire:click="getSubscriptionLink('ultimate-monthly')"> Subscribe
|
||||||
|
</x-forms.button>
|
||||||
|
|
||||||
|
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-ultimate"
|
||||||
|
class="w-full h-10 buyme" wire:click="getSubscriptionLink('ultimate-yearly')"> Subscribe
|
||||||
|
</x-forms.button>
|
||||||
|
</x-slot:ultimate>
|
||||||
|
@endif
|
||||||
|
</x-pricing-plans>
|
||||||
@@ -1,67 +1,117 @@
|
|||||||
<x-pricing-plans>
|
<div x-data="{ selected: 'monthly' }" class="w-full pb-20">
|
||||||
@if (config('subscription.provider') === 'stripe')
|
<div class="max-w-3xl px-6 mx-auto lg:px-8">
|
||||||
<x-slot:basic>
|
<div class="flex justify-center">
|
||||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-basic" class="w-full h-10 buyme"
|
<fieldset
|
||||||
wire:click="subscribeStripe('basic-monthly')">
|
class="grid grid-cols-2 p-1 text-xs font-semibold leading-5 text-center rounded dark:text-white gap-x-1 bg-white/5">
|
||||||
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
<legend class="sr-only">Payment frequency</legend>
|
||||||
</x-forms.button>
|
<label class="cursor-pointer rounded px-2.5 py-1"
|
||||||
|
:class="selected === 'monthly' ? 'bg-coollabs-100 text-white' : ''">
|
||||||
|
<input type="radio" x-on:click="selected = 'monthly'" name="frequency" value="monthly"
|
||||||
|
class="sr-only">
|
||||||
|
<span>Monthly</span>
|
||||||
|
</label>
|
||||||
|
<label class="cursor-pointer rounded px-2.5 py-1"
|
||||||
|
:class="selected === 'yearly' ? 'bg-coollabs-100 text-white' : ''">
|
||||||
|
<input type="radio" x-on:click="selected = 'yearly'" name="frequency" value="annually"
|
||||||
|
class="sr-only">
|
||||||
|
<span>Annually</span>
|
||||||
|
</label>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
<div x-show="selected === 'monthly'" class="flex justify-center h-10 mt-3 text-sm leading-6 ">
|
||||||
|
<div>Save <span class="font-bold text-black dark:text-warning">10%</span> annually with the yearly plans.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div x-show="selected === 'yearly'" class="flex justify-center h-10 mt-3 text-sm leading-6 ">
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flow-root mt-12">
|
||||||
|
{{-- <div class="pb-10 text-xl text-center">For the detailed list of features, please visit our landing page: <a
|
||||||
|
class="font-bold underline dark:text-white" href="https://coolify.io">coolify.io</a></div> --}}
|
||||||
|
<div
|
||||||
|
class="grid max-w-sm grid-cols-1 -mt-16 divide-y divide-neutral-200 dark:divide-coolgray-500 isolate gap-y-16 sm:mx-auto lg:-mx-8 lg:mt-0 lg:max-w-none lg:grid-cols-1 lg:divide-x lg:divide-y-0 xl:-mx-4">
|
||||||
|
<div class="pt-16 lg:px-8 lg:pt-0 xl:px-14">
|
||||||
|
<h3 id="tier-dynamic" class="text-4xl font-semibold leading-7 dark:text-white">Pay-as-you-go</h3>
|
||||||
|
<p class="flex items-baseline mt-6 gap-x-1">
|
||||||
|
<span x-show="selected === 'monthly'" x-cloak>
|
||||||
|
<span class="text-4xl font-bold tracking-tight dark:text-white">$5</span>
|
||||||
|
<span class="text-sm font-semibold leading-6 "> for 2 servers</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-basic" class="w-full h-10 buyme"
|
<span x-show="selected === 'yearly'" x-cloak>
|
||||||
wire:click="subscribeStripe('basic-yearly')">
|
<span class="text-4xl font-bold tracking-tight dark:text-white">$4</span>
|
||||||
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
<span class="text-sm font-semibold leading-6 "> for 2 servers</span>
|
||||||
</x-forms.button>
|
</span>
|
||||||
</x-slot:basic>
|
</p>
|
||||||
<x-slot:pro>
|
<p class="flex items-baseline mb-4 gap-x-1">
|
||||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-pro" class="w-full h-10 buyme"
|
<span x-show="selected === 'monthly'" x-cloak>
|
||||||
wire:click="subscribeStripe('pro-monthly')">
|
<span class="text-sm font-semibold tracking-tight dark:text-white">$3</span>
|
||||||
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
<span class="text-sm font-semibold leading-6 "> per server from 3+ servers</span>
|
||||||
</x-forms.button>
|
</span>
|
||||||
|
|
||||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-pro" class="w-full h-10 buyme"
|
<span x-show="selected === 'yearly'" x-cloak>
|
||||||
wire:click="subscribeStripe('pro-yearly')"> {{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
<span class="text-sm font-semibold tracking-tight dark:text-white">$2.7</span>
|
||||||
</x-forms.button>
|
<span class="text-sm font-semibold leading-6 "> per server from 3+ servers</span>
|
||||||
</x-slot:pro>
|
</span>
|
||||||
<x-slot:ultimate>
|
</p>
|
||||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-ultimate" class="w-full h-10 buyme"
|
<span x-show="selected === 'monthly'" x-cloak>
|
||||||
wire:click="subscribeStripe('ultimate-monthly')">
|
<span class="dark:text-white p">billed monthly (+VAT)</span>
|
||||||
{{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
</span>
|
||||||
</x-forms.button>
|
<span x-show="selected === 'yearly'" x-cloak>
|
||||||
|
<span class="dark:text-white">billed annually (+VAT)</span>
|
||||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-ultimate" class="w-full h-10 buyme"
|
</span>
|
||||||
wire:click="subscribeStripe('ultimate-yearly')"> {{ $isTrial ? 'Start Trial' : 'Subscribe' }}
|
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-basic"
|
||||||
</x-forms.button>
|
class="w-full h-10 buyme" wire:click="subscribeStripe('dynamic-monthly')">
|
||||||
</x-slot:ultimate>
|
Subscribe
|
||||||
@endif
|
</x-forms.button>
|
||||||
@if (config('subscription.provider') === 'paddle')
|
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-basic"
|
||||||
<x-paddle />
|
class="w-full h-10 buyme" wire:click="subscribeStripe('dynamic-yearly')">
|
||||||
@endif
|
Subscribe
|
||||||
@if (config('subscription.provider') === 'lemon')
|
</x-forms.button>
|
||||||
<x-slot:basic>
|
<ul role="list" class="pt-6 space-y-3 text-sm leading-6">
|
||||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-basic"
|
<li class="flex">
|
||||||
class="w-full h-10 buyme" wire:click="getSubscriptionLink('basic-monthly')"> Subscribe
|
<svg class="flex-none w-5 h-6 mr-3 dark:text-warning" viewBox="0 0 20 20"
|
||||||
</x-forms.button>
|
fill="currentColor" aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-basic"
|
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.775 0 001.137-.089l4-5.5z"
|
||||||
class="w-full h-10 buyme" wire:click="getSubscriptionLink('basic-yearly')"> Subscribe
|
clip-rule="evenodd" />
|
||||||
</x-forms.button>
|
</svg>
|
||||||
</x-slot:basic>
|
Connect <span class="px-1 font-bold dark:text-white">unlimited</span> servers
|
||||||
<x-slot:pro>
|
</li>
|
||||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-pro"
|
<li class="flex gap-x-3">
|
||||||
class="w-full h-10 buyme" wire:click="getSubscriptionLink('pro-monthly')"> Subscribe
|
<svg class="flex-none w-5 h-6 dark:text-warning" viewBox="0 0 20 20" fill="currentColor"
|
||||||
</x-forms.button>
|
aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-pro" class="w-full h-10 buyme"
|
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
|
||||||
wire:click="getSubscriptionLink('pro-yearly')"> Subscribe
|
clip-rule="evenodd" />
|
||||||
</x-forms.button>
|
</svg>
|
||||||
</x-slot:pro>
|
Free Email Notifications
|
||||||
<x-slot:ultimate>
|
</li>
|
||||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-ultimate"
|
<li class="flex gap-x-3">
|
||||||
class="w-full h-10 buyme" wire:click="getSubscriptionLink('ultimate-monthly')"> Subscribe
|
<svg class="flex-none w-5 h-6 dark:text-warning" viewBox="0 0 20 20" fill="currentColor"
|
||||||
</x-forms.button>
|
aria-hidden="true">
|
||||||
|
<path fill-rule="evenodd"
|
||||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-ultimate"
|
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
|
||||||
class="w-full h-10 buyme" wire:click="getSubscriptionLink('ultimate-yearly')"> Subscribe
|
clip-rule="evenodd" />
|
||||||
</x-forms.button>
|
</svg>
|
||||||
</x-slot:ultimate>
|
Support by Email
|
||||||
@endif
|
</li>
|
||||||
</x-pricing-plans>
|
<li class="flex font-bold dark:text-white gap-x-3">
|
||||||
|
<svg width="512" height="512" class="flex-none w-5 h-6 text-green-600"
|
||||||
|
viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
stroke-width="2">
|
||||||
|
<path
|
||||||
|
d="M4 13a8 8 0 0 1 7 7a6 6 0 0 0 3-5a9 9 0 0 0 6-8a3 3 0 0 0-3-3a9 9 0 0 0-8 6a6 6 0 0 0-5 3" />
|
||||||
|
<path d="M7 14a6 6 0 0 0-3 6a6 6 0 0 0 6-3m4-8a1 1 0 1 0 2 0a1 1 0 1 0-2 0" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
+ All upcoming features
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -8,10 +8,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="grid gap-2 lg:grid-cols-2">
|
<div class="grid gap-2 lg:grid-cols-2">
|
||||||
@forelse ($privateKeys as $key)
|
@forelse ($privateKeys as $key)
|
||||||
<a class="text-center hover:no-underline box group"
|
<a class="box"
|
||||||
href="{{ route('security.private-key.show', ['private_key_uuid' => data_get($key, 'uuid')]) }}">
|
href="{{ route('security.private-key.show', ['private_key_uuid' => data_get($key, 'uuid')]) }}">
|
||||||
<div class="group-hover:dark:text-white">
|
<div class="flex flex-col mx-6">
|
||||||
<div>{{ $key->name }}</div>
|
<div class="box-title">
|
||||||
|
{{ data_get($key, 'name') }}
|
||||||
|
</div>
|
||||||
|
<div class="box-description">
|
||||||
|
{{ $key->description }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@empty
|
@empty
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ Route::middleware(['auth', 'verified'])->group(function () {
|
|||||||
|
|
||||||
// Route::get('/security', fn () => view('security.index'))->name('security.index');
|
// Route::get('/security', fn () => view('security.index'))->name('security.index');
|
||||||
Route::get('/security/private-key', fn () => view('security.private-key.index', [
|
Route::get('/security/private-key', fn () => view('security.private-key.index', [
|
||||||
'privateKeys' => PrivateKey::ownedByCurrentTeam(['name', 'uuid', 'is_git_related'])->get()
|
'privateKeys' => PrivateKey::ownedByCurrentTeam(['name', 'uuid', 'is_git_related', 'description'])->get()
|
||||||
]))->name('security.private-key.index');
|
]))->name('security.private-key.index');
|
||||||
// Route::get('/security/private-key/new', SecurityPrivateKeyCreate::class)->name('security.private-key.create');
|
// Route::get('/security/private-key/new', SecurityPrivateKeyCreate::class)->name('security.private-key.create');
|
||||||
Route::get('/security/private-key/{private_key_uuid}', SecurityPrivateKeyShow::class)->name('security.private-key.show');
|
Route::get('/security/private-key/{private_key_uuid}', SecurityPrivateKeyShow::class)->name('security.private-key.show');
|
||||||
@@ -247,10 +247,16 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::get('/download/backup/{executionId}', function () {
|
Route::get('/download/backup/{executionId}', function () {
|
||||||
try {
|
try {
|
||||||
$team = auth()->user()->currentTeam();
|
$team = auth()->user()->currentTeam();
|
||||||
|
if (is_null($team)) {
|
||||||
|
return response()->json(['message' => 'Team not found.'], 404);
|
||||||
|
}
|
||||||
$exeuctionId = request()->route('executionId');
|
$exeuctionId = request()->route('executionId');
|
||||||
$execution = ScheduledDatabaseBackupExecution::where('id', $exeuctionId)->firstOrFail();
|
$execution = ScheduledDatabaseBackupExecution::where('id', $exeuctionId)->firstOrFail();
|
||||||
// // get team
|
$execution_team_id = $execution->scheduledDatabaseBackup->database->team()?->id;
|
||||||
if ($team->id !== $execution->scheduledDatabaseBackup->database->team()->id) {
|
if (is_null($execution_team_id)) {
|
||||||
|
return response()->json(['message' => 'Team not found.'], 404);
|
||||||
|
}
|
||||||
|
if ($team->id !== $execution_team_id) {
|
||||||
return response()->json(['message' => 'Permission denied.'], 403);
|
return response()->json(['message' => 'Permission denied.'], 403);
|
||||||
}
|
}
|
||||||
if (is_null($execution)) {
|
if (is_null($execution)) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ docker network create --attachable coolify 2>/dev/null
|
|||||||
|
|
||||||
if [ -f /data/coolify/source/docker-compose.custom.yml ]; then
|
if [ -f /data/coolify/source/docker-compose.custom.yml ]; then
|
||||||
echo "docker-compose.custom.yml detected."
|
echo "docker-compose.custom.yml detected."
|
||||||
docker run --pull always -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml -f /data/coolify/source/docker-compose.custom.yml up -d --pull always --remove-orphans --force-recreate"
|
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml -f /data/coolify/source/docker-compose.custom.yml up -d --pull always --remove-orphans --force-recreate"
|
||||||
else
|
else
|
||||||
docker run --pull always -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --pull always --remove-orphans --force-recreate"
|
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-helper bash -c "LATEST_IMAGE=${1:-} docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --pull always --remove-orphans --force-recreate"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"coolify": {
|
"coolify": {
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.270"
|
"version": "4.0.0-beta.272"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user