mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-18 12:33:06 +00:00
Compare commits
137 Commits
v4.0.0-bet
...
v4.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83a3871d43 | ||
|
|
8b6023c45a | ||
|
|
a401d4e760 | ||
|
|
a8520f6593 | ||
|
|
9a95d207cf | ||
|
|
c75d779f85 | ||
|
|
b8f2066408 | ||
|
|
cc48b6cd96 | ||
|
|
b36c735445 | ||
|
|
5f0f26a3ac | ||
|
|
6b81eaa65d | ||
|
|
644f15e80d | ||
|
|
a8ddf4c2df | ||
|
|
3f9833117e | ||
|
|
6140d0c849 | ||
|
|
f4cb7cea21 | ||
|
|
140ec1f90f | ||
|
|
31d7220785 | ||
|
|
38e1d36684 | ||
|
|
6397655f7d | ||
|
|
821bfe68c1 | ||
|
|
596eaa7590 | ||
|
|
08fd0f0fa9 | ||
|
|
77c925ce4b | ||
|
|
3338352b41 | ||
|
|
e3aa4143c7 | ||
|
|
0a93808076 | ||
|
|
0cc21f9b99 | ||
|
|
d3543ea291 | ||
|
|
e824f7a28c | ||
|
|
56be0744f0 | ||
|
|
d874c71e0b | ||
|
|
487177af87 | ||
|
|
0452a4e1ac | ||
|
|
959a03214a | ||
|
|
fe22dfc531 | ||
|
|
139e258664 | ||
|
|
d1ab14966b | ||
|
|
40ff3c731e | ||
|
|
75d77a3648 | ||
|
|
921da7242d | ||
|
|
67c9937e67 | ||
|
|
bdcb3af6fa | ||
|
|
17e81ab6bd | ||
|
|
70e1ec2cd2 | ||
|
|
c6a7fd405b | ||
|
|
4f0d1704c4 | ||
|
|
a966a5097e | ||
|
|
080db4d462 | ||
|
|
4af766162e | ||
|
|
57d67bc4a8 | ||
|
|
16278f36ec | ||
|
|
05c6d67cab | ||
|
|
0c516843d8 | ||
|
|
d400ac57d5 | ||
|
|
2644efd9f7 | ||
|
|
11baa97ef6 | ||
|
|
c36636bd2d | ||
|
|
6bb05a6780 | ||
|
|
360f5db2cf | ||
|
|
bbbeacee4d | ||
|
|
94ad56fc96 | ||
|
|
3df80f2653 | ||
|
|
bb6c9cf49e | ||
|
|
ae12222687 | ||
|
|
094dfde048 | ||
|
|
714b887274 | ||
|
|
8cfa88eff8 | ||
|
|
3976b57100 | ||
|
|
bbcf484f7f | ||
|
|
249f35f948 | ||
|
|
b71f1a79c8 | ||
|
|
e4aa3d310f | ||
|
|
99f57269fb | ||
|
|
93def3a557 | ||
|
|
a04674d93d | ||
|
|
539cc187a8 | ||
|
|
fcdd975751 | ||
|
|
8a4c2bf208 | ||
|
|
50c5d533b0 | ||
|
|
f952553c76 | ||
|
|
9a9be466f7 | ||
|
|
bbad029aa1 | ||
|
|
eb748554c5 | ||
|
|
c8b494e909 | ||
|
|
bd7fd725f6 | ||
|
|
3e0440ba53 | ||
|
|
83a29f8d85 | ||
|
|
8551e6e74a | ||
|
|
3582cb3f46 | ||
|
|
23de13b82c | ||
|
|
93acd4f18f | ||
|
|
96883dabe3 | ||
|
|
da521020f6 | ||
|
|
ac78738061 | ||
|
|
b78ca71c0f | ||
|
|
cd7272d00a | ||
|
|
cd7489c569 | ||
|
|
1f3f369df0 | ||
|
|
911e29f2ea | ||
|
|
d7b359e432 | ||
|
|
0b2c92cbe5 | ||
|
|
f626d964c5 | ||
|
|
b0e0b38549 | ||
|
|
94af4b2c7b | ||
|
|
0b235e146f | ||
|
|
40f3301324 | ||
|
|
4fe90e59a8 | ||
|
|
b28611ed08 | ||
|
|
672ad22e4f | ||
|
|
c17bd5ec3a | ||
|
|
2770755f9d | ||
|
|
ee69cdbf7b | ||
|
|
a72a25640f | ||
|
|
e86f8ddd09 | ||
|
|
66bdb39f1a | ||
|
|
aa368c3a63 | ||
|
|
b499a2ab87 | ||
|
|
49e4482947 | ||
|
|
6e7e4250e6 | ||
|
|
5a8ea15c4f | ||
|
|
f9aa029e8e | ||
|
|
6653e379b3 | ||
|
|
930a611374 | ||
|
|
51e918be6d | ||
|
|
b0170eea8f | ||
|
|
144b34ca2e | ||
|
|
676c022e41 | ||
|
|
7c0b98bb70 | ||
|
|
7779713392 | ||
|
|
5e1396025c | ||
|
|
d09c88f71c | ||
|
|
7980f21b1b | ||
|
|
c75ce9cbba | ||
|
|
4fb4e19e99 | ||
|
|
379212b8fe | ||
|
|
c4dfd99a8c |
1
.github/pull_request_template.md
vendored
Normal file
1
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
> Always use `next` branch as destination branch for PRs, not `main`
|
||||
@@ -30,5 +30,5 @@ Your horizon (Laravel scheduler): `localhost:8000/horizon` - Only reachable if y
|
||||
Mails are caught by Mailpit: `localhost:8025`
|
||||
|
||||
## New Service Contribution
|
||||
Check out the docs [here](https://coolify.io/docs/resources/services/add-service).
|
||||
Check out the docs [here](https://coolify.io/docs/knowledge-base/add-a-service).
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class CleanupStuckedResources extends Command
|
||||
$keydbs = StandaloneKeydb::withTrashed()->whereNotNull('deleted_at')->get();
|
||||
foreach ($keydbs as $keydb) {
|
||||
echo "Deleting stuck keydb: {$keydb->name}\n";
|
||||
$redis->forceDelete();
|
||||
$keydb->forceDelete();
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
echo "Error in cleaning stuck keydb: {$e->getMessage()}\n";
|
||||
@@ -71,7 +71,7 @@ class CleanupStuckedResources extends Command
|
||||
$dragonflies = StandaloneDragonfly::withTrashed()->whereNotNull('deleted_at')->get();
|
||||
foreach ($dragonflies as $dragonfly) {
|
||||
echo "Deleting stuck dragonfly: {$dragonfly->name}\n";
|
||||
$redis->forceDelete();
|
||||
$dragonfly->forceDelete();
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
echo "Error in cleaning stuck dragonfly: {$e->getMessage()}\n";
|
||||
@@ -80,7 +80,7 @@ class CleanupStuckedResources extends Command
|
||||
$clickhouses = StandaloneClickhouse::withTrashed()->whereNotNull('deleted_at')->get();
|
||||
foreach ($clickhouses as $clickhouse) {
|
||||
echo "Deleting stuck clickhouse: {$clickhouse->name}\n";
|
||||
$redis->forceDelete();
|
||||
$clickhouse->forceDelete();
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
echo "Error in cleaning stuck clickhouse: {$e->getMessage()}\n";
|
||||
|
||||
@@ -20,6 +20,7 @@ class Init extends Command
|
||||
public function handle()
|
||||
{
|
||||
$this->alive();
|
||||
get_public_ips();
|
||||
$full_cleanup = $this->option('full-cleanup');
|
||||
$cleanup_deployments = $this->option('cleanup-deployments');
|
||||
if ($cleanup_deployments) {
|
||||
@@ -56,6 +57,7 @@ class Init extends Command
|
||||
$this->cleanup_stucked_helper_containers();
|
||||
$this->call('cleanup:stucked-resources');
|
||||
}
|
||||
|
||||
private function restore_coolify_db_backup()
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -46,7 +46,7 @@ class Kernel extends ConsoleKernel
|
||||
$this->instance_auto_update($schedule);
|
||||
$this->check_scheduled_backups($schedule);
|
||||
$this->check_resources($schedule);
|
||||
// $this->pull_helper_image($schedule);
|
||||
$this->pull_helper_image($schedule);
|
||||
$this->check_scheduled_tasks($schedule);
|
||||
|
||||
$schedule->command('cleanup:database --yes')->daily();
|
||||
@@ -72,18 +72,18 @@ class Kernel extends ConsoleKernel
|
||||
$containerServers = $servers->where('settings.is_swarm_worker', false)->where('settings.is_build_server', false);
|
||||
}
|
||||
foreach ($containerServers as $server) {
|
||||
$schedule->job(new ContainerStatusJob($server))->everyTwoMinutes()->onOneServer();
|
||||
$schedule->job(new ContainerStatusJob($server))->everyMinute()->onOneServer();
|
||||
if ($server->isLogDrainEnabled()) {
|
||||
$schedule->job(new CheckLogDrainContainerJob($server))->everyTwoMinutes()->onOneServer();
|
||||
$schedule->job(new CheckLogDrainContainerJob($server))->everyMinute()->onOneServer();
|
||||
}
|
||||
}
|
||||
foreach ($servers as $server) {
|
||||
$schedule->job(new ServerStatusJob($server))->everyTwoMinutes()->onOneServer();
|
||||
$schedule->job(new ServerStatusJob($server))->everyMinute()->onOneServer();
|
||||
}
|
||||
}
|
||||
private function instance_auto_update($schedule)
|
||||
{
|
||||
if (isDev()) {
|
||||
if (isDev() || isCloud()) {
|
||||
return;
|
||||
}
|
||||
$settings = InstanceSettings::get();
|
||||
|
||||
@@ -95,7 +95,6 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
private ?string $buildTarget = null;
|
||||
private Collection $saved_outputs;
|
||||
private ?string $full_healthcheck_url = null;
|
||||
private bool $custom_healthcheck_found = false;
|
||||
|
||||
private string $serverUser = 'root';
|
||||
private string $serverUserHomeDir = '/root';
|
||||
@@ -710,7 +709,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
private function save_environment_variables()
|
||||
{
|
||||
$envs = collect([]);
|
||||
$ports = $this->application->settings->is_static ? [80] : $this->application->ports_exposes_array;
|
||||
$ports = $this->application->main_port();
|
||||
if ($this->pull_request_id !== 0) {
|
||||
$this->env_filename = ".env-pr-$this->pull_request_id";
|
||||
foreach ($this->application->environment_variables_preview as $env) {
|
||||
@@ -718,28 +717,33 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
if ($env->version === '4.0.0-beta.239') {
|
||||
$real_value = $env->real_value;
|
||||
} else {
|
||||
$real_value = escapeEnvVariables($env->real_value);
|
||||
}
|
||||
if ($env->is_literal) {
|
||||
$real_value = '\'' . $real_value . '\'';
|
||||
if ($env->is_literal) {
|
||||
$real_value = '\'' . $real_value . '\'';
|
||||
} else {
|
||||
$real_value = escapeEnvVariables($env->real_value);
|
||||
}
|
||||
}
|
||||
$envs->push($env->key . '=' . $real_value);
|
||||
}
|
||||
// Add PORT if not exists, use the first port as default
|
||||
if ($this->application->environment_variables_preview->filter(fn ($env) => Str::of($env)->startsWith('PORT'))->isEmpty()) {
|
||||
if ($this->application->environment_variables_preview->where('key', 'PORT')->isEmpty()) {
|
||||
$envs->push("PORT={$ports[0]}");
|
||||
}
|
||||
// Add HOST if not exists
|
||||
if ($this->application->environment_variables_preview->filter(fn ($env) => Str::of($env)->startsWith('HOST'))->isEmpty()) {
|
||||
if ($this->application->environment_variables_preview->where('key', 'HOST')->isEmpty()) {
|
||||
$envs->push("HOST=0.0.0.0");
|
||||
}
|
||||
if ($this->application->environment_variables_preview->filter(fn ($env) => Str::of($env)->startsWith('SOURCE_COMMIT'))->isEmpty()) {
|
||||
// Add SOURCE_COMMIT if not exists
|
||||
if ($this->application->environment_variables_preview->where('key', 'SOURCE_COMMIT')->isEmpty()) {
|
||||
if (!is_null($this->commit)) {
|
||||
$envs->push("SOURCE_COMMIT={$this->commit}");
|
||||
} else {
|
||||
$envs->push("SOURCE_COMMIT=unknown");
|
||||
}
|
||||
}
|
||||
$envs = $envs->sort(function ($a, $b) {
|
||||
return strpos($a, '$') === false ? -1 : 1;
|
||||
});
|
||||
} else {
|
||||
$this->env_filename = ".env";
|
||||
foreach ($this->application->environment_variables as $env) {
|
||||
@@ -747,22 +751,24 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
if ($env->version === '4.0.0-beta.239') {
|
||||
$real_value = $env->real_value;
|
||||
} else {
|
||||
$real_value = escapeEnvVariables($env->real_value);
|
||||
}
|
||||
if ($env->is_literal) {
|
||||
$real_value = '\'' . $real_value . '\'';
|
||||
if ($env->is_literal) {
|
||||
$real_value = '\'' . $real_value . '\'';
|
||||
} else {
|
||||
$real_value = escapeEnvVariables($env->real_value);
|
||||
}
|
||||
}
|
||||
$envs->push($env->key . '=' . $real_value);
|
||||
}
|
||||
// Add PORT if not exists, use the first port as default
|
||||
if ($this->application->environment_variables->filter(fn ($env) => Str::of($env)->startsWith('PORT'))->isEmpty()) {
|
||||
if ($this->application->environment_variables->where('key', 'PORT')->isEmpty()) {
|
||||
$envs->push("PORT={$ports[0]}");
|
||||
}
|
||||
// Add HOST if not exists
|
||||
if ($this->application->environment_variables->filter(fn ($env) => Str::of($env)->startsWith('HOST'))->isEmpty()) {
|
||||
if ($this->application->environment_variables->where('key', 'HOST')->isEmpty()) {
|
||||
$envs->push("HOST=0.0.0.0");
|
||||
}
|
||||
if ($this->application->environment_variables->filter(fn ($env) => Str::of($env)->startsWith('SOURCE_COMMIT'))->isEmpty()) {
|
||||
// Add SOURCE_COMMIT if not exists
|
||||
if ($this->application->environment_variables->where('key', 'SOURCE_COMMIT')->isEmpty()) {
|
||||
if (!is_null($this->commit)) {
|
||||
$envs->push("SOURCE_COMMIT={$this->commit}");
|
||||
} else {
|
||||
@@ -775,6 +781,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
}
|
||||
|
||||
if ($envs->isEmpty()) {
|
||||
$this->env_filename = null;
|
||||
if ($this->use_build_server) {
|
||||
$this->server = $this->original_server;
|
||||
}
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
"command" => "rm -f $this->configuration_dir/{$this->env_filename}",
|
||||
@@ -782,8 +792,28 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
"ignore_errors" => true
|
||||
]
|
||||
);
|
||||
$this->env_filename = null;
|
||||
return;
|
||||
if ($this->use_build_server) {
|
||||
$this->server = $this->build_server;
|
||||
}
|
||||
} else {
|
||||
$envs_base64 = base64_encode($envs->implode("\n"));
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
executeInDocker($this->deployment_uuid, "echo '$envs_base64' | base64 -d | tee $this->workdir/{$this->env_filename} > /dev/null")
|
||||
],
|
||||
|
||||
);
|
||||
if ($this->use_build_server) {
|
||||
$this->server = $this->original_server;
|
||||
}
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
"echo '$envs_base64' | base64 -d | tee $this->configuration_dir/{$this->env_filename} > /dev/null"
|
||||
]
|
||||
);
|
||||
if ($this->use_build_server) {
|
||||
$this->server = $this->build_server;
|
||||
}
|
||||
}
|
||||
// $this->execute_remote_command([
|
||||
// executeInDocker($this->deployment_uuid, "cat $this->workdir/.env 2>/dev/null || true"),
|
||||
@@ -806,15 +836,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
// ]
|
||||
// );
|
||||
// }
|
||||
$envs_base64 = base64_encode($envs->implode("\n"));
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
executeInDocker($this->deployment_uuid, "echo '$envs_base64' | base64 -d | tee $this->workdir/{$this->env_filename} > /dev/null")
|
||||
],
|
||||
[
|
||||
"echo '$envs_base64' | base64 -d | tee $this->configuration_dir/{$this->env_filename} > /dev/null"
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -880,10 +902,13 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
if ($this->server->isSwarm()) {
|
||||
// Implement healthcheck for swarm
|
||||
} else {
|
||||
if ($this->application->isHealthcheckDisabled() && $this->custom_healthcheck_found === false) {
|
||||
if ($this->application->isHealthcheckDisabled() && $this->application->custom_healthcheck_found === false) {
|
||||
$this->newVersionIsHealthy = true;
|
||||
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);
|
||||
if ($this->container_name) {
|
||||
$counter = 1;
|
||||
@@ -891,6 +916,12 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
if ($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) {
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
@@ -913,7 +944,11 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
break;
|
||||
}
|
||||
$counter++;
|
||||
Sleep::for($this->application->health_check_interval)->seconds();
|
||||
$sleeptime = 0;
|
||||
while ($sleeptime < $this->application->health_check_interval) {
|
||||
Sleep::for(1)->seconds();
|
||||
$sleeptime++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -978,10 +1013,6 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
}
|
||||
$this->application_deployment_queue->addLogEntry("Preparing container with helper image: $helperImage.");
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
"command" => "docker pull -q {$helperImage}",
|
||||
"hidden" => true
|
||||
],
|
||||
[
|
||||
"command" => "docker rm -f {$this->deployment_uuid}",
|
||||
"ignore_errors" => true,
|
||||
@@ -1197,7 +1228,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
private function generate_compose_file()
|
||||
{
|
||||
$this->create_workdir();
|
||||
$ports = $this->application->settings->is_static ? [80] : $this->application->ports_exposes_array;
|
||||
$ports = $this->application->main_port();
|
||||
$onlyPort = null;
|
||||
if (count($ports) > 0) {
|
||||
$onlyPort = $ports[0];
|
||||
@@ -1243,16 +1274,14 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
return escapeDollarSign($value);
|
||||
});
|
||||
$labels = $labels->merge(defaultLabels($this->application->id, $this->application->uuid, $this->pull_request_id))->toArray();
|
||||
|
||||
// Check for custom HEALTHCHECK
|
||||
$this->custom_healthcheck_found = false;
|
||||
if ($this->application->build_pack === 'dockerfile' || $this->application->dockerfile) {
|
||||
$this->execute_remote_command([
|
||||
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"));
|
||||
if (str($dockerfile)->contains('HEALTHCHECK')) {
|
||||
$this->custom_healthcheck_found = true;
|
||||
}
|
||||
$this->application->parseHealthcheckFromDockerfile($dockerfile);
|
||||
}
|
||||
$docker_compose = [
|
||||
'version' => '3.8',
|
||||
@@ -1295,21 +1324,20 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
// $docker_compose['services'][$this->container_name]['env_file'] = [$this->env_filename];
|
||||
// }
|
||||
// }
|
||||
if ($this->env_filename) {
|
||||
if (!is_null($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'] = [
|
||||
'test' => [
|
||||
'CMD-SHELL',
|
||||
$this->generate_healthcheck_commands()
|
||||
],
|
||||
'interval' => $this->application->health_check_interval . 's',
|
||||
'timeout' => $this->application->health_check_timeout . 's',
|
||||
'retries' => $this->application->health_check_retries,
|
||||
'start_period' => $this->application->health_check_start_period . 's'
|
||||
];
|
||||
}
|
||||
$docker_compose['services'][$this->container_name]['healthcheck'] = [
|
||||
'test' => [
|
||||
'CMD-SHELL',
|
||||
$this->generate_healthcheck_commands()
|
||||
],
|
||||
'interval' => $this->application->health_check_interval . 's',
|
||||
'timeout' => $this->application->health_check_timeout . 's',
|
||||
'retries' => $this->application->health_check_retries,
|
||||
'start_period' => $this->application->health_check_start_period . 's'
|
||||
];
|
||||
|
||||
if (!is_null($this->application->limits_cpuset)) {
|
||||
data_set($docker_compose, 'services.' . $this->container_name . '.cpuset', $this->application->limits_cpuset);
|
||||
}
|
||||
@@ -1491,7 +1519,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
return $local_persistent_volumes_names;
|
||||
}
|
||||
|
||||
private function generate_environment_variables($ports)
|
||||
/*private function generate_environment_variables($ports)
|
||||
{
|
||||
$environment_variables = collect();
|
||||
if ($this->pull_request_id === 0) {
|
||||
@@ -1509,8 +1537,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
}
|
||||
if ($env->is_literal) {
|
||||
$real_value = escapeDollarSign($real_value);
|
||||
$environment_variables->push("$env->key='$real_value'");
|
||||
} else {
|
||||
$environment_variables->push("$env->key=$real_value");
|
||||
}
|
||||
$environment_variables->push("$env->key=$real_value");
|
||||
}
|
||||
foreach ($this->application->nixpacks_environment_variables as $env) {
|
||||
if ($env->version === '4.0.0-beta.239') {
|
||||
@@ -1520,8 +1550,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
}
|
||||
if ($env->is_literal) {
|
||||
$real_value = escapeDollarSign($real_value);
|
||||
$environment_variables->push("$env->key='$real_value'");
|
||||
} else {
|
||||
$environment_variables->push("$env->key=$real_value");
|
||||
}
|
||||
$environment_variables->push("$env->key=$real_value");
|
||||
}
|
||||
} else {
|
||||
foreach ($this->application->runtime_environment_variables_preview as $env) {
|
||||
@@ -1532,8 +1564,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
}
|
||||
if ($env->is_literal) {
|
||||
$real_value = escapeDollarSign($real_value);
|
||||
$environment_variables->push("$env->key='$real_value'");
|
||||
} else {
|
||||
$environment_variables->push("$env->key=$real_value");
|
||||
}
|
||||
$environment_variables->push("$env->key=$real_value");
|
||||
}
|
||||
foreach ($this->application->nixpacks_environment_variables_preview as $env) {
|
||||
if ($env->version === '4.0.0-beta.239') {
|
||||
@@ -1543,8 +1577,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
}
|
||||
if ($env->is_literal) {
|
||||
$real_value = escapeDollarSign($real_value);
|
||||
$environment_variables->push("$env->key='$real_value'");
|
||||
} else {
|
||||
$environment_variables->push("$env->key=$real_value");
|
||||
}
|
||||
$environment_variables->push("$env->key=$real_value");
|
||||
}
|
||||
}
|
||||
// Add PORT if not exists, use the first port as default
|
||||
@@ -1562,15 +1598,16 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
||||
$environment_variables->push("SOURCE_COMMIT=unknown");
|
||||
}
|
||||
}
|
||||
ray($environment_variables->all());
|
||||
return $environment_variables->all();
|
||||
}
|
||||
}*/
|
||||
|
||||
private function generate_healthcheck_commands()
|
||||
{
|
||||
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.
|
||||
return 'exit 0';
|
||||
}
|
||||
// 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.
|
||||
// return 'exit 0';
|
||||
// }
|
||||
if (!$this->application->health_check_port) {
|
||||
$health_check_port = $this->application->ports_exposes_array[0];
|
||||
} else {
|
||||
|
||||
@@ -289,7 +289,7 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
||||
if ($this->backup->save_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([
|
||||
'status' => 'success',
|
||||
'message' => $this->backup_output,
|
||||
@@ -305,8 +305,7 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
||||
]);
|
||||
}
|
||||
send_internal_notification('DatabaseBackupJob failed with: ' . $e->getMessage());
|
||||
$this->team?->notify(new BackupFailed($this->backup, $this->database, $this->backup_output));
|
||||
throw $e;
|
||||
$this->team?->notify(new BackupFailed($this->backup, $this->database, $this->backup_output, $database));
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
@@ -319,10 +318,15 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
||||
private function backup_standalone_mongodb(string $databaseWithCollections): void
|
||||
{
|
||||
try {
|
||||
ray($this->database->toArray());
|
||||
$url = $this->database->get_db_url(useInternal: true);
|
||||
if ($databaseWithCollections === 'all') {
|
||||
$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 {
|
||||
if (str($databaseWithCollections)->contains(':')) {
|
||||
$databaseName = str($databaseWithCollections)->before(':');
|
||||
@@ -333,9 +337,17 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
||||
}
|
||||
$commands[] = "mkdir -p " . $this->backup_dir;
|
||||
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 {
|
||||
$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);
|
||||
|
||||
@@ -15,7 +15,8 @@ class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique, ShouldBeEncr
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public $timeout = 120;
|
||||
public $timeout = 600;
|
||||
public $tries = 1;
|
||||
|
||||
public function __construct(private bool $force = false)
|
||||
{
|
||||
|
||||
@@ -20,11 +20,12 @@ class SendMessageToDiscordJob implements ShouldQueue, ShouldBeEncrypted
|
||||
* @var int
|
||||
*/
|
||||
public $tries = 5;
|
||||
public $backoff = 10;
|
||||
|
||||
/**
|
||||
* The maximum number of unhandled exceptions to allow before failing.
|
||||
*/
|
||||
public int $maxExceptions = 3;
|
||||
public int $maxExceptions = 5;
|
||||
|
||||
public function __construct(
|
||||
public string $text,
|
||||
|
||||
@@ -57,7 +57,7 @@ class SendMessageToTelegramJob implements ShouldQueue, ShouldBeEncrypted
|
||||
}
|
||||
}
|
||||
$payload = [
|
||||
'parse_mode' => 'markdown',
|
||||
// 'parse_mode' => 'markdown',
|
||||
'reply_markup' => json_encode([
|
||||
'inline_keyboard' => [
|
||||
[...$inlineButtons],
|
||||
|
||||
@@ -38,11 +38,12 @@ class ServerStatusJob implements ShouldQueue, ShouldBeEncrypted
|
||||
public function handle()
|
||||
{
|
||||
if (!$this->server->isServerReady($this->tries)) {
|
||||
throw new \RuntimeException('Server is not ready.');
|
||||
return "Server is not ready yet.";
|
||||
};
|
||||
try {
|
||||
if ($this->server->isFunctional()) {
|
||||
$this->cleanup(notify: false);
|
||||
$this->removeCoolifyYaml();
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
send_internal_notification('ServerStatusJob failed with: ' . $e->getMessage());
|
||||
@@ -50,6 +51,16 @@ class ServerStatusJob implements ShouldQueue, ShouldBeEncrypted
|
||||
return handleError($e);
|
||||
}
|
||||
}
|
||||
private function removeCoolifyYaml()
|
||||
{
|
||||
// This will remote the coolify.yaml file from the server as it is not needed on cloud servers
|
||||
if (isCloud() && $this->server->id !== 0) {
|
||||
$file = $this->server->proxyPath() . "/dynamic/coolify.yaml";
|
||||
return instant_remote_process([
|
||||
"rm -f $file",
|
||||
], $this->server, false);
|
||||
}
|
||||
}
|
||||
public function cleanup(bool $notify = false): void
|
||||
{
|
||||
$this->disk_usage = $this->server->getDiskUsage();
|
||||
|
||||
@@ -27,6 +27,8 @@ class Advanced extends Component
|
||||
'application.settings.gpu_count' => 'string|required',
|
||||
'application.settings.gpu_device_ids' => 'string|required',
|
||||
'application.settings.gpu_options' => 'string|required',
|
||||
'application.settings.is_raw_compose_deployment_enabled' => 'boolean|required',
|
||||
'application.settings.connect_to_docker_network' => 'boolean|required',
|
||||
];
|
||||
public function mount() {
|
||||
$this->is_force_https_enabled = $this->application->isForceHttpsEnabled();
|
||||
@@ -54,8 +56,14 @@ class Advanced extends Component
|
||||
$this->application->settings->is_stripprefix_enabled = $this->is_stripprefix_enabled;
|
||||
$this->dispatch('resetDefaultLabels', false);
|
||||
}
|
||||
if ($this->application->settings->is_raw_compose_deployment_enabled) {
|
||||
$this->application->parseRawCompose();
|
||||
} else {
|
||||
$this->application->parseCompose();
|
||||
}
|
||||
$this->application->settings->save();
|
||||
$this->dispatch('success', 'Settings saved.');
|
||||
$this->dispatch('configurationChanged');
|
||||
}
|
||||
public function submit() {
|
||||
if ($this->application->settings->gpu_count && $this->application->settings->gpu_device_ids) {
|
||||
|
||||
@@ -34,7 +34,8 @@ class General extends Component
|
||||
public $parsedServiceDomains = [];
|
||||
|
||||
protected $listeners = [
|
||||
'resetDefaultLabels'
|
||||
'resetDefaultLabels',
|
||||
'configurationChanged' => '$refresh'
|
||||
];
|
||||
protected $rules = [
|
||||
'application.name' => 'required',
|
||||
@@ -72,7 +73,6 @@ class General extends Component
|
||||
'application.post_deployment_command' => 'nullable',
|
||||
'application.post_deployment_command_container' => 'nullable',
|
||||
'application.settings.is_static' => 'boolean|required',
|
||||
'application.settings.is_raw_compose_deployment_enabled' => 'boolean|required',
|
||||
'application.settings.is_build_server_enabled' => 'boolean|required',
|
||||
'application.watch_paths' => 'nullable',
|
||||
];
|
||||
@@ -108,7 +108,6 @@ class General extends Component
|
||||
'application.docker_compose_custom_start_command' => 'Docker compose custom start command',
|
||||
'application.docker_compose_custom_build_command' => 'Docker compose custom build command',
|
||||
'application.settings.is_static' => 'Is static',
|
||||
'application.settings.is_raw_compose_deployment_enabled' => 'Is raw compose deployment enabled',
|
||||
'application.settings.is_build_server_enabled' => 'Is build server enabled',
|
||||
'application.watch_paths' => 'Watch paths',
|
||||
];
|
||||
@@ -187,6 +186,7 @@ class General extends Component
|
||||
$this->dispatch('success', 'Docker compose file loaded.');
|
||||
$this->dispatch('compose_loaded');
|
||||
$this->dispatch('refresh_storages');
|
||||
$this->dispatch('refreshEnvs');
|
||||
} catch (\Throwable $e) {
|
||||
$this->application->docker_compose_location = $this->initialDockerComposeLocation;
|
||||
$this->application->docker_compose_pr_location = $this->initialDockerComposePrLocation;
|
||||
@@ -337,11 +337,6 @@ class General extends Component
|
||||
check_domain_usage(resource: $this->application);
|
||||
}
|
||||
}
|
||||
if ($this->application->settings->is_raw_compose_deployment_enabled) {
|
||||
$this->application->parseRawCompose();
|
||||
} else {
|
||||
$this->parsedServices = $this->application->parseCompose();
|
||||
}
|
||||
}
|
||||
$this->application->custom_labels = base64_encode($this->customLabels);
|
||||
$this->application->save();
|
||||
|
||||
@@ -39,7 +39,8 @@ class Heading extends Component
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -35,11 +35,6 @@ class Execution extends Component
|
||||
$this->executions = $executions;
|
||||
$this->s3s = currentTeam()->s3s;
|
||||
}
|
||||
public function cleanupFailed()
|
||||
{
|
||||
$this->backup->executions()->where('status', 'failed')->delete();
|
||||
$this->dispatch('refreshBackupExecutions');
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.project.database.backup.execution');
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
namespace App\Livewire\Project\Database;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Livewire\Component;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
class BackupExecutions extends Component
|
||||
{
|
||||
@@ -16,11 +14,15 @@ class BackupExecutions extends Component
|
||||
$userId = auth()->user()->id;
|
||||
return [
|
||||
"echo-private:team.{$userId},BackupCreated" => 'refreshBackupExecutions',
|
||||
"refreshBackupExecutions",
|
||||
"deleteBackup"
|
||||
];
|
||||
}
|
||||
|
||||
public function cleanupFailed()
|
||||
{
|
||||
$this->backup->executions()->where('status', 'failed')->delete();
|
||||
$this->refreshBackupExecutions();
|
||||
}
|
||||
public function deleteBackup($exeuctionId)
|
||||
{
|
||||
$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 $mysqlRestoreCommand = 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_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()
|
||||
{
|
||||
@@ -62,8 +63,7 @@ class Import extends Component
|
||||
$this->resource->getMorphClass() == 'App\Models\StandaloneRedis' ||
|
||||
$this->resource->getMorphClass() == 'App\Models\StandaloneKeydb' ||
|
||||
$this->resource->getMorphClass() == 'App\Models\StandaloneDragonfly' ||
|
||||
$this->resource->getMorphClass() == 'App\Models\StandaloneClickhouse' ||
|
||||
$this->resource->getMorphClass() == 'App\Models\StandaloneMongodb'
|
||||
$this->resource->getMorphClass() == 'App\Models\StandaloneClickhouse'
|
||||
) {
|
||||
$this->unsupported = true;
|
||||
}
|
||||
@@ -101,6 +101,10 @@ class Import extends Component
|
||||
$this->importCommands[] = "docker exec {$this->container} sh -c '{$this->postgresqlRestoreCommand} {$tmpPath}'";
|
||||
$this->importCommands[] = "rm {$tmpPath}";
|
||||
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}'";
|
||||
|
||||
@@ -12,28 +12,6 @@ class Edit extends Component
|
||||
'project.name' => 'required|min:3|max:255',
|
||||
'project.description' => 'nullable|string|max:255',
|
||||
];
|
||||
protected $listeners = ['refreshEnvs' => '$refresh', 'saveKey' => 'saveKey'];
|
||||
|
||||
public function saveKey($data)
|
||||
{
|
||||
try {
|
||||
$found = $this->project->environment_variables()->where('key', $data['key'])->first();
|
||||
if ($found) {
|
||||
throw new \Exception('Variable already exists.');
|
||||
}
|
||||
$this->project->environment_variables()->create([
|
||||
'key' => $data['key'],
|
||||
'value' => $data['value'],
|
||||
'is_multiline' => $data['is_multiline'],
|
||||
'is_literal' => $data['is_literal'],
|
||||
'type' => 'project',
|
||||
'team_id' => currentTeam()->id,
|
||||
]);
|
||||
$this->project->refresh();
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
public function mount()
|
||||
{
|
||||
$projectUuid = request()->route('project_uuid');
|
||||
|
||||
@@ -16,29 +16,6 @@ class EnvironmentEdit extends Component
|
||||
'environment.name' => 'required|min:3|max:255',
|
||||
'environment.description' => 'nullable|min:3|max:255',
|
||||
];
|
||||
protected $listeners = ['refreshEnvs' => '$refresh', 'saveKey' => 'saveKey'];
|
||||
|
||||
public function saveKey($data)
|
||||
{
|
||||
try {
|
||||
$found = $this->environment->environment_variables()->where('key', $data['key'])->first();
|
||||
if ($found) {
|
||||
throw new \Exception('Variable already exists.');
|
||||
}
|
||||
$this->environment->environment_variables()->create([
|
||||
'key' => $data['key'],
|
||||
'value' => $data['value'],
|
||||
'is_multiline' => $data['is_multiline'],
|
||||
'is_literal' => $data['is_literal'],
|
||||
'type' => 'environment',
|
||||
'team_id' => currentTeam()->id,
|
||||
]);
|
||||
$this->environment->refresh();
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = get_route_parameters();
|
||||
|
||||
@@ -94,6 +94,17 @@ class PublicGitRepository extends Component
|
||||
$repository = str($this->repository_url)->after(':')->before('.git');
|
||||
$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) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
@@ -170,7 +181,6 @@ class PublicGitRepository extends Component
|
||||
'name' => generate_random_name(),
|
||||
'git_repository' => $this->git_repository,
|
||||
'git_branch' => $this->git_branch,
|
||||
'build_pack' => 'nixpacks',
|
||||
'ports_exposes' => $this->port,
|
||||
'publish_directory' => $this->publish_directory,
|
||||
'environment_id' => $environment->id,
|
||||
@@ -183,7 +193,6 @@ class PublicGitRepository extends Component
|
||||
'name' => generate_application_name($this->git_repository, $this->git_branch),
|
||||
'git_repository' => $this->git_repository,
|
||||
'git_branch' => $this->git_branch,
|
||||
'build_pack' => 'nixpacks',
|
||||
'ports_exposes' => $this->port,
|
||||
'publish_directory' => $this->publish_directory,
|
||||
'environment_id' => $environment->id,
|
||||
@@ -195,7 +204,6 @@ class PublicGitRepository extends Component
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
$application = Application::create($application_init);
|
||||
|
||||
$application->settings->is_static = $this->is_static;
|
||||
|
||||
@@ -70,6 +70,8 @@ CMD ["nginx", "-g", "daemon off;"]
|
||||
'fqdn' => $fqdn
|
||||
]);
|
||||
|
||||
$application->parseHealthcheckFromDockerfile(dockerfile: collect(str($this->dockerfile)->trim()->explode("\n")), isInit: true);
|
||||
|
||||
return redirect()->route('project.application.configuration', [
|
||||
'application_uuid' => $application->uuid,
|
||||
'environment_name' => $environment->name,
|
||||
|
||||
@@ -50,9 +50,9 @@ class Show extends Component
|
||||
public function checkEnvs()
|
||||
{
|
||||
$this->isDisabled = false;
|
||||
// if (str($this->env->key)->startsWith('SERVICE_FQDN') || str($this->env->key)->startsWith('SERVICE_URL')) {
|
||||
// $this->isDisabled = true;
|
||||
// }
|
||||
if (str($this->env->key)->startsWith('SERVICE_FQDN') || str($this->env->key)->startsWith('SERVICE_URL')) {
|
||||
$this->isDisabled = true;
|
||||
}
|
||||
if ($this->env->is_shown_once) {
|
||||
$this->isLocked = true;
|
||||
}
|
||||
|
||||
@@ -91,15 +91,35 @@ class GetLogs extends Component
|
||||
if ($this->container) {
|
||||
if ($this->showTimeStamps) {
|
||||
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 {
|
||||
$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 {
|
||||
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 {
|
||||
$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) {
|
||||
|
||||
@@ -17,18 +17,17 @@ class HealthChecks extends Component
|
||||
'resource.health_check_return_code' => 'integer',
|
||||
'resource.health_check_scheme' => 'string',
|
||||
'resource.health_check_response_text' => 'nullable|string',
|
||||
'resource.health_check_interval' => 'integer',
|
||||
'resource.health_check_timeout' => 'integer',
|
||||
'resource.health_check_retries' => 'integer',
|
||||
'resource.health_check_interval' => 'integer|min:1',
|
||||
'resource.health_check_timeout' => 'integer|min:1',
|
||||
'resource.health_check_retries' => 'integer|min:1',
|
||||
'resource.health_check_start_period' => 'integer',
|
||||
'resource.custom_healthcheck_found' => 'boolean',
|
||||
|
||||
];
|
||||
public function instantSave()
|
||||
{
|
||||
$this->resource->save();
|
||||
$this->dispatch('success', 'Health check updated.');
|
||||
|
||||
|
||||
}
|
||||
public function submit()
|
||||
{
|
||||
|
||||
@@ -82,6 +82,7 @@ class Form extends Component
|
||||
$this->server->settings->is_reachable = true;
|
||||
$this->server->settings->is_usable = true;
|
||||
$this->server->settings->save();
|
||||
$this->dispatch('proxyStatusUpdated');
|
||||
} else {
|
||||
$this->dispatch('error', 'Server is not reachable.', 'Please validate your configuration and connection.<br><br>Check this <a target="_blank" class="underline" href="https://coolify.io/docs/knowledge-base/server/openssh">documentation</a> for further help. <br><br>Error: ' . $error);
|
||||
return;
|
||||
|
||||
19
app/Livewire/SharedVariables/Environment/Index.php
Normal file
19
app/Livewire/SharedVariables/Environment/Index.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\SharedVariables\Environment;
|
||||
|
||||
use App\Models\Project;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Component;
|
||||
|
||||
class Index extends Component
|
||||
{
|
||||
public Collection $projects;
|
||||
public function mount() {
|
||||
$this->projects = Project::ownedByCurrentTeam()->get();
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.shared-variables.environment.index');
|
||||
}
|
||||
}
|
||||
47
app/Livewire/SharedVariables/Environment/Show.php
Normal file
47
app/Livewire/SharedVariables/Environment/Show.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\SharedVariables\Environment;
|
||||
|
||||
use App\Models\Application;
|
||||
use App\Models\Project;
|
||||
use Livewire\Component;
|
||||
|
||||
class Show extends Component
|
||||
{
|
||||
public Project $project;
|
||||
public Application $application;
|
||||
public $environment;
|
||||
public array $parameters;
|
||||
protected $listeners = ['refreshEnvs' => '$refresh', 'saveKey' => 'saveKey'];
|
||||
|
||||
public function saveKey($data)
|
||||
{
|
||||
try {
|
||||
$found = $this->environment->environment_variables()->where('key', $data['key'])->first();
|
||||
if ($found) {
|
||||
throw new \Exception('Variable already exists.');
|
||||
}
|
||||
$this->environment->environment_variables()->create([
|
||||
'key' => $data['key'],
|
||||
'value' => $data['value'],
|
||||
'is_multiline' => $data['is_multiline'],
|
||||
'is_literal' => $data['is_literal'],
|
||||
'type' => 'environment',
|
||||
'team_id' => currentTeam()->id,
|
||||
]);
|
||||
$this->environment->refresh();
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = get_route_parameters();
|
||||
$this->project = Project::ownedByCurrentTeam()->where('uuid', request()->route('project_uuid'))->first();
|
||||
$this->environment = $this->project->environments()->where('name', request()->route('environment_name'))->first();
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.shared-variables.environment.show');
|
||||
}
|
||||
}
|
||||
13
app/Livewire/SharedVariables/Index.php
Normal file
13
app/Livewire/SharedVariables/Index.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\SharedVariables;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Index extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.shared-variables.index');
|
||||
}
|
||||
}
|
||||
19
app/Livewire/SharedVariables/Project/Index.php
Normal file
19
app/Livewire/SharedVariables/Project/Index.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\SharedVariables\Project;
|
||||
|
||||
use App\Models\Project;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Component;
|
||||
|
||||
class Index extends Component
|
||||
{
|
||||
public Collection $projects;
|
||||
public function mount() {
|
||||
$this->projects = Project::ownedByCurrentTeam()->get();
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.shared-variables.project.index');
|
||||
}
|
||||
}
|
||||
47
app/Livewire/SharedVariables/Project/Show.php
Normal file
47
app/Livewire/SharedVariables/Project/Show.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\SharedVariables\Project;
|
||||
|
||||
use App\Models\Project;
|
||||
use Livewire\Component;
|
||||
|
||||
class Show extends Component
|
||||
{
|
||||
public Project $project;
|
||||
protected $listeners = ['refreshEnvs' => '$refresh', 'saveKey' => 'saveKey'];
|
||||
|
||||
public function saveKey($data)
|
||||
{
|
||||
try {
|
||||
$found = $this->project->environment_variables()->where('key', $data['key'])->first();
|
||||
if ($found) {
|
||||
throw new \Exception('Variable already exists.');
|
||||
}
|
||||
$this->project->environment_variables()->create([
|
||||
'key' => $data['key'],
|
||||
'value' => $data['value'],
|
||||
'is_multiline' => $data['is_multiline'],
|
||||
'is_literal' => $data['is_literal'],
|
||||
'type' => 'project',
|
||||
'team_id' => currentTeam()->id,
|
||||
]);
|
||||
$this->project->refresh();
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
public function mount()
|
||||
{
|
||||
$projectUuid = request()->route('project_uuid');
|
||||
$teamId = currentTeam()->id;
|
||||
$project = Project::where('team_id', $teamId)->where('uuid', $projectUuid)->first();
|
||||
if (!$project) {
|
||||
return redirect()->route('dashboard');
|
||||
}
|
||||
$this->project = $project;
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.shared-variables.project.show');
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
namespace App\Livewire\SharedVariables\Team;
|
||||
|
||||
use App\Models\Team;
|
||||
use Livewire\Component;
|
||||
|
||||
class TeamSharedVariablesIndex extends Component
|
||||
class Index extends Component
|
||||
{
|
||||
public Team $team;
|
||||
protected $listeners = ['refreshEnvs' => '$refresh', 'saveKey' => 'saveKey'];
|
||||
@@ -37,6 +37,6 @@ class TeamSharedVariablesIndex extends Component
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.team-shared-variables-index');
|
||||
return view('livewire.shared-variables.team.index');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Team\Storage;
|
||||
namespace App\Livewire\Storage;
|
||||
|
||||
use App\Models\S3Storage;
|
||||
use Livewire\Component;
|
||||
@@ -16,13 +16,13 @@ class Create extends Component
|
||||
public string $endpoint;
|
||||
public S3Storage $storage;
|
||||
protected $rules = [
|
||||
'name' => 'nullable|min:3|max:255',
|
||||
'name' => 'required|min:3|max:255',
|
||||
'description' => 'nullable|min:3|max:255',
|
||||
'region' => 'required|max:255',
|
||||
'key' => 'required|max:255',
|
||||
'secret' => 'required|max:255',
|
||||
'bucket' => 'required|max:255',
|
||||
'endpoint' => 'nullable|url|max:255',
|
||||
'endpoint' => 'required|url|max:255',
|
||||
];
|
||||
protected $validationAttributes = [
|
||||
'name' => 'Name',
|
||||
@@ -65,7 +65,7 @@ class Create extends Component
|
||||
$this->storage->team_id = currentTeam()->id;
|
||||
$this->storage->testConnection();
|
||||
$this->storage->save();
|
||||
return redirect()->route('team.storage.show', $this->storage->uuid);
|
||||
return redirect()->route('storage.show', $this->storage->uuid);
|
||||
} catch (\Throwable $e) {
|
||||
$this->dispatch('error', 'Failed to create storage.', $e->getMessage());
|
||||
// return handleError($e, $this);
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Team\Storage;
|
||||
namespace App\Livewire\Storage;
|
||||
|
||||
use App\Models\S3Storage;
|
||||
use Livewire\Component;
|
||||
@@ -43,7 +43,7 @@ class Form extends Component
|
||||
{
|
||||
try {
|
||||
$this->storage->delete();
|
||||
return redirect()->route('team.storage.index');
|
||||
return redirect()->route('storage.index');
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Team\Storage;
|
||||
namespace App\Livewire\Storage;
|
||||
|
||||
use App\Models\S3Storage;
|
||||
use Livewire\Component;
|
||||
@@ -13,6 +13,6 @@ class Index extends Component
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.team.storage.index');
|
||||
return view('livewire.storage.index');
|
||||
}
|
||||
}
|
||||
22
app/Livewire/Storage/Show.php
Normal file
22
app/Livewire/Storage/Show.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Storage;
|
||||
|
||||
use App\Models\S3Storage;
|
||||
use Livewire\Component;
|
||||
|
||||
class Show extends Component
|
||||
{
|
||||
public $storage = null;
|
||||
public function mount()
|
||||
{
|
||||
$this->storage = S3Storage::ownedByCurrentTeam()->whereUuid(request()->storage_uuid)->first();
|
||||
if (!$this->storage) {
|
||||
abort(404);
|
||||
}
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.storage.show');
|
||||
}
|
||||
}
|
||||
33
app/Livewire/Tags/Deployments.php
Normal file
33
app/Livewire/Tags/Deployments.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Tags;
|
||||
|
||||
use App\Models\ApplicationDeploymentQueue;
|
||||
use Livewire\Component;
|
||||
|
||||
class Deployments extends Component
|
||||
{
|
||||
public $deployments_per_tag_per_server = [];
|
||||
public $resource_ids = [];
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.tags.deployments');
|
||||
}
|
||||
public function get_deployments()
|
||||
{
|
||||
try {
|
||||
$this->deployments_per_tag_per_server = ApplicationDeploymentQueue::whereIn("status", ["in_progress", "queued"])->whereIn('application_id', $this->resource_ids)->get([
|
||||
"id",
|
||||
"application_id",
|
||||
"application_name",
|
||||
"deployment_url",
|
||||
"pull_request_id",
|
||||
"server_name",
|
||||
"server_id",
|
||||
"status"
|
||||
])->sortBy('id')->groupBy('server_name')->toArray();
|
||||
} catch (\Exception $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,32 +20,22 @@ class Index extends Component
|
||||
public $webhook = null;
|
||||
public $deployments_per_tag_per_server = [];
|
||||
|
||||
public function updatedTag()
|
||||
public function tag_updated()
|
||||
{
|
||||
if ($this->tag == "") {
|
||||
return;
|
||||
}
|
||||
$tag = $this->tags->where('name', $this->tag)->first();
|
||||
if (!$tag) {
|
||||
$this->dispatch('error', "Tag ({$this->tag}) not found.");
|
||||
$this->tag = "";
|
||||
return;
|
||||
}
|
||||
$this->webhook = generatTagDeployWebhook($tag->name);
|
||||
$this->applications = $tag->applications()->get();
|
||||
$this->services = $tag->services()->get();
|
||||
$this->get_deployments();
|
||||
}
|
||||
public function get_deployments()
|
||||
{
|
||||
try {
|
||||
$resource_ids = $this->applications->pluck('id');
|
||||
$this->deployments_per_tag_per_server = ApplicationDeploymentQueue::whereIn("status", ["in_progress", "queued"])->whereIn('application_id', $resource_ids)->get([
|
||||
"id",
|
||||
"application_id",
|
||||
"application_name",
|
||||
"deployment_url",
|
||||
"pull_request_id",
|
||||
"server_name",
|
||||
"server_id",
|
||||
"status"
|
||||
])->sortBy('id')->groupBy('server_name')->toArray();
|
||||
} catch (\Exception $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
public function redeploy_all()
|
||||
{
|
||||
try {
|
||||
@@ -67,7 +57,7 @@ class Index extends Component
|
||||
{
|
||||
$this->tags = Tag::ownedByCurrentTeam()->get()->unique('name')->sortBy('name');
|
||||
if ($this->tag) {
|
||||
$this->updatedTag();
|
||||
$this->tag_updated();
|
||||
}
|
||||
}
|
||||
public function render()
|
||||
|
||||
@@ -17,6 +17,6 @@ class Show extends Component
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.team.storage.show');
|
||||
return view('livewire.storage.show');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -346,6 +346,10 @@ class Application extends BaseModel
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function main_port()
|
||||
{
|
||||
return $this->settings->is_static ? [80] : $this->ports_exposes_array;
|
||||
}
|
||||
public function environment_variables(): HasMany
|
||||
{
|
||||
return $this->hasMany(EnvironmentVariable::class)->where('is_preview', false)->orderBy('key', 'asc');
|
||||
@@ -579,9 +583,9 @@ class Application extends BaseModel
|
||||
['repository' => $customRepository, 'port' => $customPort] = $this->customRepository();
|
||||
$baseDir = $custom_base_dir ?? $this->generateBaseDir($deployment_uuid);
|
||||
$commands = collect([]);
|
||||
$git_clone_command = "git clone -b {$this->git_branch}";
|
||||
$git_clone_command = "git clone -b \"{$this->git_branch}\"";
|
||||
if ($only_checkout) {
|
||||
$git_clone_command = "git clone --no-checkout -b {$this->git_branch}";
|
||||
$git_clone_command = "git clone --no-checkout -b \"{$this->git_branch}\"";
|
||||
}
|
||||
if ($pull_request_id !== 0) {
|
||||
$pr_branch_name = "pr-{$pull_request_id}-coolify";
|
||||
@@ -959,4 +963,51 @@ class Application extends BaseModel
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class S3Storage extends BaseModel
|
||||
if ($this->unusable_email_sent === false && is_transactional_emails_active()) {
|
||||
$mail = new MailMessage();
|
||||
$mail->subject('Coolify: S3 Storage Connection Error');
|
||||
$mail->view('emails.s3-connection-error', ['name' => $this->name, 'reason' => $e->getMessage(), 'url' => route('team.storage.show', ['storage_uuid' => $this->uuid])]);
|
||||
$mail->view('emails.s3-connection-error', ['name' => $this->name, 'reason' => $e->getMessage(), 'url' => route('storage.show', ['storage_uuid' => $this->uuid])]);
|
||||
$users = collect([]);
|
||||
$members = $this->team->members()->get();
|
||||
foreach ($members as $user) {
|
||||
|
||||
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Sleep;
|
||||
use Spatie\SchemalessAttributes\Casts\SchemalessAttributes;
|
||||
use Spatie\SchemalessAttributes\SchemalessAttributesTrait;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -239,7 +240,7 @@ respond 404
|
||||
$dynamic_config_path = $this->proxyPath() . "/dynamic";
|
||||
if ($this->proxyType() === 'TRAEFIK_V2') {
|
||||
$file = "$dynamic_config_path/coolify.yaml";
|
||||
if (empty($settings->fqdn)) {
|
||||
if (empty($settings->fqdn) || (isCloud() && $this->id !== 0)) {
|
||||
instant_remote_process([
|
||||
"rm -f $file",
|
||||
], $this);
|
||||
@@ -358,7 +359,7 @@ respond 404
|
||||
}
|
||||
} else if ($this->proxyType() === 'CADDY') {
|
||||
$file = "$dynamic_config_path/coolify.caddy";
|
||||
if (empty($settings->fqdn)) {
|
||||
if (empty($settings->fqdn) || (isCloud() && $this->id !== 0)) {
|
||||
instant_remote_process([
|
||||
"rm -f $file",
|
||||
], $this);
|
||||
@@ -467,63 +468,53 @@ $schema://$host {
|
||||
if ($this->skipServer()) {
|
||||
return false;
|
||||
}
|
||||
$serverUptimeCheckNumber = $this->unreachable_count;
|
||||
if ($this->unreachable_count < $tries) {
|
||||
$serverUptimeCheckNumber = $this->unreachable_count + 1;
|
||||
}
|
||||
if ($this->unreachable_count > $tries) {
|
||||
$serverUptimeCheckNumber = $tries;
|
||||
}
|
||||
|
||||
$serverUptimeCheckNumberMax = $tries;
|
||||
|
||||
// ray('server: ' . $this->name);
|
||||
// ray('serverUptimeCheckNumber: ' . $serverUptimeCheckNumber);
|
||||
// ray('serverUptimeCheckNumberMax: ' . $serverUptimeCheckNumberMax);
|
||||
|
||||
['uptime' => $uptime] = $this->validateConnection();
|
||||
if ($uptime) {
|
||||
if ($this->unreachable_notification_sent === true) {
|
||||
$this->update(['unreachable_notification_sent' => false]);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
if ($serverUptimeCheckNumber >= $serverUptimeCheckNumberMax) {
|
||||
// Reached max number of retries
|
||||
if ($this->unreachable_notification_sent === false) {
|
||||
ray('Server unreachable, sending notification...');
|
||||
$this->team?->notify(new Unreachable($this));
|
||||
$this->update(['unreachable_notification_sent' => true]);
|
||||
$checkIteration = 1;
|
||||
$isServerReady = false;
|
||||
while ($checkIteration < $tries) {
|
||||
['uptime' => $uptime] = $this->validateConnection();
|
||||
if ($uptime) {
|
||||
if ($this->unreachable_notification_sent === true) {
|
||||
$this->update(['unreachable_notification_sent' => false]);
|
||||
}
|
||||
if ($this->settings->is_reachable === true) {
|
||||
$this->settings()->update([
|
||||
'is_reachable' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
foreach ($this->applications() as $application) {
|
||||
$application->update(['status' => 'exited']);
|
||||
}
|
||||
foreach ($this->databases() as $database) {
|
||||
$database->update(['status' => 'exited']);
|
||||
}
|
||||
foreach ($this->services()->get() as $service) {
|
||||
$apps = $service->applications()->get();
|
||||
$dbs = $service->databases()->get();
|
||||
foreach ($apps as $app) {
|
||||
$app->update(['status' => 'exited']);
|
||||
}
|
||||
foreach ($dbs as $db) {
|
||||
$db->update(['status' => 'exited']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->update([
|
||||
'unreachable_count' => $this->unreachable_count + 1,
|
||||
$this->settings()->update([
|
||||
'is_reachable' => true,
|
||||
]);
|
||||
$isServerReady = true;
|
||||
break;
|
||||
} else {
|
||||
ray('Server is not ready yet.');
|
||||
$checkIteration++;
|
||||
Sleep::for(10)->seconds();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if ($isServerReady) {
|
||||
return $isServerReady;
|
||||
}
|
||||
if ($this->unreachable_notification_sent === false) {
|
||||
ray('Server unreachable, sending notification...');
|
||||
$this->team?->notify(new Unreachable($this));
|
||||
$this->update(['unreachable_notification_sent' => true]);
|
||||
}
|
||||
$this->settings()->update([
|
||||
'is_reachable' => false,
|
||||
]);
|
||||
foreach ($this->applications() as $application) {
|
||||
$application->update(['status' => 'exited']);
|
||||
}
|
||||
foreach ($this->databases() as $database) {
|
||||
$database->update(['status' => 'exited']);
|
||||
}
|
||||
foreach ($this->services()->get() as $service) {
|
||||
$apps = $service->applications()->get();
|
||||
$dbs = $service->databases()->get();
|
||||
foreach ($apps as $app) {
|
||||
$app->update(['status' => 'exited']);
|
||||
}
|
||||
foreach ($dbs as $db) {
|
||||
$db->update(['status' => 'exited']);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function getDiskUsage()
|
||||
{
|
||||
@@ -771,6 +762,11 @@ $schema://$host {
|
||||
$server->settings()->update([
|
||||
'is_reachable' => false,
|
||||
]);
|
||||
if (data_get($server, 'unreachable_notification_sent') === false) {
|
||||
ray('Server unreachable, sending notification...');
|
||||
$this->team?->notify(new Unreachable($this));
|
||||
$this->update(['unreachable_notification_sent' => true]);
|
||||
}
|
||||
return ['uptime' => false, 'error' => $e->getMessage()];
|
||||
}
|
||||
}
|
||||
@@ -860,6 +856,9 @@ $schema://$host {
|
||||
}
|
||||
public function isNonRoot()
|
||||
{
|
||||
if ($this->user instanceof Stringable) {
|
||||
return $this->user->value() !== 'root';
|
||||
}
|
||||
return $this->user !== 'root';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,5 +208,4 @@ class StandaloneKeydb extends BaseModel
|
||||
{
|
||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ class DeploymentFailed extends Notification implements ShouldQueue
|
||||
public function toDiscord(): string
|
||||
{
|
||||
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 . ')';
|
||||
} 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 . ')';
|
||||
}
|
||||
return $message;
|
||||
@@ -80,9 +80,9 @@ class DeploymentFailed extends Notification implements ShouldQueue
|
||||
public function toTelegram(): array
|
||||
{
|
||||
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 {
|
||||
$message = 'Coolify: Deployment failed of **' . $this->application_name . '** (' . $this->fqdn . '): ';
|
||||
$message = 'Coolify: Deployment failed of ' . $this->application_name . ' (' . $this->fqdn . '): ';
|
||||
}
|
||||
$buttons[] = [
|
||||
"text" => "Deployment logs",
|
||||
|
||||
@@ -43,15 +43,8 @@ class DeploymentSuccess extends Notification implements ShouldQueue
|
||||
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
$channels = setNotificationChannels($notifiable, 'deployments');
|
||||
if (isCloud()) {
|
||||
$channels = array_filter($channels, function ($channel) {
|
||||
return $channel !== 'App\Notifications\Channels\EmailChannel';
|
||||
});
|
||||
}
|
||||
return $channels;
|
||||
return setNotificationChannels($notifiable, 'deployments');
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage();
|
||||
|
||||
@@ -15,11 +15,12 @@ class BackupFailed extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public $tries = 1;
|
||||
public $backoff = 10;
|
||||
public $tries = 2;
|
||||
public string $name;
|
||||
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->frequency = $backup->frequency;
|
||||
@@ -27,7 +28,7 @@ class BackupFailed extends Notification implements ShouldQueue
|
||||
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return [DiscordChannel::class, TelegramChannel::class, MailChannel::class];
|
||||
return setNotificationChannels($notifiable, 'database_backups');
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
@@ -36,6 +37,7 @@ class BackupFailed extends Notification implements ShouldQueue
|
||||
$mail->subject("Coolify: [ACTION REQUIRED] Backup FAILED for {$this->database->name}");
|
||||
$mail->view('emails.backup-failed', [
|
||||
'name' => $this->name,
|
||||
'database_name' => $this->database_name,
|
||||
'frequency' => $this->frequency,
|
||||
'output' => $this->output,
|
||||
]);
|
||||
@@ -44,11 +46,11 @@ class BackupFailed extends Notification implements ShouldQueue
|
||||
|
||||
public function toDiscord(): string
|
||||
{
|
||||
return "Coolify: Database backup for {$this->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
|
||||
{
|
||||
$message = "Coolify: Database backup for {$this->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 [
|
||||
"message" => $message,
|
||||
];
|
||||
|
||||
@@ -12,11 +12,12 @@ class BackupSuccess extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public $tries = 1;
|
||||
public $backoff = 10;
|
||||
public $tries = 3;
|
||||
public string $name;
|
||||
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->frequency = $backup->frequency;
|
||||
@@ -33,6 +34,7 @@ class BackupSuccess extends Notification implements ShouldQueue
|
||||
$mail->subject("Coolify: Backup successfully done for {$this->database->name}");
|
||||
$mail->view('emails.backup-success', [
|
||||
'name' => $this->name,
|
||||
'database_name' => $this->database_name,
|
||||
'frequency' => $this->frequency,
|
||||
]);
|
||||
return $mail;
|
||||
@@ -40,11 +42,12 @@ class BackupSuccess extends Notification implements ShouldQueue
|
||||
|
||||
public function toDiscord(): string
|
||||
{
|
||||
return "Coolify: Database backup for {$this->name} with frequency of {$this->frequency} was successful.";
|
||||
return "Coolify: Database backup for {$this->name} (db:{$this->database_name}) with frequency of {$this->frequency} was successful.";
|
||||
}
|
||||
public function toTelegram(): array
|
||||
{
|
||||
$message = "Coolify: Database backup for {$this->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 [
|
||||
"message" => $message,
|
||||
];
|
||||
|
||||
38
app/View/Components/Forms/Datalist.php
Normal file
38
app/View/Components/Forms/Datalist.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components\Forms;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\View\Component;
|
||||
use Visus\Cuid2\Cuid2;
|
||||
|
||||
class Datalist extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*/
|
||||
public function __construct(
|
||||
public ?string $id = null,
|
||||
public ?string $name = null,
|
||||
public ?string $label = null,
|
||||
public ?string $helper = null,
|
||||
public bool $required = false,
|
||||
public string $defaultClass = "input"
|
||||
) {
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
public function render(): View|Closure|string
|
||||
{
|
||||
if (is_null($this->id)) $this->id = new Cuid2(7);
|
||||
if (is_null($this->name)) $this->name = $this->id;
|
||||
|
||||
$this->label = Str::title($this->label);
|
||||
return view('components.forms.datalist');
|
||||
}
|
||||
}
|
||||
@@ -23,10 +23,11 @@ class Textarea extends Component
|
||||
public bool $disabled = false,
|
||||
public bool $readonly = false,
|
||||
public bool $allowTab = false,
|
||||
public bool $spellcheck = false,
|
||||
public ?string $helper = null,
|
||||
public bool $realtimeValidation = false,
|
||||
public bool $allowToPeak = true,
|
||||
public string $defaultClass = "input scrollbar",
|
||||
public string $defaultClass = "input scrollbar font-mono",
|
||||
public string $defaultClassInput = "input"
|
||||
) {
|
||||
//
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\Models\ServiceApplication;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Str;
|
||||
use Spatie\Url\Url;
|
||||
use Visus\Cuid2\Cuid2;
|
||||
|
||||
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();
|
||||
}
|
||||
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->push('traefik.enable=true');
|
||||
@@ -313,7 +314,9 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_
|
||||
}
|
||||
foreach ($domains as $loop => $domain) {
|
||||
try {
|
||||
// $uuid = new Cuid2(7);
|
||||
if ($generate_unique_uuid) {
|
||||
$uuid = new Cuid2(7);
|
||||
}
|
||||
$url = Url::fromString($domain);
|
||||
$host = $url->getHost();
|
||||
$path = $url->getPath();
|
||||
|
||||
@@ -18,7 +18,7 @@ function collectRegex(string $name)
|
||||
}
|
||||
function replaceVariables($variable)
|
||||
{
|
||||
return $variable->replaceFirst('$', '')->replaceFirst('{', '')->replaceLast('}', '');
|
||||
return $variable->before('}')->replaceFirst('$', '')->replaceFirst('{', '');
|
||||
}
|
||||
|
||||
function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Application $oneService, bool $isInit = false)
|
||||
@@ -27,7 +27,7 @@ function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Appli
|
||||
if ($oneService->getMorphClass() === 'App\Models\Application') {
|
||||
$workdir = $oneService->workdir();
|
||||
$server = $oneService->destination->server;
|
||||
} else{
|
||||
} else {
|
||||
$workdir = $oneService->service->workdir();
|
||||
$server = $oneService->service->server;
|
||||
}
|
||||
|
||||
@@ -29,11 +29,13 @@ use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
|
||||
use Illuminate\Database\UniqueConstraintViolationException;
|
||||
use Illuminate\Mail\Message;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Process\Pool;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Process;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -986,20 +988,18 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
if ($fqdns_exploded->count() > 1) {
|
||||
continue;
|
||||
}
|
||||
if ($resource->server->proxyType() === 'CADDY') {
|
||||
$env = EnvironmentVariable::where([
|
||||
'key' => $key,
|
||||
'service_id' => $resource->id,
|
||||
])->first();
|
||||
if ($env) {
|
||||
$env = EnvironmentVariable::where([
|
||||
'key' => $key,
|
||||
'service_id' => $resource->id,
|
||||
])->first();
|
||||
if ($env) {
|
||||
|
||||
$env_url = Url::fromString($savedService->fqdn);
|
||||
$env_port = $env_url->getPort();
|
||||
if ($env_port !== $predefinedPort) {
|
||||
$env_url = $env_url->withPort($predefinedPort);
|
||||
$savedService->fqdn = $env_url->__toString();
|
||||
$savedService->save();
|
||||
}
|
||||
$env_url = Url::fromString($savedService->fqdn);
|
||||
$env_port = $env_url->getPort();
|
||||
if ($env_port !== $predefinedPort) {
|
||||
$env_url = $env_url->withPort($predefinedPort);
|
||||
$savedService->fqdn = $env_url->__toString();
|
||||
$savedService->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1266,6 +1266,11 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
$serviceLabels->push("$removedLabelName=$removedLabel");
|
||||
}
|
||||
}
|
||||
if ($serviceLabels->count() > 0) {
|
||||
$serviceLabels = $serviceLabels->map(function ($value, $key) {
|
||||
return escapeDollarSign($value);
|
||||
});
|
||||
}
|
||||
$baseName = generateApplicationContainerName($resource, $pull_request_id);
|
||||
$containerName = "$serviceName-$baseName";
|
||||
if (count($serviceVolumes) > 0) {
|
||||
@@ -1424,6 +1429,14 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
foreach ($definedNetwork as $key => $network) {
|
||||
$networks->put($network, null);
|
||||
}
|
||||
if (data_get($resource, 'settings.connect_to_docker_network')) {
|
||||
$network = $resource->destination->network;
|
||||
$networks->put($network, null);
|
||||
$topLevelNetworks->put($network, [
|
||||
'name' => $network,
|
||||
'external' => true
|
||||
]);
|
||||
}
|
||||
data_set($service, 'networks', $networks->toArray());
|
||||
// Get variables from the service
|
||||
foreach ($serviceVariables as $variableName => $variable) {
|
||||
@@ -1585,7 +1598,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
$fqdns = data_get($domains, "$serviceName.domain");
|
||||
if ($fqdns) {
|
||||
$fqdns = str($fqdns)->explode(',');
|
||||
$uuid = new Cuid2(7);
|
||||
if ($pull_request_id !== 0) {
|
||||
$fqdns = $fqdns->map(function ($fqdn) use ($pull_request_id, $resource) {
|
||||
$preview = ApplicationPreview::findPreviewByApplicationAndPullId($resource->id, $pull_request_id);
|
||||
@@ -1604,13 +1616,14 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
||||
});
|
||||
}
|
||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik(
|
||||
uuid: $uuid,
|
||||
uuid: $resource->uuid,
|
||||
domains: $fqdns,
|
||||
serviceLabels: $serviceLabels
|
||||
serviceLabels: $serviceLabels,
|
||||
generate_unique_uuid: $resource->build_pack === 'dockercompose'
|
||||
));
|
||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForCaddy(
|
||||
network: $resource->destination->network,
|
||||
uuid: $uuid,
|
||||
uuid: $resource->uuid,
|
||||
domains: $fqdns,
|
||||
serviceLabels: $serviceLabels
|
||||
));
|
||||
@@ -2004,3 +2017,37 @@ function parseLineForSudo(string $command, Server $server): string
|
||||
|
||||
return $command;
|
||||
}
|
||||
|
||||
function get_public_ips()
|
||||
{
|
||||
try {
|
||||
echo "Refreshing public ips!\n";
|
||||
$settings = InstanceSettings::get();
|
||||
[$first, $second] = Process::concurrently(function (Pool $pool) {
|
||||
$pool->path(__DIR__)->command('curl -4s https://ifconfig.io');
|
||||
$pool->path(__DIR__)->command('curl -6s https://ifconfig.io');
|
||||
});
|
||||
$ipv4 = $first->output();
|
||||
if ($ipv4) {
|
||||
$ipv4 = trim($ipv4);
|
||||
$validate_ipv4 = filter_var($ipv4, FILTER_VALIDATE_IP);
|
||||
if ($validate_ipv4 == false) {
|
||||
echo "Invalid ipv4: $ipv4\n";
|
||||
return;
|
||||
}
|
||||
$settings->update(['public_ipv4' => $ipv4]);
|
||||
}
|
||||
$ipv6 = $second->output();
|
||||
if ($ipv6) {
|
||||
$ipv6 = trim($ipv6);
|
||||
$validate_ipv6 = filter_var($ipv6, FILTER_VALIDATE_IP);
|
||||
if ($validate_ipv6 == false) {
|
||||
echo "Invalid ipv6: $ipv6\n";
|
||||
return;
|
||||
}
|
||||
$settings->update(['public_ipv6' => $ipv6]);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
echo "Error: {$e->getMessage()}\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ return [
|
||||
'basic' => env('LIMIT_SERVER_BASIC', 2),
|
||||
'pro' => env('LIMIT_SERVER_PRO', 10),
|
||||
'ultimate' => env('LIMIT_SERVER_ULTIMATE', 25),
|
||||
'dynamic' => env('LIMIT_SERVER_DYNAMIC', 2),
|
||||
],
|
||||
'email' => [
|
||||
'zero' => true,
|
||||
@@ -39,6 +40,7 @@ return [
|
||||
'basic' => true,
|
||||
'pro' => true,
|
||||
'ultimate' => true,
|
||||
'dynamic' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -7,7 +7,7 @@ return [
|
||||
|
||||
// The release version of your application
|
||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||
'release' => '4.0.0-beta.264',
|
||||
'release' => '4.0.0-beta.273',
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => config('app.env'),
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.264';
|
||||
return '4.0.0-beta.273';
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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('application_settings', function (Blueprint $table) {
|
||||
$table->boolean('connect_to_docker_network')->default(false);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('application_settings', function (Blueprint $table) {
|
||||
$table->dropColumn('connect_to_docker_network');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -177,27 +177,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$settings = InstanceSettings::get();
|
||||
if (is_null($settings->public_ipv4)) {
|
||||
$ipv4 = Process::run('curl -4s https://ifconfig.io')->output();
|
||||
if ($ipv4) {
|
||||
$ipv4 = trim($ipv4);
|
||||
$ipv4 = filter_var($ipv4, FILTER_VALIDATE_IP);
|
||||
$settings->update(['public_ipv4' => $ipv4]);
|
||||
}
|
||||
}
|
||||
if (is_null($settings->public_ipv6)) {
|
||||
$ipv6 = Process::run('curl -6s https://ifconfig.io')->output();
|
||||
if ($ipv6) {
|
||||
$ipv6 = trim($ipv6);
|
||||
$ipv6 = filter_var($ipv6, FILTER_VALIDATE_IP);
|
||||
$settings->update(['public_ipv6' => $ipv6]);
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
echo "Error: {$e->getMessage()}\n";
|
||||
}
|
||||
get_public_ips();
|
||||
|
||||
$oauth_settings_seeder = new OauthSettingSeeder();
|
||||
$oauth_settings_seeder->run();
|
||||
|
||||
1
public/svgs/odoo.svg
Normal file
1
public/svgs/odoo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 919 495"><path d="M695,346a75,75,0,1,1,75-75A75,75,0,0,1,695,346Zm0-31a44,44,0,1,0-44-44A44,44,0,0,0,695,315ZM538,346a75,75,0,1,1,75-75A75,75,0,0,1,538,346Zm0-31a44,44,0,1,0-44-44A44,44,0,0,0,538,315Zm-82-45c0,41.9-33.6,76-75,76s-75-34-75-75.9S336.5,196,381,196c16.4,0,31.6,3.5,44,12.6V165.1c0-8.3,7.3-15.1,15.5-15.1s15.5,6.8,15.5,15.1Zm-75,45a44,44,0,1,0-44-44A44,44,0,0,0,381,315Z" style="fill:#8f8f8f"/><path d="M224,346a75,75,0,1,1,75-75A75,75,0,0,1,224,346Zm0-31a44,44,0,1,0-44-44A44,44,0,0,0,224,315Z" style="fill:#714b67"/></svg>
|
||||
|
After Width: | Height: | Size: 589 B |
12
public/svgs/vikunja.svg
Normal file
12
public/svgs/vikunja.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 256 256" width="256" height="256">
|
||||
<path d="M2268.2 2512.3a953.7 953.7 0 0 1-50 57c-180.5 189.5-426.2 294-691.6 294A953.7 953.7 0 0 1 847.8 2582a952.7 952.7 0 0 1-281.2-678.8 953.8 953.8 0 0 1 281.2-678.9 953.7 953.7 0 0 1 678.8-281.1 953.7 953.7 0 0 1 678.8 281.1 953.7 953.7 0 0 1 281.2 678.9c0 219.2-78.9 437.2-218.4 609" style="fill:#196aff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1823.7 1650.9c35.7 104.2 94.7 136.1 102 297 2.6 56.5-14.7 236-14.7 236s28 72-25.8 152.3c-83.5 124.3-255.4 132.8-345.7 132.8-90.3 0-260.2-8.5-343.7-132.8C1142 2256 1170 2184 1170 2184s-9.5-92.4-16.7-173.8c-1.7-19.1.1-94.7 2.4-113a453 453 0 0 1 25.8-96.2c14.4-39.6 36.8-79.9 54-120.5 51.8-122.8 8.4-274.9 11.1-407.3 2.2-94-20-189.3-28.7-281.2a960.4 960.4 0 0 1 308.7-50.6 958.6 958.6 0 0 1 344.9 63.6c-20.4 115-44.1 224.2-47.8 265.9-10.6 125.9-41.3 259.4 0 380" style="fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36655635" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1162.9 2383.9c1.1-18.8 3-38 8.3-56.2 1.6-5.7 4-19.7 11.4-21.8 9-2.6 25.9 8.3 32.3 13 12.3 9 23.9 18.5 36.2 27.6 8 6 16.5 10.5 24.3 16.5 8.4 6.6 14.7 14.5 21.7 22.2 8.4 9.4 14.8 19 21.3 29.5 5.1 8.2 37.1 13.5 42.2 21 5.6 8.3 1 18.6 1 28.7 0 74.2 4.4 147.6 6.1 220.3 1.8 50 21.4 109.2-53.4 85.8-160.3-50-158.5-271.3-151.4-386.6M1869.1 2279.7c-1.6 1.8-4.2 3.2-6.3 4.8a208 208 0 0 0-25.1 21.5c-9.4 9.6-19.2 19-28.2 28.9-7.9 8.7-17.3 16.6-25 25.6-5.1 6-10 12.3-14.6 18.5-2.3 3.2-3.5 7-5.3 10.4-2.7 5-40 10.1-36.2 15 6.3 8.3 20.3 15.4 23.7 25 17.2 48.6 24.8 244.5 26.8 294.5 5.4 127.8 117.6-6.3 137.2-57.7 57-149.7 23.2-258.8-46.3-386.6" style="fill:#fff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1716.5 1787.9c-.1 73.8-9.3 103.6-50.4 139.7-25.8 22.6-55.9 31.2-103.8 30-47.9 1.2-82.4-13.4-107.3-39.2-37.5-39-47.4-62-47.5-135.9 0-39.9 43-128.1 55.7-148.5 21.3-36 60.6-48.9 99.1-46.2 38.6-2.7 77.9 10.3 99.1 46.2 12.8 20.4 55.1 107 55 153.9" style="fill:#f1e6d3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1226.6 2316c-9.6 86.2-38.6 240 61.5 331.3 11 10.1 14-24.2 15.8-38 2.6-19 0-73.5.4-92.6.7-36.1 8.3-55 4.7-71.5-9.6-45-17.3-42.2-26.5-69.6-18.3-54.4-53.3-83-55.9-59.5M1851.7 2333c10.3-18.2 37 80.3 45.4 123.2 8 40.3 18 93.8 4 133.9-7.4 21.5-53 84.5-58.4 62.9-2-8.5-3.2-71.1-8.3-101.1-6.4-37.1-18-73.8-18-111.6-.2-84.5 25.3-88 35.3-107.2" style="fill:#f1d7d4;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1522 1319.7c-2.2-6.5-18.6-11.4-24.8-13.3-14.9-4.9-28.1 6.9-36.4 16.8-11.6 13.7-11.3 35.6-16.2 51.6-2.9 9.7-19.5 11-24.5 2-16.6-29.8-81.1 26.4-66.1 45.2 9.9 12.3-13.8 23.2-23.6 11-29-36.1 49-103.4 93.6-85.2 2-9 4-18 8-26.6 7.4-16.9 23.9-27.8 41-37 23.1-12.4 68.2 9.5 75 30.3 4.9 14.5-21.2 19.7-26 5.2M1727.6 1538.2c2.4-10 2.8-44-16-25.4-7.5 7.5-22.6 3-23.2-7-1.4-23.4-24.9-24-45.1-16.9-16 5.6-24.6-16.6-8.6-22.1 29.7-10.4 62-4.6 74.7 17.8 10.1-4.7 21.5-6 30.7 2.6 16 15 18.4 36.2 13.7 55.7-3.5 14.8-29.7 10.1-26.2-4.7M1775 1049.2c-7-14.3-19.8-13.4-33.6-7.4-10.1 4.4-22.6-2.8-19.6-13 6.2-20.6-19.7-26.6-37.3-19.3-15.4 6.5-28.8-13.8-13.2-20.3 31.6-13.2 71.7-1.6 77.5 26.2 20.4-3.3 39.8 2.4 49.4 22.3 6.7 13.6-16.4 25.4-23.2 11.5M1569.8 2153.3c-3.3-20.2-41.1 3.3-50.5 9.7-8.3 5.5-19 2.1-20-7.3-1.4-12.7-18.5-9-26.3-7.4-14.8 3-27.4 12.2-27.7 26-.4 13.6 8.2 27.7 12.6 40.4 2.9 8-8.7 17-17.2 11.5-15.2-9.7-88.7-18.5-59.4 13.6 9.3 10.2-7.1 24.8-16.6 14.5-13.5-14.8-22.6-48.7 6.6-56 15.5-3.7 37.8-3.5 56.8.8-8-25.5-9.6-48.8 23.2-65.1 22.1-11.1 52.5-11 65.4 6 27.2-14.5 69.7-28.7 75.6 7.8 2.1 13-20.4 18.5-22.5 5.5" style="fill:#faeee0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1443 1685.6c39.4-3.4 78.8-12.3 118.5-10.9 25.4 1 51.7 4.5 76.8 8.2 18.2 2.7 40.5 6 52.7 19.4 1-45-92.6-59.1-128.9-60-42.1-1-89.5 17.2-119 43.3" style="fill:#494949;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1549.4 1779.5a353.5 353.5 0 0 1-2.7-87.3c.7-7.6-1.3-25.7 8.8-29.5 8.2-3 18.3 2.7 19.7 10.1 2.2 12.5-3 28.2-3.5 41-.5 14.9 0 29.8 1.6 44.7 1 8.8 5.9 20.7-4.2 27-7.4 4.5-18.3 2.8-19.7-6" style="fill:#494949;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1626 1849.7c-23.7-1-45.7-14.2-63.4-27-16.1 10.7-40.5 20.5-60.7 14.8-12-3.4-1.1-7.1 4-10.3 9.2-6.2 16.8-14.2 23.7-22.4 10.3-12.6 19.6-25.8 30.7-38 7.6 5.6 15 11.1 21.6 17.6 3.1 3 28.5 37 32.4 42.7 2.4 3.6 5 7.4 7.8 10.8 2.9 3.5 11 9 3.9 11.8" style="fill:#494949;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
<path d="M1326.5 2010c11.7 30.3 24.3 68.4 56.3 62.4 24.2-5.2 56.7-86.2 36-78.2-11.3 4.4-20.3 41.1-41.4 46-13.4 3-32-43.6-50-48.4-8.7-2.3-4.3 10.4-.9 18.2M1670.6 2010c11.7 30.3 24.2 68.4 56.3 62.4 24.2-5.2 56.7-86.2 35.9-78.2-11.3 4.4-20.2 41.1-41.3 46-13.5 3-32-43.6-50-48.4-8.7-2.3-4.4 10.4-1 18.2" style="fill:#2c3844;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.36633128" transform="matrix(.13333 0 0 -.13333 -75.5 381.8)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.4 KiB |
@@ -133,6 +133,11 @@ tr td:first-child {
|
||||
@apply inline-block w-3 h-3 text-xs font-bold leading-none border rounded-full border-neutral-200 dark:border-black;
|
||||
}
|
||||
|
||||
.badge-absolute {
|
||||
@apply absolute top-0 right-0 w-2 h-2 border-none rounded-t-none rounded-r-none;
|
||||
|
||||
}
|
||||
|
||||
.badge-success {
|
||||
@apply bg-success;
|
||||
}
|
||||
@@ -195,7 +200,7 @@ tr td:first-child {
|
||||
}
|
||||
|
||||
.box {
|
||||
@apply flex lg:flex-row flex-col p-2 transition-colors cursor-pointer min-h-[4rem] dark:bg-coolgray-100 bg-white border text-black dark:text-white hover:text-black border-neutral-200 dark:border-black hover:bg-neutral-100 dark:hover:bg-coollabs-100 dark:hover:text-white hover:no-underline;
|
||||
@apply relative flex lg:flex-row flex-col p-2 transition-colors cursor-pointer min-h-[4rem] dark:bg-coolgray-100 bg-white border text-black dark:text-white hover:text-black border-neutral-200 dark:border-black hover:bg-neutral-100 dark:hover:bg-coollabs-100 dark:hover:text-white hover:no-underline;
|
||||
}
|
||||
.box-boarding {
|
||||
@apply flex lg:flex-row flex-col p-2 transition-colors cursor-pointer min-h-[4rem] dark:bg-coolgray-100 dark:text-white bg-neutral-50 border border-neutral-200 dark:border-black hover:bg-neutral-100 dark:hover:bg-coollabs-100 dark:hover:text-white hover:text-black hover:no-underline text-black ;
|
||||
|
||||
44
resources/views/components/forms/datalist.blade.php
Normal file
44
resources/views/components/forms/datalist.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<div class="w-full">
|
||||
<label>
|
||||
@if ($label)
|
||||
{{ $label }}
|
||||
@if ($required)
|
||||
<x-highlighted text="*" />
|
||||
@endif
|
||||
@if ($helper)
|
||||
<x-helper :helper="$helper" />
|
||||
@endif
|
||||
@endif
|
||||
<input list={{ $id }} {{ $attributes->merge(['class' => $defaultClass]) }} @required($required)
|
||||
wire:dirty.class.remove='dark:text-white' wire:dirty.class="text-black bg-warning" wire:loading.attr="disabled"
|
||||
name={{ $id }}
|
||||
@if ($attributes->whereStartsWith('wire:model')->first()) {{ $attributes->whereStartsWith('wire:model')->first() }} @else wire:model={{ $id }} @endif
|
||||
@if ($attributes->whereStartsWith('onUpdate')->first()) wire:change={{ $attributes->whereStartsWith('onUpdate')->first() }} wire:keydown.enter={{ $attributes->whereStartsWith('onUpdate')->first() }} wire:blur={{ $attributes->whereStartsWith('onUpdate')->first() }} @else wire:change={{ $id }} wire:blur={{ $id }} wire:keydown.enter={{ $id }} @endif>
|
||||
<datalist id={{ $id }}>
|
||||
{{ $slot }}
|
||||
</datalist>
|
||||
</label>
|
||||
@error($id)
|
||||
<label class="label">
|
||||
<span class="text-red-500 label-text-alt">{{ $message }}</span>
|
||||
</label>
|
||||
@enderror
|
||||
{{-- <script>
|
||||
const input = document.querySelector(`input[list={{ $id }}]`);
|
||||
input.addEventListener('focus', function(e) {
|
||||
const input = e.target.value;
|
||||
const datalist = document.getElementById('{{ $id }}');
|
||||
if (datalist.options) {
|
||||
for (let option of datalist.options) {
|
||||
// change background color to red on all options
|
||||
option.style.display = "none";
|
||||
if (option.value.includes(input)) {
|
||||
option.style.display = "block";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
</script> --}}
|
||||
</div>
|
||||
@@ -41,6 +41,7 @@
|
||||
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"
|
||||
type="{{ $type }}" @disabled($disabled)
|
||||
min="{{ $attributes->get('min') }}" max="{{ $attributes->get('max') }}"
|
||||
@if ($id !== 'null') id={{ $id }} @endif name="{{ $name }}"
|
||||
placeholder="{{ $attributes->get('placeholder') }}">
|
||||
@endif
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
</div>
|
||||
@else
|
||||
<textarea {{ $allowTab ? '@keydown.tab=handleKeydown' : '' }} placeholder="{{ $placeholder }}" {{ $attributes->merge(['class' => $defaultClass]) }}
|
||||
<textarea {{ $allowTab ? '@keydown.tab=handleKeydown' : '' }} placeholder="{{ $placeholder }}" {{ !$spellcheck ? 'spellcheck=false' : '' }} {{ $attributes->merge(['class' => $defaultClass]) }}
|
||||
@if ($realtimeValidation) wire:model.debounce.200ms="{{ $id }}"
|
||||
@else
|
||||
wire:model={{ $value ?? $id }}
|
||||
|
||||
@@ -156,6 +156,33 @@
|
||||
Destinations
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="S3 Storages"
|
||||
class="{{ request()->is('storages*') ? 'menu-item-active menu-item' : 'menu-item' }}"
|
||||
href="{{ route('storage.index') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24">
|
||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||
<path d="M4 6a8 3 0 1 0 16 0A8 3 0 1 0 4 6"/>
|
||||
<path d="M4 6v6a8 3 0 0 0 16 0V6"/>
|
||||
<path d="M4 12v6a8 3 0 0 0 16 0v-6"/>
|
||||
</g>
|
||||
</svg>
|
||||
S3 Storages
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="Shared variables"
|
||||
class="{{ request()->is('shared-variables*') ? 'menu-item-active menu-item' : 'menu-item' }}"
|
||||
href="{{ route('shared-variables.index') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24">
|
||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||
<path d="M5 4C2.5 9 2.5 14 5 20M19 4c2.5 5 2.5 10 0 16M9 9h1c1 0 1 1 2.016 3.527C13 15 13 16 14 16h1"/>
|
||||
<path d="M8 16c1.5 0 3-2 4-3.5S14.5 9 16 9"/>
|
||||
</g>
|
||||
</svg>
|
||||
Shared Variables
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="Notifications"
|
||||
class="{{ request()->is('notifications*') ? 'menu-item-active menu-item' : 'menu-item' }}"
|
||||
|
||||
@@ -6,23 +6,28 @@
|
||||
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-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]"
|
||||
x-cloak>
|
||||
class="fixed bottom-0 right-0 h-auto duration-300 ease-out px-5 pb-5 max-w-[46rem] z-[999]" x-cloak>
|
||||
<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
|
||||
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))
|
||||
{{ $icon }}
|
||||
|
||||
@endif
|
||||
|
||||
<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 }}
|
||||
</h4>
|
||||
<p class="">{{ $description }}</span></p>
|
||||
<div>{{ $description }}</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>
|
||||
|
||||
@@ -2,13 +2,7 @@
|
||||
<livewire:server.proxy.modal :server="$server" />
|
||||
<div class="flex items-center gap-2">
|
||||
<h1>Server</h1>
|
||||
@if (
|
||||
$server->proxyType() !== 'NONE' &&
|
||||
$server->isFunctional() &&
|
||||
!$server->isSwarmWorker() &&
|
||||
!$server->settings->is_build_server)
|
||||
<livewire:server.proxy.status :server="$server" />
|
||||
@endif
|
||||
<livewire:server.proxy.status :server="$server" />
|
||||
</div>
|
||||
<div class="subtitle">{{ data_get($server, 'name') }}.</div>
|
||||
<nav class="navbar-main">
|
||||
@@ -52,12 +46,6 @@
|
||||
@endif
|
||||
|
||||
<div class="flex-1"></div>
|
||||
@if (
|
||||
$server->proxyType() !== 'NONE' &&
|
||||
$server->isFunctional() &&
|
||||
!$server->isSwarmWorker() &&
|
||||
!$server->settings->is_build_server)
|
||||
<livewire:server.proxy.deploy :server="$server" />
|
||||
@endif
|
||||
<livewire:server.proxy.deploy :server="$server" />
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<div class="flex items-end gap-2">
|
||||
<h1>Team</h1>
|
||||
<x-modal-input buttonTitle="+ Add" title="New Team">
|
||||
<livewire:team.create/>
|
||||
<livewire:team.create />
|
||||
</x-modal-input>
|
||||
</div>
|
||||
<div class="subtitle">Team settings & shared environment variables.</div>
|
||||
<div class="subtitle">Team wide configurations.</div>
|
||||
<nav class="navbar-main">
|
||||
<a class="{{ request()->routeIs('team.index') ? 'dark:text-white' : '' }}" href="{{ route('team.index') }}">
|
||||
<button>General</button>
|
||||
@@ -14,14 +14,6 @@
|
||||
href="{{ route('team.member.index') }}">
|
||||
<button>Members</button>
|
||||
</a>
|
||||
<a class="{{ request()->routeIs('team.storage.index') ? 'dark:text-white' : '' }}"
|
||||
href="{{ route('team.storage.index') }}">
|
||||
<button>S3 Storages</button>
|
||||
</a>
|
||||
<a class="{{ request()->routeIs('team.shared-variables.index') ? 'dark:text-white' : '' }}"
|
||||
href="{{ route('team.shared-variables.index') }}">
|
||||
<button>Shared Variables</button>
|
||||
</a>
|
||||
<div class="flex-1"></div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<x-emails.layout>
|
||||
Database backup for {{ $name }} with frequency of {{ $frequency }} was FAILED.
|
||||
Database backup for {{ $name }} @if($database_name)(db:{{ $database_name }})@endif with frequency of {{ $frequency }} was FAILED.
|
||||
|
||||
### Reason
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<x-emails.layout>
|
||||
Database backup for {{ $name }} with frequency of {{ $frequency }} was successful.
|
||||
Database backup for {{ $name }} @if($database_name)(db:{{ $database_name }})@endif with frequency of {{ $frequency }} was successful.
|
||||
</x-emails.layout>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
@php use App\Enums\ProxyTypes; @endphp
|
||||
<section class="flex flex-col h-full lg:items-center lg:justify-center">
|
||||
<div class="flex flex-col items-center justify-center p-10 mx-2 mt-10 bg-white border rounded-lg shadow lg:p-20 dark:bg-transparent dark:border-none max-w-7xl ">
|
||||
<div
|
||||
class="flex flex-col items-center justify-center p-10 mx-2 mt-10 bg-white border rounded-lg shadow lg:p-20 dark:bg-transparent dark:border-none max-w-7xl ">
|
||||
@if ($currentState === 'welcome')
|
||||
<h1 class="text-3xl font-bold lg:text-5xl">Welcome to Coolify</h1>
|
||||
<div class="py-6 text-center lg:text-xl">Let me help you set up the basics.</div>
|
||||
<div class="flex justify-center ">
|
||||
<x-forms.button class="justify-center w-64 box-boarding" wire:click="$set('currentState','explanation')">Get
|
||||
<x-forms.button class="justify-center w-64 box-boarding"
|
||||
wire:click="$set('currentState','explanation')">Get
|
||||
Started
|
||||
</x-forms.button>
|
||||
</div>
|
||||
@@ -60,7 +62,8 @@
|
||||
server.
|
||||
<br />
|
||||
Check this <a target="_blank" class="underline"
|
||||
href="https://coolify.io/docs/knowledge-base/server/openssh">documentation</a> for further help.
|
||||
href="https://coolify.io/docs/knowledge-base/server/openssh">documentation</a> for further
|
||||
help.
|
||||
<x-forms.input readonly id="serverPublicKey"></x-forms.input>
|
||||
<x-forms.button class="lg:w-64 box-boarding" wire:target="setServerType('localhost')"
|
||||
wire:click="setServerType('localhost')">Check again
|
||||
@@ -120,7 +123,8 @@
|
||||
<x-slot:actions>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div>
|
||||
<x-forms.button class="justify-center w-64 box-boarding" wire:click="createNewServer">No (create
|
||||
<x-forms.button class="justify-center w-64 box-boarding" wire:click="createNewServer">No
|
||||
(create
|
||||
one
|
||||
for
|
||||
me)
|
||||
@@ -146,7 +150,8 @@
|
||||
'root' or skip the boarding process and add a new private key manually to Coolify and to the
|
||||
server.
|
||||
<x-forms.input readonly id="serverPublicKey"></x-forms.input>
|
||||
<x-forms.button class="w-64 box-boarding" wire:target="validateServer" wire:click="validateServer">Check
|
||||
<x-forms.button class="w-64 box-boarding" wire:target="validateServer"
|
||||
wire:click="validateServer">Check
|
||||
again
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@@ -207,9 +212,14 @@
|
||||
<x-forms.input required placeholder="127.0.0.1" label="IP Address" id="remoteServerHost" />
|
||||
<x-forms.input required placeholder="Port number of your server. Default is 22."
|
||||
label="Port" id="remoteServerPort" />
|
||||
<x-forms.input required readonly
|
||||
placeholder="Username to connect to your server. Default is root." label="Username"
|
||||
id="remoteServerUser" />
|
||||
<div class="w-full">
|
||||
<x-forms.input required placeholder="User to connect to your server. Default is root."
|
||||
label="User" id="remoteServerUser" />
|
||||
<div class="text-xs dark:text-warning text-coollabs ">Non-root user is experimental: <a
|
||||
class="font-bold underline" target="_blank"
|
||||
href="https://coolify.io/docs/knowledge-base/server/non-root-user">docs</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:w-64">
|
||||
<x-forms.checkbox
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
<h1>Dashboard</h1>
|
||||
<div class="subtitle">Your self-hosted infrastructure.</div>
|
||||
@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"
|
||||
viewBox="0 0 24 24">
|
||||
<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>
|
||||
<span>Your subscription has been activated! Welcome onboard! <br>It could take a few seconds before your
|
||||
subscription is activated.<br> Please be patient.</span>
|
||||
Your subscription has been activated! Welcome onboard! <br>It could take a few seconds before your
|
||||
subscription is activated.<br> Please be patient.
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="pb-4">Projects</h3>
|
||||
|
||||
@@ -5,14 +5,12 @@
|
||||
<x-forms.input id="name" label="Name" required />
|
||||
<x-forms.input id="network" label="Network" required />
|
||||
</div>
|
||||
@if ($server_id)
|
||||
<x-forms.select id="server_id" label="Select a server" required wire:change="generate_name">
|
||||
<option disabled>Select a server</option>
|
||||
@foreach ($servers as $server)
|
||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||
@endforeach
|
||||
</x-forms.select>
|
||||
@endif
|
||||
<x-forms.select id="server_id" label="Select a server" required wire:change="generate_name">
|
||||
<option disabled>Select a server</option>
|
||||
@foreach ($servers as $server)
|
||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||
@endforeach
|
||||
</x-forms.select>
|
||||
<x-forms.button type="submit">
|
||||
Continue
|
||||
</x-forms.button>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>Your feedback helps us to improve Coolify. Thank you! 💜</div>
|
||||
<form wire:submit="submit" class="flex flex-col gap-4 pt-4">
|
||||
<x-forms.input id="subject" label="Subject" placeholder="Summary of your problem."></x-forms.input>
|
||||
<x-forms.textarea rows="10" id="description" label="Description"
|
||||
<x-forms.textarea rows="10" id="description" label="Description" class="font-sans" spellcheck
|
||||
placeholder="Please provide as much information as possible."></x-forms.textarea>
|
||||
<div></div>
|
||||
<x-forms.button class="w-full mt-4" type="submit" @click="modalOpen=false">Send</x-forms.button>
|
||||
|
||||
@@ -25,8 +25,21 @@
|
||||
instantSave id="is_gzip_enabled" />
|
||||
<x-forms.checkbox helper="Strip Prefix is used to remove prefixes from paths. Like /api/ to /api."
|
||||
instantSave id="is_stripprefix_enabled" label="Strip Prefixes" />
|
||||
<h3>Logs</h3>
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
<x-forms.checkbox instantSave id="application.settings.is_raw_compose_deployment_enabled"
|
||||
label="Raw Compose Deployment"
|
||||
helper="WARNING: Advanced use cases only. Your docker compose file will be deployed as-is. Nothing is modified by Coolify. You need to configure the proxy parts. More info in the <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/docker/compose#raw-docker-compose-deployment'>documentation.</a>" />
|
||||
@endif
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
<h3>Network</h3>
|
||||
<div class="w-96">
|
||||
<x-forms.checkbox instantSave id="application.settings.connect_to_docker_network"
|
||||
label="Connect To Predefined Network"
|
||||
helper="By default, you do not reach the Coolify defined networks.<br>Starting a docker compose based resource will have an internal network. <br>If you connect to a Coolify defined network, you maybe need to use different internal DNS names to connect to a resource.<br><br>For more information, check <a class='underline dark:text-white' target='_blank' href='https://coolify.io/docs/knowledge-base/docker/compose#connect-to-predefined-networks'>this</a>." />
|
||||
</div>
|
||||
@endif
|
||||
@if (!$application->settings->is_raw_compose_deployment_enabled)
|
||||
<h3>Logs</h3>
|
||||
<x-forms.checkbox helper="Drain logs to your configured log drain endpoint in your Server settings."
|
||||
instantSave id="application.settings.is_log_drain_enabled" label="Drain Logs" />
|
||||
@endif
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
@foreach (decode_remote_command_output($application_deployment_queue) as $line)
|
||||
<span @class([
|
||||
'dark:text-warning whitespace-pre-line' => $line['hidden'],
|
||||
'text-red-500 font-bold' => $line['type'] == 'stderr',
|
||||
'text-red-500 font-bold whitespace-pre-line' => $line['type'] == 'stderr',
|
||||
])>[{{ $line['timestamp'] }}] @if ($line['hidden'])
|
||||
<br><br>[COMMAND] {{ $line['command'] }}<br>[OUTPUT]
|
||||
@endif @if (str($line['output'])->contains('http://') || str($line['output'])->contains('https://'))
|
||||
@@ -100,7 +100,7 @@
|
||||
@endphp {!! $line['output'] !!}
|
||||
@else
|
||||
{{ $line['output'] }}
|
||||
|
||||
|
||||
@endif
|
||||
</span>
|
||||
@endforeach
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<h2>General</h2>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</x-forms.button>
|
||||
</div>
|
||||
<div>General configuration for your application.</div>
|
||||
<div class="flex flex-col gap-2 py-4">
|
||||
@@ -38,18 +38,13 @@
|
||||
</div>
|
||||
@endif
|
||||
@if ($application->build_pack === 'dockercompose')
|
||||
<div class="w-96">
|
||||
<x-forms.checkbox instantSave id="application.settings.is_raw_compose_deployment_enabled"
|
||||
label="Raw Compose Deployment"
|
||||
helper="WARNING: Advanced use cases only. Your docker compose file will be deployed as-is. Nothing is modified by Coolify. You need to configure the proxy parts. More info in the <a href='https://coolify.io/docs/knowledge-base/docker/compose#raw-docker-compose-deployment'>documentation.</a>" />
|
||||
</div>
|
||||
@if (count($parsedServices) > 0 && !$application->settings->is_raw_compose_deployment_enabled)
|
||||
<h3>Domains</h3>
|
||||
<h3 class="pt-6">Domains</h3>
|
||||
@foreach (data_get($parsedServices, 'services') as $serviceName => $service)
|
||||
@if (!isDatabaseImage(data_get($service, 'image')))
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. "
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io,https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. "
|
||||
label="Domains for {{ str($serviceName)->headline() }}"
|
||||
id="parsedServiceDomains.{{ $serviceName }}.domain"></x-forms.input>
|
||||
<x-forms.button wire:click="generateDomain('{{ $serviceName }}')">Generate
|
||||
@@ -64,7 +59,7 @@
|
||||
@if ($application->build_pack !== 'dockercompose')
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input placeholder="https://coolify.io" id="application.fqdn" label="Domains"
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. " />
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io,https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. " />
|
||||
<x-forms.button wire:click="getWildcardDomain">Generate Domain
|
||||
</x-forms.button>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="coollabsio/coolify-example" id="application.git_repository"
|
||||
<x-forms.input placeholder="coollabsio/coolify-example" id="application.git_repository" readonly
|
||||
label="Repository" />
|
||||
<x-forms.input placeholder="main" id="application.git_branch" label="Branch" />
|
||||
</div>
|
||||
@@ -36,10 +36,10 @@
|
||||
label="Commit SHA" />
|
||||
</div>
|
||||
</div>
|
||||
@isset($application->private_key_id)
|
||||
@if(data_get($application, 'private_key_id'))
|
||||
<h3 class="pt-4">Deploy Key</h3>
|
||||
<div class="py-2 pt-4">Currently attached Private Key: <span
|
||||
class="dark:text-warning">{{ $application->private_key->name }}</span>
|
||||
class="dark:text-warning">{{ data_get($application, 'private_key.name') }}</span>
|
||||
</div>
|
||||
|
||||
<h4 class="py-2 ">Select another Private Key</h4>
|
||||
@@ -49,6 +49,6 @@
|
||||
</x-forms.button>
|
||||
@endforeach
|
||||
</div>
|
||||
@endisset
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,43 +1,51 @@
|
||||
<div class="flex flex-col-reverse gap-2">
|
||||
@forelse($executions as $execution)
|
||||
<form wire:key="{{ data_get($execution, 'id') }}"
|
||||
class="relative flex flex-col p-4 bg-white box-without-bg dark:bg-coolgray-100" @class([
|
||||
'border-green-500' => data_get($execution, 'status') === 'success',
|
||||
'border-red-500' => data_get($execution, 'status') === 'failed',
|
||||
])>
|
||||
@if (data_get($execution, 'status') === 'running')
|
||||
<div class="absolute top-2 right-2">
|
||||
<x-loading />
|
||||
</div>
|
||||
@endif
|
||||
<div>Database: {{ data_get($execution, 'database_name', 'N/A') }}</div>
|
||||
<div>Status: {{ data_get($execution, 'status') }}</div>
|
||||
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
|
||||
@if (data_get($execution, 'message'))
|
||||
<div>Message: {{ data_get($execution, 'message') }}</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>
|
||||
<div>
|
||||
<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>
|
||||
<div class="flex flex-col-reverse gap-2">
|
||||
@forelse($executions as $execution)
|
||||
<form wire:key="{{ data_get($execution, 'id') }}"
|
||||
class="relative flex flex-col p-4 bg-white box-without-bg dark:bg-coolgray-100"
|
||||
@class([
|
||||
'border-green-500' => data_get($execution, 'status') === 'success',
|
||||
'border-red-500' => data_get($execution, 'status') === 'failed',
|
||||
])>
|
||||
@if (data_get($execution, 'status') === 'running')
|
||||
<div class="absolute top-2 right-2">
|
||||
<x-loading />
|
||||
</div>
|
||||
@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>
|
||||
<div>Database: {{ data_get($execution, 'database_name', 'N/A') }}</div>
|
||||
<div>Status: {{ data_get($execution, 'status') }}</div>
|
||||
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
|
||||
@if (data_get($execution, 'message'))
|
||||
<div>Message: {{ data_get($execution, 'message') }}</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
|
||||
<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
|
||||
<div>No executions found.</div>
|
||||
@endforelse
|
||||
@empty
|
||||
<div>No executions found.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
<script>
|
||||
function download_file(executionId) {
|
||||
window.open('/download/backup/' + executionId, '_blank');
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
<livewire:project.database.heading :database="$database" />
|
||||
<div class="pt-6">
|
||||
<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" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
@endforeach
|
||||
@endif
|
||||
</x-forms.select>
|
||||
<x-forms.button type="submit" @click="slideOverOpen=false">
|
||||
<x-forms.button type="submit" @click="modalOpen=false">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</form>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div x-data="{ error: $wire.entangle('error'), filesize: $wire.entangle('filesize'), filename: $wire.entangle('filename'), isUploading: $wire.entangle('isUploading'), progress: $wire.entangle('progress') }">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/dropzone.min.js"
|
||||
integrity="sha512-U2WE1ktpMTuRBPoCFDzomoIorbOyUv0sP8B+INA3EzNAhehbzED1rOJg6bCqPf/Tuposxb5ja/MAUnC8THSbLQ=="
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer" defer async></script>
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
@script
|
||||
<script>
|
||||
Dropzone.options.myDropzone = {
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@forelse($database->scheduledBackups as $backup)
|
||||
@if ($type == 'database')
|
||||
<div class="box">
|
||||
<a class="flex flex-col"
|
||||
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
|
||||
<a class="box"
|
||||
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
|
||||
<div class="flex flex-col">
|
||||
<div>Frequency: {{ $backup->frequency }}</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>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@else
|
||||
<div class="box">
|
||||
<div class="box" wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')">
|
||||
<div @class([
|
||||
'border-coollabs' =>
|
||||
data_get($backup, 'id') === data_get($selectedBackup, 'id'),
|
||||
'flex flex-col border-l-2 border-transparent',
|
||||
]) wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')">
|
||||
])>
|
||||
<div>Frequency: {{ $backup->frequency }}</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>
|
||||
|
||||
@@ -14,24 +14,4 @@
|
||||
<x-forms.input label="Description" id="project.description" />
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex gap-2">
|
||||
<h2>Shared Variables</h2>
|
||||
<x-modal-input buttonTitle="+ Add" title="New Shared Variable">
|
||||
<livewire:project.shared.environment-variable.add :shared="true" />
|
||||
</x-modal-input>
|
||||
</div>
|
||||
<div class="pb-4 lg:flex lg:gap-1">
|
||||
<div>You can use these variables anywhere with</div>
|
||||
<div class=" dark:text-warning text-coollabs">@{{ project.VARIABLENAME }} </div>
|
||||
<x-helper
|
||||
helper="More info <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/environment-variables#shared-variables' target='_blank'>here</a>."></x-helper>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
@forelse ($project->environment_variables->sort()->sortBy('key') as $env)
|
||||
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" type="project" />
|
||||
@empty
|
||||
<div>No environment variables found.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,21 +42,4 @@
|
||||
<x-forms.input label="Description" id="environment.description" />
|
||||
</div>
|
||||
</form>
|
||||
<div class="flex gap-2 pt-10">
|
||||
<h2>Shared Variables</h2>
|
||||
<x-modal-input buttonTitle="+ Add" title="New Shared Variable">
|
||||
<livewire:project.shared.environment-variable.add :shared="true" />
|
||||
</x-modal-input>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 pb-4">You can use these variables anywhere with <span class="dark:text-warning text-coollabs">@{{environment.VARIABLENAME}}</span><x-helper
|
||||
helper="More info <a class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/environment-variables#shared-variables' target='_blank'>here</a>."></x-helper>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
@forelse ($environment->environment_variables->sort()->sortBy('key') as $env)
|
||||
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" type="environment" />
|
||||
@empty
|
||||
<div>No environment variables found.</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="pb-4">Deploy any public Git repositories.</div>
|
||||
<form class="flex flex-col gap-2" wire:submit='load_branch'>
|
||||
<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">
|
||||
<x-forms.input required id="repository_url" label="Repository URL (https://)" helper="{!! __('repository.url') !!}" />
|
||||
<x-forms.button type="submit">
|
||||
|
||||
@@ -576,9 +576,9 @@
|
||||
@empty
|
||||
<div class="w-96">No service found. Please try to reload the list!</div>
|
||||
@endforelse
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@if ($current_step === 'servers')
|
||||
<h2>Select a server</h2>
|
||||
@@ -645,4 +645,3 @@
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,326 +45,316 @@
|
||||
class="items-center justify-center box">+ Add New Resource</a>
|
||||
@else
|
||||
<div x-data="searchComponent()">
|
||||
<x-forms.input autofocus placeholder="Search for name, fqdn..." x-model="search" />
|
||||
<x-forms.input autofocus placeholder="Search for name, fqdn..." x-model="search" id="null" />
|
||||
<div class="grid grid-cols-1 gap-4 pt-4 lg:grid-cols-2 xl:grid-cols-3">
|
||||
<template x-for="item in filteredApplications" :key="item.id">
|
||||
<template x-for="item in filteredApplications" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col w-full px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 box-title" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate box-description" x-text="item.description"></div>
|
||||
<div class="max-w-full truncate box-description" x-text="item.fqdn"></div>
|
||||
<div class="max-w-full px-4 truncate box-description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate box-description" x-text="item.fqdn"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex flex-wrap gap-1 pt-1 group-hover:dark:text-white group-hover:text-black group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredPostgresqls" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full px-4 truncate box-description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group-hover:text-black group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredPostgresqls" :key="item.id">
|
||||
<template x-for="item in filteredRedis" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold box-title" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate box-description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group-hover:text-black group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredRedis" :key="item.id">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredMongodbs" :key="item.id">
|
||||
<template x-for="item in filteredMongodbs" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredMysqls" :key="item.id">
|
||||
<template x-for="item in filteredMysqls" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredMariadbs" :key="item.id">
|
||||
<template x-for="item in filteredMariadbs" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredKeydbs" :key="item.id">
|
||||
<template x-for="item in filteredKeydbs" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredDragonflies" :key="item.id">
|
||||
<template x-for="item in filteredDragonflies" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredClickhouses" :key="item.id">
|
||||
<template x-for="item in filteredClickhouses" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
<template x-for="item in filteredServices" :key="item.id">
|
||||
<template x-for="item in filteredServices" :key="item.uuid">
|
||||
<span>
|
||||
<a class="h-24 box group" :href="item.hrefLink">
|
||||
<div class="flex flex-col px-4 mx-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex gap-2 px-4">
|
||||
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||
<div class="flex-1"></div>
|
||||
<template x-if="item.status.startsWith('running')">
|
||||
<div title="running" class="mt-1 bg-success badge "></div>
|
||||
<div title="running" class="bg-success badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('exited')">
|
||||
<div title="exited" class="mt-1 bg-error badge "></div>
|
||||
<div title="exited" class="bg-error badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('restarting')">
|
||||
<div title="restarting" class="mt-1 bg-warningbadge "></div>
|
||||
<div title="restarting" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
<template x-if="item.status.startsWith('degraded')">
|
||||
<div title="degraded" class="mt-1 bg-warning badge "></div>
|
||||
<div title="degraded" class="bg-warning badge badge-absolute"></div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="max-w-full truncate description" x-text="item.description"></div>
|
||||
<div class="max-w-full px-4 truncate description" x-text="item.description"></div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||
<template x-for="tag in item.tags">
|
||||
<div class="tag"
|
||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||
</template>
|
||||
<div class="add-tag"
|
||||
@click.prevent="goto(item)">Add tag</div>
|
||||
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
@@ -405,7 +395,7 @@
|
||||
}
|
||||
this.applications = Object.values(this.applications);
|
||||
return this.applications.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.fqdn?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
@@ -417,7 +407,7 @@
|
||||
}
|
||||
this.postgresqls = Object.values(this.postgresqls);
|
||||
return this.postgresqls.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
@@ -428,7 +418,7 @@
|
||||
}
|
||||
this.redis = Object.values(this.redis);
|
||||
return this.redis.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
@@ -439,7 +429,7 @@
|
||||
}
|
||||
this.mongodbs = Object.values(this.mongodbs);
|
||||
return this.mongodbs.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
@@ -450,7 +440,7 @@
|
||||
}
|
||||
this.mysqls = Object.values(this.mysqls);
|
||||
return this.mysqls.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
@@ -461,7 +451,7 @@
|
||||
}
|
||||
this.mariadbs = Object.values(this.mariadbs);
|
||||
return this.mariadbs.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
@@ -472,7 +462,7 @@
|
||||
}
|
||||
this.keydbs = Object.values(this.keydbs);
|
||||
return this.keydbs.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
@@ -483,7 +473,7 @@
|
||||
}
|
||||
this.dragonflies = Object.values(this.dragonflies);
|
||||
return this.dragonflies.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
@@ -494,7 +484,7 @@
|
||||
}
|
||||
this.clickhouses = Object.values(this.clickhouses);
|
||||
return this.clickhouses.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
@@ -505,7 +495,7 @@
|
||||
}
|
||||
this.services = Object.values(this.services);
|
||||
return this.services.filter(item => {
|
||||
return item.name.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
return item.name?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.description?.toLowerCase().includes(this.search.toLowerCase()) ||
|
||||
item.tags?.some(tag => tag.name.toLowerCase().includes(this.search.toLowerCase()));
|
||||
}).sort(sortFn);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<form wire:submit.prevent='submit' class="flex flex-col w-full gap-2">
|
||||
<div class="pb-2">Note: If a service has a defined port, do not delete it. <br>If you want to use your custom domain, you can add it with a port.</div>
|
||||
<x-forms.input required placeholder="https://app.coolify.io" label="Domains" id="application.fqdn"
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. "></x-forms.input>
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io,https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. "></x-forms.input>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
</form>
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
@if ($application->required_fqdn)
|
||||
<x-forms.input required placeholder="https://app.coolify.io" label="Domains"
|
||||
id="application.fqdn"
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. "></x-forms.input>
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io,https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. "></x-forms.input>
|
||||
@else
|
||||
<x-forms.input placeholder="https://app.coolify.io" label="Domains" id="application.fqdn"
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. "></x-forms.input>
|
||||
helper="You can specify one domain with path or more with comma. You can specify a port to bind the domain to.<br><br><span class='text-helper'>Example</span><br>- http://app.coolify.io,https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3<br>- http://app.coolify.io:3000 -> app.coolify.io will point to port 3000 inside the container. "></x-forms.input>
|
||||
@endif
|
||||
@endif
|
||||
<x-forms.input required
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
The latest configuration has not been applied
|
||||
</x-slot:title>
|
||||
<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">
|
||||
<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" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div>
|
||||
<form wire:submit='submit'
|
||||
class="flex flex-col items-center gap-4 p-4 bg-white border lg:items-start dark:bg-base dark:border-coolgray-300">
|
||||
@if (!$env->isFoundInCompose)
|
||||
@if (!$env->isFoundInCompose && !$isSharedVariable)
|
||||
<div class="flex items-center justify-center gap-2 dark:text-warning text-coollabs"> <svg
|
||||
class="hidden w-4 h-4 dark:text-warning lg:block" viewBox="0 0 256 256"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
stroke-width="2" d="M12 5v14m4-4l-4 4m-4-4l4 4" />
|
||||
</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"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="none">
|
||||
|
||||
@@ -5,27 +5,33 @@
|
||||
</div>
|
||||
<div class="pb-4">Define how your resource's health should be checked.</div>
|
||||
<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">
|
||||
<x-forms.checkbox instantSave id="resource.health_check_enabled" label="Enabled" />
|
||||
</div>
|
||||
<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_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_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" />
|
||||
<x-forms.input id="resource.health_check_path" placeholder="/health" label="Path" required />
|
||||
</div>
|
||||
<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" />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input id="resource.health_check_interval" placeholder="30" label="Interval" required />
|
||||
<x-forms.input id="resource.health_check_timeout" placeholder="30" label="Timeout" required />
|
||||
<x-forms.input id="resource.health_check_retries" placeholder="3" label="Retries" required />
|
||||
<x-forms.input id="resource.health_check_start_period" placeholder="30" label="Start Period" required />
|
||||
<x-forms.input min=1 type="number" id="resource.health_check_interval" placeholder="30" label="Interval"
|
||||
required />
|
||||
<x-forms.input type="number" id="resource.health_check_timeout" placeholder="30" label="Timeout"
|
||||
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>
|
||||
</form>
|
||||
|
||||
@@ -1,58 +1,53 @@
|
||||
<div>
|
||||
<h2>Resource Operations</h2>
|
||||
<div class="pb-4">You can easily make different kind of operations on this resource.</div>
|
||||
<h4>Clone</h4>
|
||||
<div class="pb-8">
|
||||
<div class="pb-2">
|
||||
Clone this resource to another project / environment.
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<h3>Clone</h3>
|
||||
<div class="pb-4">To another project / environment on a different server.</div>
|
||||
<div class="pb-4">
|
||||
<div class="flex flex-col flex-wrap gap-2">
|
||||
@foreach ($servers->sortBy('id') as $server)
|
||||
<div>
|
||||
<div class="grid grid-cols-1 gap-2 pb-4 lg:grid-cols-4">
|
||||
@foreach ($server->destinations() as $destination)
|
||||
<x-modal-confirmation action="cloneTo({{ data_get($destination, 'id') }})">
|
||||
<x:slot name="content">
|
||||
<div class="box">
|
||||
<div class="flex flex-col">
|
||||
<div class="box-title">{{ $server->name }}</div>
|
||||
<div class="box-description">{{ $destination->name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</x:slot>
|
||||
<div>You are about to clone this resource.</div>
|
||||
</x-modal-confirmation>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<h5>Server: <span class="font-bold text-white">{{ $server->name }}</span></h5>
|
||||
@foreach ($server->destinations() as $destination)
|
||||
<x-modal-confirmation action="cloneTo({{ data_get($destination, 'id') }})">
|
||||
<x:slot name="content">
|
||||
<div class="box group">
|
||||
<div class="flex flex-col">
|
||||
<div class="box-title">Network</div>
|
||||
<div class="box-description">{{ $destination->name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</x:slot>
|
||||
<div>You are about to clone this resource.</div>
|
||||
</x-modal-confirmation>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<h4>Move</h4>
|
||||
<h3>Move</h3>
|
||||
<div class="pb-4">Between projects / environments.</div>
|
||||
<div>
|
||||
<div class="pb-8">
|
||||
<div class="pb-2">
|
||||
This resource is currently in the <span
|
||||
class="font-bold dark:text-warning">{{ $resource->environment->project->name }} /
|
||||
{{ $resource->environment->name }}</span> environment.
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<div class="flex flex-col flex-wrap gap-2">
|
||||
@forelse ($projects as $project)
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@foreach ($project->environments as $environment)
|
||||
<x-modal-confirmation action="moveTo({{ data_get($environment, 'id') }})">
|
||||
<x:slot name="content">
|
||||
<div class="box">
|
||||
<div class="flex flex-col">
|
||||
<div class="box-title">{{ $project->name }}</div>
|
||||
<div class="box-description">environment: {{ $environment->name }}
|
||||
</div>
|
||||
</div>
|
||||
<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') }})">
|
||||
<x:slot name="content">
|
||||
<div class="box group">
|
||||
<div class="flex flex-col">
|
||||
<div class="box-title">Environment</div>
|
||||
<div class="box-description">{{ $environment->name }}</div>
|
||||
</div>
|
||||
</x:slot>
|
||||
<div>You are about to move this resource.</div>
|
||||
</x-modal-confirmation>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</x:slot>
|
||||
<div>You are about to move this resource.</div>
|
||||
</x-modal-confirmation>
|
||||
@endforeach
|
||||
@empty
|
||||
<div>No projects found to move to</div>
|
||||
@endforelse
|
||||
|
||||
@@ -2,11 +2,17 @@
|
||||
<form wire:submit='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||
@if ($isReadOnly)
|
||||
@if ($isFirst)
|
||||
<x-forms.input id="storage.name" label="Volume Name" required readonly />
|
||||
<x-forms.input id="storage.host_path" label="Source Path (on host)" readonly />
|
||||
<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." />
|
||||
<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.button type="submit">
|
||||
Update
|
||||
</x-forms.button>
|
||||
@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." />
|
||||
<x-forms.input id="storage.host_path" readonly />
|
||||
<x-forms.input id="storage.mount_path" required readonly />
|
||||
@endif
|
||||
@@ -25,7 +31,8 @@
|
||||
Update
|
||||
</x-forms.button>
|
||||
<x-modal-confirmation isErrorButton buttonTitle="Delete">
|
||||
This storage will be deleted <span class="font-bold dark:text-warning">{{ $storage->name }}</span>. It
|
||||
This storage will be deleted <span class="font-bold dark:text-warning">{{ $storage->name }}</span>.
|
||||
It
|
||||
is
|
||||
not
|
||||
reversible. <br>Please think again.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<h2>Tags</h2>
|
||||
<div class="flex gap-2 pt-4">
|
||||
<div class="flex flex-wrap gap-2 pt-4">
|
||||
@if (data_get($this->resource, 'tags'))
|
||||
@forelse (data_get($this->resource,'tags') as $tagId => $tag)
|
||||
<div
|
||||
@@ -29,7 +29,7 @@
|
||||
@if (count($tags) > 0)
|
||||
<h3 class="pt-4">Exisiting Tags</h3>
|
||||
<div>Click to add quickly</div>
|
||||
<div class="flex gap-2 pt-4">
|
||||
<div class="flex flex-wrap gap-2 pt-4">
|
||||
@foreach ($tags as $tag)
|
||||
<x-forms.button wire:click="addTag('{{ $tag->id }}','{{ $tag->name }}')">
|
||||
{{ $tag->name }}</x-forms.button>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<form wire:submit='submit'>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Configuration</h2>
|
||||
@if ($server->proxy->status === 'exited')
|
||||
@if ($server->proxy->status === 'exited' || $server->proxy->status === 'removing')
|
||||
<x-forms.button wire:click.prevent="change_proxy">Switch Proxy</x-forms.button>
|
||||
@else
|
||||
<x-forms.button disabled wire:click.prevent="change_proxy">Switch Proxy</x-forms.button>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<div>
|
||||
@if ($server->isFunctional() && $server->proxyType() !== 'NONE')
|
||||
@if (
|
||||
$server->proxyType() !== 'NONE' &&
|
||||
$server->isFunctional() &&
|
||||
!$server->isSwarmWorker() &&
|
||||
!$server->settings->is_build_server)
|
||||
<x-slide-over closeWithX fullScreen @startproxy.window="slideOverOpen = true">
|
||||
<x-slot:title>Proxy Status</x-slot:title>
|
||||
<x-slot:content>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<div x-init="$wire.checkProxy()">
|
||||
@if ($server->isFunctional())
|
||||
@if (
|
||||
$server->proxyType() !== 'NONE' &&
|
||||
$server->isFunctional() &&
|
||||
!$server->isSwarmWorker() &&
|
||||
!$server->settings->is_build_server)
|
||||
<div class="flex gap-2">
|
||||
@if (data_get($server, 'proxy.status') === 'running')
|
||||
<x-status.running status="Proxy Running" />
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<div>
|
||||
<div class="flex gap-2">
|
||||
<h1>Environments</h1>
|
||||
</div>
|
||||
<div class="subtitle">List of your environments by projects.</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
@forelse ($projects as $project)
|
||||
<h2>{{ data_get($project, 'name') }}</h2>
|
||||
<div class="pt-0 pb-3">{{ data_get($project, 'description') }}</div>
|
||||
@forelse ($project->environments as $environment)
|
||||
<a class="box group"
|
||||
href="{{ route('shared-variables.environment.show', ['project_uuid' => $project->uuid, 'environment_name' => $environment->name]) }}">
|
||||
<div class="flex flex-col justify-center flex-1 mx-6 ">
|
||||
<div class="box-title"> {{ $environment->name }}</div>
|
||||
<div class="box-description">
|
||||
{{ $environment->description }}</div>
|
||||
</div>
|
||||
</a>
|
||||
@empty
|
||||
<p>No environments found.</p>
|
||||
@endforelse
|
||||
@empty
|
||||
<div>
|
||||
<div>No project found.</div>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user