mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-31 20:59:23 +00:00
Compare commits
115 Commits
v4.0.0-bet
...
v4.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
3843994a05 | ||
|
|
a1b08ca037 | ||
|
|
144cdd11ec | ||
|
|
b6531cdb10 | ||
|
|
0eef4a5fa1 | ||
|
|
42baaf8f2d | ||
|
|
08d9dff8eb | ||
|
|
01b3aab9bc | ||
|
|
fde34ef178 | ||
|
|
5195abec94 | ||
|
|
aa79acd09e | ||
|
|
67011ccd72 | ||
|
|
e2cd7fe17e | ||
|
|
4c0624f489 | ||
|
|
8c033250b1 | ||
|
|
05b5a6fddf | ||
|
|
df5bde7b8e | ||
|
|
ca5f52c48c | ||
|
|
3656adf059 | ||
|
|
4381792b05 | ||
|
|
0a3c20b08a | ||
|
|
4ab3f41665 | ||
|
|
c75ce9cbba | ||
|
|
10356a4376 | ||
|
|
4fb4e19e99 | ||
|
|
98c2056f53 | ||
|
|
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`
|
Mails are caught by Mailpit: `localhost:8025`
|
||||||
|
|
||||||
## New Service Contribution
|
## 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();
|
$keydbs = StandaloneKeydb::withTrashed()->whereNotNull('deleted_at')->get();
|
||||||
foreach ($keydbs as $keydb) {
|
foreach ($keydbs as $keydb) {
|
||||||
echo "Deleting stuck keydb: {$keydb->name}\n";
|
echo "Deleting stuck keydb: {$keydb->name}\n";
|
||||||
$redis->forceDelete();
|
$keydb->forceDelete();
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
echo "Error in cleaning stuck keydb: {$e->getMessage()}\n";
|
echo "Error in cleaning stuck keydb: {$e->getMessage()}\n";
|
||||||
@@ -71,7 +71,7 @@ class CleanupStuckedResources extends Command
|
|||||||
$dragonflies = StandaloneDragonfly::withTrashed()->whereNotNull('deleted_at')->get();
|
$dragonflies = StandaloneDragonfly::withTrashed()->whereNotNull('deleted_at')->get();
|
||||||
foreach ($dragonflies as $dragonfly) {
|
foreach ($dragonflies as $dragonfly) {
|
||||||
echo "Deleting stuck dragonfly: {$dragonfly->name}\n";
|
echo "Deleting stuck dragonfly: {$dragonfly->name}\n";
|
||||||
$redis->forceDelete();
|
$dragonfly->forceDelete();
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
echo "Error in cleaning stuck dragonfly: {$e->getMessage()}\n";
|
echo "Error in cleaning stuck dragonfly: {$e->getMessage()}\n";
|
||||||
@@ -80,7 +80,7 @@ class CleanupStuckedResources extends Command
|
|||||||
$clickhouses = StandaloneClickhouse::withTrashed()->whereNotNull('deleted_at')->get();
|
$clickhouses = StandaloneClickhouse::withTrashed()->whereNotNull('deleted_at')->get();
|
||||||
foreach ($clickhouses as $clickhouse) {
|
foreach ($clickhouses as $clickhouse) {
|
||||||
echo "Deleting stuck clickhouse: {$clickhouse->name}\n";
|
echo "Deleting stuck clickhouse: {$clickhouse->name}\n";
|
||||||
$redis->forceDelete();
|
$clickhouse->forceDelete();
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
echo "Error in cleaning stuck clickhouse: {$e->getMessage()}\n";
|
echo "Error in cleaning stuck clickhouse: {$e->getMessage()}\n";
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class Init extends Command
|
|||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$this->alive();
|
$this->alive();
|
||||||
|
get_public_ips();
|
||||||
$full_cleanup = $this->option('full-cleanup');
|
$full_cleanup = $this->option('full-cleanup');
|
||||||
$cleanup_deployments = $this->option('cleanup-deployments');
|
$cleanup_deployments = $this->option('cleanup-deployments');
|
||||||
if ($cleanup_deployments) {
|
if ($cleanup_deployments) {
|
||||||
@@ -56,6 +57,7 @@ class Init extends Command
|
|||||||
$this->cleanup_stucked_helper_containers();
|
$this->cleanup_stucked_helper_containers();
|
||||||
$this->call('cleanup:stucked-resources');
|
$this->call('cleanup:stucked-resources');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function restore_coolify_db_backup()
|
private function restore_coolify_db_backup()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class Kernel extends ConsoleKernel
|
|||||||
$this->instance_auto_update($schedule);
|
$this->instance_auto_update($schedule);
|
||||||
$this->check_scheduled_backups($schedule);
|
$this->check_scheduled_backups($schedule);
|
||||||
$this->check_resources($schedule);
|
$this->check_resources($schedule);
|
||||||
// $this->pull_helper_image($schedule);
|
$this->pull_helper_image($schedule);
|
||||||
$this->check_scheduled_tasks($schedule);
|
$this->check_scheduled_tasks($schedule);
|
||||||
|
|
||||||
$schedule->command('cleanup:database --yes')->daily();
|
$schedule->command('cleanup:database --yes')->daily();
|
||||||
@@ -83,7 +83,7 @@ class Kernel extends ConsoleKernel
|
|||||||
}
|
}
|
||||||
private function instance_auto_update($schedule)
|
private function instance_auto_update($schedule)
|
||||||
{
|
{
|
||||||
if (isDev()) {
|
if (isDev() || isCloud()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$settings = InstanceSettings::get();
|
$settings = InstanceSettings::get();
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class Handler extends ExceptionHandler
|
|||||||
{
|
{
|
||||||
$this->reportable(function (Throwable $e) {
|
$this->reportable(function (Throwable $e) {
|
||||||
if (isDev()) {
|
if (isDev()) {
|
||||||
// return;
|
return;
|
||||||
}
|
}
|
||||||
if ($e instanceof RuntimeException) {
|
if ($e instanceof RuntimeException) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
private string $deployment_uuid;
|
private string $deployment_uuid;
|
||||||
private int $pull_request_id;
|
private int $pull_request_id;
|
||||||
private string $commit;
|
private string $commit;
|
||||||
|
private bool $rollback;
|
||||||
private bool $force_rebuild;
|
private bool $force_rebuild;
|
||||||
private bool $restart_only;
|
private bool $restart_only;
|
||||||
|
|
||||||
@@ -94,7 +95,6 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
private ?string $buildTarget = null;
|
private ?string $buildTarget = null;
|
||||||
private Collection $saved_outputs;
|
private Collection $saved_outputs;
|
||||||
private ?string $full_healthcheck_url = null;
|
private ?string $full_healthcheck_url = null;
|
||||||
private bool $custom_healthcheck_found = false;
|
|
||||||
|
|
||||||
private string $serverUser = 'root';
|
private string $serverUser = 'root';
|
||||||
private string $serverUserHomeDir = '/root';
|
private string $serverUserHomeDir = '/root';
|
||||||
@@ -117,6 +117,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
$this->deployment_uuid = $this->application_deployment_queue->deployment_uuid;
|
$this->deployment_uuid = $this->application_deployment_queue->deployment_uuid;
|
||||||
$this->pull_request_id = $this->application_deployment_queue->pull_request_id;
|
$this->pull_request_id = $this->application_deployment_queue->pull_request_id;
|
||||||
$this->commit = $this->application_deployment_queue->commit;
|
$this->commit = $this->application_deployment_queue->commit;
|
||||||
|
$this->rollback = $this->application_deployment_queue->rollback;
|
||||||
$this->force_rebuild = $this->application_deployment_queue->force_rebuild;
|
$this->force_rebuild = $this->application_deployment_queue->force_rebuild;
|
||||||
$this->restart_only = $this->application_deployment_queue->restart_only;
|
$this->restart_only = $this->application_deployment_queue->restart_only;
|
||||||
$this->only_this_server = $this->application_deployment_queue->only_this_server;
|
$this->only_this_server = $this->application_deployment_queue->only_this_server;
|
||||||
@@ -708,7 +709,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
private function save_environment_variables()
|
private function save_environment_variables()
|
||||||
{
|
{
|
||||||
$envs = collect([]);
|
$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) {
|
if ($this->pull_request_id !== 0) {
|
||||||
$this->env_filename = ".env-pr-$this->pull_request_id";
|
$this->env_filename = ".env-pr-$this->pull_request_id";
|
||||||
foreach ($this->application->environment_variables_preview as $env) {
|
foreach ($this->application->environment_variables_preview as $env) {
|
||||||
@@ -716,60 +717,74 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if ($env->version === '4.0.0-beta.239') {
|
if ($env->version === '4.0.0-beta.239') {
|
||||||
$real_value = $env->real_value;
|
$real_value = $env->real_value;
|
||||||
} else {
|
} else {
|
||||||
$real_value = escapeEnvVariables($env->real_value);
|
if ($env->is_literal) {
|
||||||
}
|
$real_value = '\'' . $real_value . '\'';
|
||||||
if ($env->is_literal) {
|
} else {
|
||||||
$real_value = '\'' . $real_value . '\'';
|
$real_value = escapeEnvVariables($env->real_value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$envs->push($env->key . '=' . $real_value);
|
$envs->push($env->key . '=' . $real_value);
|
||||||
}
|
}
|
||||||
// Add PORT if not exists, use the first port as default
|
// 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]}");
|
$envs->push("PORT={$ports[0]}");
|
||||||
}
|
}
|
||||||
// Add HOST if not exists
|
// 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");
|
$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)) {
|
if (!is_null($this->commit)) {
|
||||||
$envs->push("SOURCE_COMMIT={$this->commit}");
|
$envs->push("SOURCE_COMMIT={$this->commit}");
|
||||||
} else {
|
} else {
|
||||||
$envs->push("SOURCE_COMMIT=unknown");
|
$envs->push("SOURCE_COMMIT=unknown");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$envs = $envs->sort(function ($a, $b) {
|
||||||
|
return strpos($a, '$') === false ? -1 : 1;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$this->env_filename = ".env-coolify";
|
$this->env_filename = ".env";
|
||||||
foreach ($this->application->environment_variables as $env) {
|
foreach ($this->application->environment_variables as $env) {
|
||||||
$real_value = $env->real_value;
|
$real_value = $env->real_value;
|
||||||
if ($env->version === '4.0.0-beta.239') {
|
if ($env->version === '4.0.0-beta.239') {
|
||||||
$real_value = $env->real_value;
|
$real_value = $env->real_value;
|
||||||
} else {
|
} else {
|
||||||
$real_value = escapeEnvVariables($env->real_value);
|
if ($env->is_literal) {
|
||||||
}
|
$real_value = '\'' . $real_value . '\'';
|
||||||
if ($env->is_literal) {
|
} else {
|
||||||
$real_value = '\'' . $real_value . '\'';
|
$real_value = escapeEnvVariables($env->real_value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$envs->push($env->key . '=' . $real_value);
|
$envs->push($env->key . '=' . $real_value);
|
||||||
}
|
}
|
||||||
// Add PORT if not exists, use the first port as default
|
// 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]}");
|
$envs->push("PORT={$ports[0]}");
|
||||||
}
|
}
|
||||||
// Add HOST if not exists
|
// 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");
|
$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)) {
|
if (!is_null($this->commit)) {
|
||||||
$envs->push("SOURCE_COMMIT={$this->commit}");
|
$envs->push("SOURCE_COMMIT={$this->commit}");
|
||||||
} else {
|
} else {
|
||||||
$envs->push("SOURCE_COMMIT=unknown");
|
$envs->push("SOURCE_COMMIT=unknown");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$envs = $envs->sort(function ($a, $b) {
|
||||||
|
return strpos($a, '$') === false ? -1 : 1;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($envs->isEmpty()) {
|
if ($envs->isEmpty()) {
|
||||||
|
$this->env_filename = null;
|
||||||
|
if ($this->use_build_server) {
|
||||||
|
$this->server = $this->original_server;
|
||||||
|
}
|
||||||
$this->execute_remote_command(
|
$this->execute_remote_command(
|
||||||
[
|
[
|
||||||
"command" => "rm -f $this->configuration_dir/{$this->env_filename}",
|
"command" => "rm -f $this->configuration_dir/{$this->env_filename}",
|
||||||
@@ -777,30 +792,51 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
"ignore_errors" => true
|
"ignore_errors" => true
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$this->env_filename = null;
|
if ($this->use_build_server) {
|
||||||
return;
|
$this->server = $this->build_server;
|
||||||
}
|
}
|
||||||
$this->execute_remote_command([
|
} else {
|
||||||
executeInDocker($this->deployment_uuid, "cat $this->workdir/.env 2>/dev/null || true"),
|
$envs_base64 = base64_encode($envs->implode("\n"));
|
||||||
"hidden" => true,
|
|
||||||
"save" => "dotenv"
|
|
||||||
]);
|
|
||||||
if (str($this->saved_outputs->get('dotenv'))->isNotEmpty()) {
|
|
||||||
$this->execute_remote_command(
|
$this->execute_remote_command(
|
||||||
[
|
[
|
||||||
"echo '{$this->saved_outputs->get('dotenv')->value()}' | tee $this->configuration_dir/.env > /dev/null"
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$envs_base64 = base64_encode($envs->implode("\n"));
|
// $this->execute_remote_command([
|
||||||
$this->execute_remote_command(
|
// executeInDocker($this->deployment_uuid, "cat $this->workdir/.env 2>/dev/null || true"),
|
||||||
[
|
// "hidden" => true,
|
||||||
executeInDocker($this->deployment_uuid, "echo '$envs_base64' | base64 -d | tee $this->workdir/{$this->env_filename} > /dev/null")
|
// "save" => "dotenv"
|
||||||
],
|
// ]);
|
||||||
[
|
// if (str($this->saved_outputs->get('dotenv'))->isNotEmpty()) {
|
||||||
"echo '$envs_base64' | base64 -d | tee $this->configuration_dir/{$this->env_filename} > /dev/null"
|
// $base64_dotenv = base64_encode($this->saved_outputs->get('dotenv')->value());
|
||||||
]
|
// $this->execute_remote_command(
|
||||||
);
|
// [
|
||||||
|
// "echo '{$base64_dotenv}' | base64 -d | tee $this->configuration_dir/.env > /dev/null"
|
||||||
|
// ]
|
||||||
|
// );
|
||||||
|
// } else {
|
||||||
|
// $this->execute_remote_command(
|
||||||
|
// [
|
||||||
|
// "command" => "rm -f $this->configuration_dir/.env",
|
||||||
|
// "hidden" => true,
|
||||||
|
// "ignore_errors" => true
|
||||||
|
// ]
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -866,10 +902,13 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if ($this->server->isSwarm()) {
|
if ($this->server->isSwarm()) {
|
||||||
// Implement healthcheck for swarm
|
// Implement healthcheck for swarm
|
||||||
} else {
|
} else {
|
||||||
if ($this->application->isHealthcheckDisabled() && $this->custom_healthcheck_found === false) {
|
if ($this->application->isHealthcheckDisabled() && $this->application->custom_healthcheck_found === false) {
|
||||||
$this->newVersionIsHealthy = true;
|
$this->newVersionIsHealthy = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($this->application->custom_healthcheck_found) {
|
||||||
|
$this->application_deployment_queue->addLogEntry("Custom healthcheck found, skipping default healthcheck.");
|
||||||
|
}
|
||||||
// ray('New container name: ', $this->container_name);
|
// ray('New container name: ', $this->container_name);
|
||||||
if ($this->container_name) {
|
if ($this->container_name) {
|
||||||
$counter = 1;
|
$counter = 1;
|
||||||
@@ -877,6 +916,12 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if ($this->full_healthcheck_url) {
|
if ($this->full_healthcheck_url) {
|
||||||
$this->application_deployment_queue->addLogEntry("Healthcheck URL (inside the container): {$this->full_healthcheck_url}");
|
$this->application_deployment_queue->addLogEntry("Healthcheck URL (inside the container): {$this->full_healthcheck_url}");
|
||||||
}
|
}
|
||||||
|
$this->application_deployment_queue->addLogEntry("Waiting for the start period ({$this->application->health_check_start_period} seconds) before starting healthcheck.");
|
||||||
|
$sleeptime = 0;
|
||||||
|
while ($sleeptime < $this->application->health_check_start_period) {
|
||||||
|
Sleep::for(1)->seconds();
|
||||||
|
$sleeptime++;
|
||||||
|
}
|
||||||
while ($counter <= $this->application->health_check_retries) {
|
while ($counter <= $this->application->health_check_retries) {
|
||||||
$this->execute_remote_command(
|
$this->execute_remote_command(
|
||||||
[
|
[
|
||||||
@@ -899,7 +944,11 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$counter++;
|
$counter++;
|
||||||
Sleep::for($this->application->health_check_interval)->seconds();
|
$sleeptime = 0;
|
||||||
|
while ($sleeptime < $this->application->health_check_interval) {
|
||||||
|
Sleep::for(1)->seconds();
|
||||||
|
$sleeptime++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -964,10 +1013,6 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
$this->application_deployment_queue->addLogEntry("Preparing container with helper image: $helperImage.");
|
$this->application_deployment_queue->addLogEntry("Preparing container with helper image: $helperImage.");
|
||||||
$this->execute_remote_command(
|
$this->execute_remote_command(
|
||||||
[
|
|
||||||
"command" => "docker pull -q {$helperImage}",
|
|
||||||
"hidden" => true
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
"command" => "docker rm -f {$this->deployment_uuid}",
|
"command" => "docker rm -f {$this->deployment_uuid}",
|
||||||
"ignore_errors" => true,
|
"ignore_errors" => true,
|
||||||
@@ -1059,7 +1104,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($this->saved_outputs->get('git_commit_sha')) {
|
if ($this->saved_outputs->get('git_commit_sha') && !$this->rollback) {
|
||||||
$this->commit = $this->saved_outputs->get('git_commit_sha')->before("\t");
|
$this->commit = $this->saved_outputs->get('git_commit_sha')->before("\t");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1183,7 +1228,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
private function generate_compose_file()
|
private function generate_compose_file()
|
||||||
{
|
{
|
||||||
$this->create_workdir();
|
$this->create_workdir();
|
||||||
$ports = $this->application->settings->is_static ? [80] : $this->application->ports_exposes_array;
|
$ports = $this->application->main_port();
|
||||||
$onlyPort = null;
|
$onlyPort = null;
|
||||||
if (count($ports) > 0) {
|
if (count($ports) > 0) {
|
||||||
$onlyPort = $ports[0];
|
$onlyPort = $ports[0];
|
||||||
@@ -1225,18 +1270,18 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if ($this->pull_request_id !== 0) {
|
if ($this->pull_request_id !== 0) {
|
||||||
$labels = collect(generateLabelsApplication($this->application, $this->preview));
|
$labels = collect(generateLabelsApplication($this->application, $this->preview));
|
||||||
}
|
}
|
||||||
|
$labels = $labels->map(function ($value, $key) {
|
||||||
|
return escapeDollarSign($value);
|
||||||
|
});
|
||||||
$labels = $labels->merge(defaultLabels($this->application->id, $this->application->uuid, $this->pull_request_id))->toArray();
|
$labels = $labels->merge(defaultLabels($this->application->id, $this->application->uuid, $this->pull_request_id))->toArray();
|
||||||
|
|
||||||
// Check for custom HEALTHCHECK
|
// Check for custom HEALTHCHECK
|
||||||
$this->custom_healthcheck_found = false;
|
|
||||||
if ($this->application->build_pack === 'dockerfile' || $this->application->dockerfile) {
|
if ($this->application->build_pack === 'dockerfile' || $this->application->dockerfile) {
|
||||||
$this->execute_remote_command([
|
$this->execute_remote_command([
|
||||||
executeInDocker($this->deployment_uuid, "cat {$this->workdir}{$this->dockerfile_location}"), "hidden" => true, "save" => 'dockerfile_from_repo', "ignore_errors" => true
|
executeInDocker($this->deployment_uuid, "cat {$this->workdir}{$this->dockerfile_location}"), "hidden" => true, "save" => 'dockerfile_from_repo', "ignore_errors" => true
|
||||||
]);
|
]);
|
||||||
$dockerfile = collect(Str::of($this->saved_outputs->get('dockerfile_from_repo'))->trim()->explode("\n"));
|
$dockerfile = collect(Str::of($this->saved_outputs->get('dockerfile_from_repo'))->trim()->explode("\n"));
|
||||||
if (str($dockerfile)->contains('HEALTHCHECK')) {
|
$this->application->parseHealthcheckFromDockerfile($dockerfile);
|
||||||
$this->custom_healthcheck_found = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$docker_compose = [
|
$docker_compose = [
|
||||||
'version' => '3.8',
|
'version' => '3.8',
|
||||||
@@ -1265,33 +1310,34 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
if (str($this->saved_outputs->get('dotenv'))->isNotEmpty()) {
|
// if (str($this->saved_outputs->get('dotenv'))->isNotEmpty()) {
|
||||||
if (data_get($docker_compose, "services.{$this->container_name}.env_file")) {
|
// if (data_get($docker_compose, "services.{$this->container_name}.env_file")) {
|
||||||
$docker_compose['services'][$this->container_name]['env_file'][] = '.env';
|
// $docker_compose['services'][$this->container_name]['env_file'][] = '.env';
|
||||||
} else {
|
// } else {
|
||||||
$docker_compose['services'][$this->container_name]['env_file'] = ['.env'];
|
// $docker_compose['services'][$this->container_name]['env_file'] = ['.env'];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if ($this->env_filename) {
|
// if ($this->env_filename) {
|
||||||
if (data_get($docker_compose, "services.{$this->container_name}.env_file")) {
|
// if (data_get($docker_compose, "services.{$this->container_name}.env_file")) {
|
||||||
$docker_compose['services'][$this->container_name]['env_file'][] = $this->env_filename;
|
// $docker_compose['services'][$this->container_name]['env_file'][] = $this->env_filename;
|
||||||
} else {
|
// } else {
|
||||||
$docker_compose['services'][$this->container_name]['env_file'] = [$this->env_filename];
|
// $docker_compose['services'][$this->container_name]['env_file'] = [$this->env_filename];
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
if (!is_null($this->env_filename)) {
|
||||||
|
$docker_compose['services'][$this->container_name]['env_file'] = [$this->env_filename];
|
||||||
}
|
}
|
||||||
|
$docker_compose['services'][$this->container_name]['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 (!$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'
|
|
||||||
];
|
|
||||||
}
|
|
||||||
if (!is_null($this->application->limits_cpuset)) {
|
if (!is_null($this->application->limits_cpuset)) {
|
||||||
data_set($docker_compose, 'services.' . $this->container_name . '.cpuset', $this->application->limits_cpuset);
|
data_set($docker_compose, 'services.' . $this->container_name . '.cpuset', $this->application->limits_cpuset);
|
||||||
}
|
}
|
||||||
@@ -1473,7 +1519,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
return $local_persistent_volumes_names;
|
return $local_persistent_volumes_names;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function generate_environment_variables($ports)
|
/*private function generate_environment_variables($ports)
|
||||||
{
|
{
|
||||||
$environment_variables = collect();
|
$environment_variables = collect();
|
||||||
if ($this->pull_request_id === 0) {
|
if ($this->pull_request_id === 0) {
|
||||||
@@ -1491,8 +1537,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
if ($env->is_literal) {
|
if ($env->is_literal) {
|
||||||
$real_value = escapeDollarSign($real_value);
|
$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) {
|
foreach ($this->application->nixpacks_environment_variables as $env) {
|
||||||
if ($env->version === '4.0.0-beta.239') {
|
if ($env->version === '4.0.0-beta.239') {
|
||||||
@@ -1502,8 +1550,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
if ($env->is_literal) {
|
if ($env->is_literal) {
|
||||||
$real_value = escapeDollarSign($real_value);
|
$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 {
|
} else {
|
||||||
foreach ($this->application->runtime_environment_variables_preview as $env) {
|
foreach ($this->application->runtime_environment_variables_preview as $env) {
|
||||||
@@ -1514,8 +1564,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
if ($env->is_literal) {
|
if ($env->is_literal) {
|
||||||
$real_value = escapeDollarSign($real_value);
|
$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) {
|
foreach ($this->application->nixpacks_environment_variables_preview as $env) {
|
||||||
if ($env->version === '4.0.0-beta.239') {
|
if ($env->version === '4.0.0-beta.239') {
|
||||||
@@ -1525,8 +1577,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
if ($env->is_literal) {
|
if ($env->is_literal) {
|
||||||
$real_value = escapeDollarSign($real_value);
|
$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
|
// Add PORT if not exists, use the first port as default
|
||||||
@@ -1544,15 +1598,16 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
$environment_variables->push("SOURCE_COMMIT=unknown");
|
$environment_variables->push("SOURCE_COMMIT=unknown");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ray($environment_variables->all());
|
||||||
return $environment_variables->all();
|
return $environment_variables->all();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
private function generate_healthcheck_commands()
|
private function generate_healthcheck_commands()
|
||||||
{
|
{
|
||||||
if ($this->application->dockerfile || $this->application->build_pack === 'dockerfile' || $this->application->build_pack === 'dockerimage') {
|
// if ($this->application->dockerfile || $this->application->build_pack === 'dockerfile' || $this->application->build_pack === 'dockerimage') {
|
||||||
// TODO: disabled HC because there are several ways to hc a simple docker image, hard to figure out a good way. Like some docker images (pocketbase) does not have curl.
|
// // TODO: disabled HC because there are several ways to hc a simple docker image, hard to figure out a good way. Like some docker images (pocketbase) does not have curl.
|
||||||
return 'exit 0';
|
// return 'exit 0';
|
||||||
}
|
// }
|
||||||
if (!$this->application->health_check_port) {
|
if (!$this->application->health_check_port) {
|
||||||
$health_check_port = $this->application->ports_exposes_array[0];
|
$health_check_port = $this->application->ports_exposes_array[0];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if ($this->backup->save_s3) {
|
if ($this->backup->save_s3) {
|
||||||
$this->upload_to_s3();
|
$this->upload_to_s3();
|
||||||
}
|
}
|
||||||
$this->team?->notify(new BackupSuccess($this->backup, $this->database));
|
$this->team?->notify(new BackupSuccess($this->backup, $this->database, $database));
|
||||||
$this->backup_log->update([
|
$this->backup_log->update([
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'message' => $this->backup_output,
|
'message' => $this->backup_output,
|
||||||
@@ -305,8 +305,7 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
send_internal_notification('DatabaseBackupJob failed with: ' . $e->getMessage());
|
send_internal_notification('DatabaseBackupJob failed with: ' . $e->getMessage());
|
||||||
$this->team?->notify(new BackupFailed($this->backup, $this->database, $this->backup_output));
|
$this->team?->notify(new BackupFailed($this->backup, $this->database, $this->backup_output, $database));
|
||||||
throw $e;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ class InstanceAutoUpdateJob implements ShouldQueue, ShouldBeUnique, ShouldBeEncr
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
public $timeout = 120;
|
public $timeout = 600;
|
||||||
|
public $tries = 1;
|
||||||
|
|
||||||
public function __construct(private bool $force = false)
|
public function __construct(private bool $force = false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class SendMessageToTelegramJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$payload = [
|
$payload = [
|
||||||
'parse_mode' => 'markdown',
|
// 'parse_mode' => 'markdown',
|
||||||
'reply_markup' => json_encode([
|
'reply_markup' => json_encode([
|
||||||
'inline_keyboard' => [
|
'inline_keyboard' => [
|
||||||
[...$inlineButtons],
|
[...$inlineButtons],
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ class Advanced extends Component
|
|||||||
'application.settings.gpu_count' => 'string|required',
|
'application.settings.gpu_count' => 'string|required',
|
||||||
'application.settings.gpu_device_ids' => 'string|required',
|
'application.settings.gpu_device_ids' => 'string|required',
|
||||||
'application.settings.gpu_options' => '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() {
|
public function mount() {
|
||||||
$this->is_force_https_enabled = $this->application->isForceHttpsEnabled();
|
$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->application->settings->is_stripprefix_enabled = $this->is_stripprefix_enabled;
|
||||||
$this->dispatch('resetDefaultLabels', false);
|
$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->application->settings->save();
|
||||||
$this->dispatch('success', 'Settings saved.');
|
$this->dispatch('success', 'Settings saved.');
|
||||||
|
$this->dispatch('configurationChanged');
|
||||||
}
|
}
|
||||||
public function submit() {
|
public function submit() {
|
||||||
if ($this->application->settings->gpu_count && $this->application->settings->gpu_device_ids) {
|
if ($this->application->settings->gpu_count && $this->application->settings->gpu_device_ids) {
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ class General extends Component
|
|||||||
public $parsedServiceDomains = [];
|
public $parsedServiceDomains = [];
|
||||||
|
|
||||||
protected $listeners = [
|
protected $listeners = [
|
||||||
'resetDefaultLabels'
|
'resetDefaultLabels',
|
||||||
|
'configurationChanged' => '$refresh'
|
||||||
];
|
];
|
||||||
protected $rules = [
|
protected $rules = [
|
||||||
'application.name' => 'required',
|
'application.name' => 'required',
|
||||||
@@ -72,7 +73,6 @@ class General extends Component
|
|||||||
'application.post_deployment_command' => 'nullable',
|
'application.post_deployment_command' => 'nullable',
|
||||||
'application.post_deployment_command_container' => 'nullable',
|
'application.post_deployment_command_container' => 'nullable',
|
||||||
'application.settings.is_static' => 'boolean|required',
|
'application.settings.is_static' => 'boolean|required',
|
||||||
'application.settings.is_raw_compose_deployment_enabled' => 'boolean|required',
|
|
||||||
'application.settings.is_build_server_enabled' => 'boolean|required',
|
'application.settings.is_build_server_enabled' => 'boolean|required',
|
||||||
'application.watch_paths' => 'nullable',
|
'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_start_command' => 'Docker compose custom start command',
|
||||||
'application.docker_compose_custom_build_command' => 'Docker compose custom build command',
|
'application.docker_compose_custom_build_command' => 'Docker compose custom build command',
|
||||||
'application.settings.is_static' => 'Is static',
|
'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.settings.is_build_server_enabled' => 'Is build server enabled',
|
||||||
'application.watch_paths' => 'Watch paths',
|
'application.watch_paths' => 'Watch paths',
|
||||||
];
|
];
|
||||||
@@ -187,6 +186,7 @@ class General extends Component
|
|||||||
$this->dispatch('success', 'Docker compose file loaded.');
|
$this->dispatch('success', 'Docker compose file loaded.');
|
||||||
$this->dispatch('compose_loaded');
|
$this->dispatch('compose_loaded');
|
||||||
$this->dispatch('refresh_storages');
|
$this->dispatch('refresh_storages');
|
||||||
|
$this->dispatch('refreshEnvs');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->application->docker_compose_location = $this->initialDockerComposeLocation;
|
$this->application->docker_compose_location = $this->initialDockerComposeLocation;
|
||||||
$this->application->docker_compose_pr_location = $this->initialDockerComposePrLocation;
|
$this->application->docker_compose_pr_location = $this->initialDockerComposePrLocation;
|
||||||
@@ -337,11 +337,6 @@ class General extends Component
|
|||||||
check_domain_usage(resource: $this->application);
|
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->custom_labels = base64_encode($this->customLabels);
|
||||||
$this->application->save();
|
$this->application->save();
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ class Heading extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($showNotification) $this->dispatch('success', "Success", "Application status updated.");
|
if ($showNotification) $this->dispatch('success', "Success", "Application status updated.");
|
||||||
$this->dispatch('configurationChanged');
|
// Removed because it caused flickering
|
||||||
|
// $this->dispatch('configurationChanged');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function force_deploy_without_cache()
|
public function force_deploy_without_cache()
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ class Rollback extends Component
|
|||||||
{
|
{
|
||||||
$this->parameters = get_route_parameters();
|
$this->parameters = get_route_parameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rollbackImage($commit)
|
public function rollbackImage($commit)
|
||||||
{
|
{
|
||||||
$deployment_uuid = new Cuid2(7);
|
$deployment_uuid = new Cuid2(7);
|
||||||
@@ -27,6 +26,7 @@ class Rollback extends Component
|
|||||||
application: $this->application,
|
application: $this->application,
|
||||||
deployment_uuid: $deployment_uuid,
|
deployment_uuid: $deployment_uuid,
|
||||||
commit: $commit,
|
commit: $commit,
|
||||||
|
rollback: true,
|
||||||
force_rebuild: false,
|
force_rebuild: false,
|
||||||
);
|
);
|
||||||
return redirect()->route('project.application.deployment.show', [
|
return redirect()->route('project.application.deployment.show', [
|
||||||
|
|||||||
@@ -35,11 +35,6 @@ class Execution extends Component
|
|||||||
$this->executions = $executions;
|
$this->executions = $executions;
|
||||||
$this->s3s = currentTeam()->s3s;
|
$this->s3s = currentTeam()->s3s;
|
||||||
}
|
}
|
||||||
public function cleanupFailed()
|
|
||||||
{
|
|
||||||
$this->backup->executions()->where('status', 'failed')->delete();
|
|
||||||
$this->dispatch('refreshBackupExecutions');
|
|
||||||
}
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return view('livewire.project.database.backup.execution');
|
return view('livewire.project.database.backup.execution');
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Livewire\Project\Database;
|
namespace App\Livewire\Project\Database;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
|
||||||
|
|
||||||
class BackupExecutions extends Component
|
class BackupExecutions extends Component
|
||||||
{
|
{
|
||||||
@@ -16,11 +14,15 @@ class BackupExecutions extends Component
|
|||||||
$userId = auth()->user()->id;
|
$userId = auth()->user()->id;
|
||||||
return [
|
return [
|
||||||
"echo-private:team.{$userId},BackupCreated" => 'refreshBackupExecutions',
|
"echo-private:team.{$userId},BackupCreated" => 'refreshBackupExecutions',
|
||||||
"refreshBackupExecutions",
|
|
||||||
"deleteBackup"
|
"deleteBackup"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function cleanupFailed()
|
||||||
|
{
|
||||||
|
$this->backup->executions()->where('status', 'failed')->delete();
|
||||||
|
$this->refreshBackupExecutions();
|
||||||
|
}
|
||||||
public function deleteBackup($exeuctionId)
|
public function deleteBackup($exeuctionId)
|
||||||
{
|
{
|
||||||
$execution = $this->backup->executions()->where('id', $exeuctionId)->first();
|
$execution = $this->backup->executions()->where('id', $exeuctionId)->first();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class Import extends Component
|
|||||||
public string $postgresqlRestoreCommand = 'pg_restore -U $POSTGRES_USER -d $POSTGRES_DB';
|
public string $postgresqlRestoreCommand = 'pg_restore -U $POSTGRES_USER -d $POSTGRES_DB';
|
||||||
public string $mysqlRestoreCommand = 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE';
|
public string $mysqlRestoreCommand = 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE';
|
||||||
public string $mariadbRestoreCommand = 'mariadb -u $MARIADB_USER -p$MARIADB_PASSWORD $MARIADB_DATABASE';
|
public string $mariadbRestoreCommand = 'mariadb -u $MARIADB_USER -p$MARIADB_PASSWORD $MARIADB_DATABASE';
|
||||||
|
public string $mongodbRestoreCommand = 'mongorestore --authenticationDatabase=admin --username $MONGO_INITDB_ROOT_USERNAME --password $MONGO_INITDB_ROOT_PASSWORD --uri mongodb://localhost:27017 --gzip --archive=';
|
||||||
|
|
||||||
public function getListeners()
|
public function getListeners()
|
||||||
{
|
{
|
||||||
@@ -62,8 +63,7 @@ class Import extends Component
|
|||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneRedis' ||
|
$this->resource->getMorphClass() == 'App\Models\StandaloneRedis' ||
|
||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneKeydb' ||
|
$this->resource->getMorphClass() == 'App\Models\StandaloneKeydb' ||
|
||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneDragonfly' ||
|
$this->resource->getMorphClass() == 'App\Models\StandaloneDragonfly' ||
|
||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneClickhouse' ||
|
$this->resource->getMorphClass() == 'App\Models\StandaloneClickhouse'
|
||||||
$this->resource->getMorphClass() == 'App\Models\StandaloneMongodb'
|
|
||||||
) {
|
) {
|
||||||
$this->unsupported = true;
|
$this->unsupported = true;
|
||||||
}
|
}
|
||||||
@@ -101,6 +101,10 @@ class Import extends Component
|
|||||||
$this->importCommands[] = "docker exec {$this->container} sh -c '{$this->postgresqlRestoreCommand} {$tmpPath}'";
|
$this->importCommands[] = "docker exec {$this->container} sh -c '{$this->postgresqlRestoreCommand} {$tmpPath}'";
|
||||||
$this->importCommands[] = "rm {$tmpPath}";
|
$this->importCommands[] = "rm {$tmpPath}";
|
||||||
break;
|
break;
|
||||||
|
case 'App\Models\StandaloneMongodb':
|
||||||
|
$this->importCommands[] = "docker exec {$this->container} sh -c '{$this->mongodbRestoreCommand}{$tmpPath}'";
|
||||||
|
$this->importCommands[] = "rm {$tmpPath}";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->importCommands[] = "docker exec {$this->container} sh -c 'rm {$tmpPath}'";
|
$this->importCommands[] = "docker exec {$this->container} sh -c 'rm {$tmpPath}'";
|
||||||
|
|||||||
@@ -12,28 +12,6 @@ class Edit extends Component
|
|||||||
'project.name' => 'required|min:3|max:255',
|
'project.name' => 'required|min:3|max:255',
|
||||||
'project.description' => 'nullable|string|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()
|
public function mount()
|
||||||
{
|
{
|
||||||
$projectUuid = request()->route('project_uuid');
|
$projectUuid = request()->route('project_uuid');
|
||||||
|
|||||||
@@ -16,29 +16,6 @@ class EnvironmentEdit extends Component
|
|||||||
'environment.name' => 'required|min:3|max:255',
|
'environment.name' => 'required|min:3|max:255',
|
||||||
'environment.description' => 'nullable|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()
|
public function mount()
|
||||||
{
|
{
|
||||||
$this->parameters = get_route_parameters();
|
$this->parameters = get_route_parameters();
|
||||||
|
|||||||
@@ -94,6 +94,17 @@ class PublicGitRepository extends Component
|
|||||||
$repository = str($this->repository_url)->after(':')->before('.git');
|
$repository = str($this->repository_url)->after(':')->before('.git');
|
||||||
$this->repository_url = 'https://' . str($github_instance) . '/' . $repository;
|
$this->repository_url = 'https://' . str($github_instance) . '/' . $repository;
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
(str($this->repository_url)->startsWith('https://') ||
|
||||||
|
str($this->repository_url)->startsWith('http://')) &&
|
||||||
|
!str($this->repository_url)->endsWith('.git') &&
|
||||||
|
!str($this->repository_url)->contains('github.com')
|
||||||
|
) {
|
||||||
|
$this->repository_url = $this->repository_url . '.git';
|
||||||
|
}
|
||||||
|
if (str($this->repository_url)->contains('github.com')) {
|
||||||
|
$this->repository_url = str($this->repository_url)->before('.git')->value();
|
||||||
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@@ -170,7 +181,6 @@ class PublicGitRepository extends Component
|
|||||||
'name' => generate_random_name(),
|
'name' => generate_random_name(),
|
||||||
'git_repository' => $this->git_repository,
|
'git_repository' => $this->git_repository,
|
||||||
'git_branch' => $this->git_branch,
|
'git_branch' => $this->git_branch,
|
||||||
'build_pack' => 'nixpacks',
|
|
||||||
'ports_exposes' => $this->port,
|
'ports_exposes' => $this->port,
|
||||||
'publish_directory' => $this->publish_directory,
|
'publish_directory' => $this->publish_directory,
|
||||||
'environment_id' => $environment->id,
|
'environment_id' => $environment->id,
|
||||||
@@ -183,7 +193,6 @@ class PublicGitRepository extends Component
|
|||||||
'name' => generate_application_name($this->git_repository, $this->git_branch),
|
'name' => generate_application_name($this->git_repository, $this->git_branch),
|
||||||
'git_repository' => $this->git_repository,
|
'git_repository' => $this->git_repository,
|
||||||
'git_branch' => $this->git_branch,
|
'git_branch' => $this->git_branch,
|
||||||
'build_pack' => 'nixpacks',
|
|
||||||
'ports_exposes' => $this->port,
|
'ports_exposes' => $this->port,
|
||||||
'publish_directory' => $this->publish_directory,
|
'publish_directory' => $this->publish_directory,
|
||||||
'environment_id' => $environment->id,
|
'environment_id' => $environment->id,
|
||||||
@@ -195,7 +204,6 @@ class PublicGitRepository extends Component
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$application = Application::create($application_init);
|
$application = Application::create($application_init);
|
||||||
|
|
||||||
$application->settings->is_static = $this->is_static;
|
$application->settings->is_static = $this->is_static;
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ CMD ["nginx", "-g", "daemon off;"]
|
|||||||
'fqdn' => $fqdn
|
'fqdn' => $fqdn
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$application->parseHealthcheckFromDockerfile(dockerfile: collect(str($this->dockerfile)->trim()->explode("\n")), isInit: true);
|
||||||
|
|
||||||
return redirect()->route('project.application.configuration', [
|
return redirect()->route('project.application.configuration', [
|
||||||
'application_uuid' => $application->uuid,
|
'application_uuid' => $application->uuid,
|
||||||
'environment_name' => $environment->name,
|
'environment_name' => $environment->name,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class StackForm extends Component
|
|||||||
$this->validationAttributes["fields.$key.value"] = $fieldKey;
|
$this->validationAttributes["fields.$key.value"] = $fieldKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->fields = $this->fields->sort();
|
$this->fields = $this->fields->sortDesc();
|
||||||
}
|
}
|
||||||
public function saveCompose($raw)
|
public function saveCompose($raw)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ class Show extends Component
|
|||||||
public function checkEnvs()
|
public function checkEnvs()
|
||||||
{
|
{
|
||||||
$this->isDisabled = false;
|
$this->isDisabled = false;
|
||||||
// if (str($this->env->key)->startsWith('SERVICE_FQDN') || str($this->env->key)->startsWith('SERVICE_URL')) {
|
if (str($this->env->key)->startsWith('SERVICE_FQDN') || str($this->env->key)->startsWith('SERVICE_URL')) {
|
||||||
// $this->isDisabled = true;
|
$this->isDisabled = true;
|
||||||
// }
|
}
|
||||||
if ($this->env->is_shown_once) {
|
if ($this->env->is_shown_once) {
|
||||||
$this->isLocked = true;
|
$this->isLocked = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,18 +17,17 @@ class HealthChecks extends Component
|
|||||||
'resource.health_check_return_code' => 'integer',
|
'resource.health_check_return_code' => 'integer',
|
||||||
'resource.health_check_scheme' => 'string',
|
'resource.health_check_scheme' => 'string',
|
||||||
'resource.health_check_response_text' => 'nullable|string',
|
'resource.health_check_response_text' => 'nullable|string',
|
||||||
'resource.health_check_interval' => 'integer',
|
'resource.health_check_interval' => 'integer|min:1',
|
||||||
'resource.health_check_timeout' => 'integer',
|
'resource.health_check_timeout' => 'integer|min:1',
|
||||||
'resource.health_check_retries' => 'integer',
|
'resource.health_check_retries' => 'integer|min:1',
|
||||||
'resource.health_check_start_period' => 'integer',
|
'resource.health_check_start_period' => 'integer',
|
||||||
|
'resource.custom_healthcheck_found' => 'boolean',
|
||||||
|
|
||||||
];
|
];
|
||||||
public function instantSave()
|
public function instantSave()
|
||||||
{
|
{
|
||||||
$this->resource->save();
|
$this->resource->save();
|
||||||
$this->dispatch('success', 'Health check updated.');
|
$this->dispatch('success', 'Health check updated.');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public function submit()
|
public function submit()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,13 +69,14 @@ class Configuration extends Component
|
|||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
|
|
||||||
if ($this->settings->is_dns_validation_enabled) {
|
if ($this->settings->is_dns_validation_enabled && $this->settings->fqdn) {
|
||||||
|
ray('asdf');
|
||||||
if (!validate_dns_entry($this->settings->fqdn, $this->server)) {
|
if (!validate_dns_entry($this->settings->fqdn, $this->server)) {
|
||||||
$this->dispatch('error', "Validating DNS ({$this->settings->fqdn}) failed.<br><br>Make sure you have added the DNS records correctly.<br><br>Check this <a target='_blank' class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/dns-configuration'>documentation</a> for further help.");
|
$this->dispatch('error', "Validating DNS ({$this->settings->fqdn}) failed.<br><br>Make sure you have added the DNS records correctly.<br><br>Check this <a target='_blank' class='underline dark:text-white' href='https://coolify.io/docs/knowledge-base/dns-configuration'>documentation</a> for further help.");
|
||||||
$error_show = true;
|
$error_show = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
check_domain_usage(domain: $this->settings->fqdn);
|
if ($this->settings->fqdn) check_domain_usage(domain: $this->settings->fqdn);
|
||||||
$this->settings->custom_dns_servers = str($this->settings->custom_dns_servers)->replaceEnd(',', '')->trim();
|
$this->settings->custom_dns_servers = str($this->settings->custom_dns_servers)->replaceEnd(',', '')->trim();
|
||||||
$this->settings->custom_dns_servers = str($this->settings->custom_dns_servers)->trim()->explode(',')->map(function ($dns) {
|
$this->settings->custom_dns_servers = str($this->settings->custom_dns_servers)->trim()->explode(',')->map(function ($dns) {
|
||||||
return str($dns)->trim()->lower();
|
return str($dns)->trim()->lower();
|
||||||
|
|||||||
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
|
<?php
|
||||||
|
|
||||||
namespace App\Livewire;
|
namespace App\Livewire\SharedVariables\Team;
|
||||||
|
|
||||||
use App\Models\Team;
|
use App\Models\Team;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
class TeamSharedVariablesIndex extends Component
|
class Index extends Component
|
||||||
{
|
{
|
||||||
public Team $team;
|
public Team $team;
|
||||||
protected $listeners = ['refreshEnvs' => '$refresh', 'saveKey' => 'saveKey'];
|
protected $listeners = ['refreshEnvs' => '$refresh', 'saveKey' => 'saveKey'];
|
||||||
@@ -37,6 +37,6 @@ class TeamSharedVariablesIndex extends Component
|
|||||||
}
|
}
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return view('livewire.team-shared-variables-index');
|
return view('livewire.shared-variables.team.index');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Livewire\Team\Storage;
|
namespace App\Livewire\Storage;
|
||||||
|
|
||||||
use App\Models\S3Storage;
|
use App\Models\S3Storage;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
@@ -65,7 +65,7 @@ class Create extends Component
|
|||||||
$this->storage->team_id = currentTeam()->id;
|
$this->storage->team_id = currentTeam()->id;
|
||||||
$this->storage->testConnection();
|
$this->storage->testConnection();
|
||||||
$this->storage->save();
|
$this->storage->save();
|
||||||
return redirect()->route('team.storage.show', $this->storage->uuid);
|
return redirect()->route('storage.show', $this->storage->uuid);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
$this->dispatch('error', 'Failed to create storage.', $e->getMessage());
|
$this->dispatch('error', 'Failed to create storage.', $e->getMessage());
|
||||||
// return handleError($e, $this);
|
// return handleError($e, $this);
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Livewire\Team\Storage;
|
namespace App\Livewire\Storage;
|
||||||
|
|
||||||
use App\Models\S3Storage;
|
use App\Models\S3Storage;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
@@ -43,7 +43,7 @@ class Form extends Component
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->storage->delete();
|
$this->storage->delete();
|
||||||
return redirect()->route('team.storage.index');
|
return redirect()->route('storage.index');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Livewire\Team\Storage;
|
namespace App\Livewire\Storage;
|
||||||
|
|
||||||
use App\Models\S3Storage;
|
use App\Models\S3Storage;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
@@ -13,6 +13,6 @@ class Index extends Component
|
|||||||
}
|
}
|
||||||
public function render()
|
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 $webhook = null;
|
||||||
public $deployments_per_tag_per_server = [];
|
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();
|
$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->webhook = generatTagDeployWebhook($tag->name);
|
||||||
$this->applications = $tag->applications()->get();
|
$this->applications = $tag->applications()->get();
|
||||||
$this->services = $tag->services()->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()
|
public function redeploy_all()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -67,7 +57,7 @@ class Index extends Component
|
|||||||
{
|
{
|
||||||
$this->tags = Tag::ownedByCurrentTeam()->get()->unique('name')->sortBy('name');
|
$this->tags = Tag::ownedByCurrentTeam()->get()->unique('name')->sortBy('name');
|
||||||
if ($this->tag) {
|
if ($this->tag) {
|
||||||
$this->updatedTag();
|
$this->tag_updated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function render()
|
public function render()
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ class Show extends Component
|
|||||||
}
|
}
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return view('livewire.team.storage.show');
|
return view('livewire.storage.show');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -346,6 +346,10 @@ class Application extends BaseModel
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
public function main_port()
|
||||||
|
{
|
||||||
|
return $this->settings->is_static ? [80] : $this->ports_exposes_array;
|
||||||
|
}
|
||||||
public function environment_variables(): HasMany
|
public function environment_variables(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(EnvironmentVariable::class)->where('is_preview', false)->orderBy('key', 'asc');
|
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();
|
['repository' => $customRepository, 'port' => $customPort] = $this->customRepository();
|
||||||
$baseDir = $custom_base_dir ?? $this->generateBaseDir($deployment_uuid);
|
$baseDir = $custom_base_dir ?? $this->generateBaseDir($deployment_uuid);
|
||||||
$commands = collect([]);
|
$commands = collect([]);
|
||||||
$git_clone_command = "git clone -b {$this->git_branch}";
|
$git_clone_command = "git clone -b \"{$this->git_branch}\"";
|
||||||
if ($only_checkout) {
|
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) {
|
if ($pull_request_id !== 0) {
|
||||||
$pr_branch_name = "pr-{$pull_request_id}-coolify";
|
$pr_branch_name = "pr-{$pull_request_id}-coolify";
|
||||||
@@ -959,4 +963,51 @@ class Application extends BaseModel
|
|||||||
{
|
{
|
||||||
getFilesystemVolumesFromServer($this, $isInit);
|
getFilesystemVolumesFromServer($this, $isInit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function parseHealthcheckFromDockerfile($dockerfile, bool $isInit = false) {
|
||||||
|
if (str($dockerfile)->contains('HEALTHCHECK') && ($this->isHealthcheckDisabled() || $isInit)) {
|
||||||
|
$healthcheckCommand = null;
|
||||||
|
$lines = $dockerfile->toArray();
|
||||||
|
foreach ($lines as $line) {
|
||||||
|
$trimmedLine = trim($line);
|
||||||
|
if (str_starts_with($trimmedLine, 'HEALTHCHECK')) {
|
||||||
|
$healthcheckCommand .= trim($trimmedLine, '\\ ');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isset($healthcheckCommand) && str_contains($trimmedLine, '\\')) {
|
||||||
|
$healthcheckCommand .= ' ' . trim($trimmedLine, '\\ ');
|
||||||
|
}
|
||||||
|
if (isset($healthcheckCommand) && !str_contains($trimmedLine, '\\') && !empty($healthcheckCommand)) {
|
||||||
|
$healthcheckCommand .= ' ' . $trimmedLine;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (str($healthcheckCommand)->isNotEmpty()) {
|
||||||
|
$interval = str($healthcheckCommand)->match('/--interval=(\d+)/');
|
||||||
|
$timeout = str($healthcheckCommand)->match('/--timeout=(\d+)/');
|
||||||
|
$start_period = str($healthcheckCommand)->match('/--start-period=(\d+)/');
|
||||||
|
$start_interval = str($healthcheckCommand)->match('/--start-interval=(\d+)/');
|
||||||
|
$retries = str($healthcheckCommand)->match('/--retries=(\d+)/');
|
||||||
|
if ($interval->isNotEmpty()) {
|
||||||
|
$this->health_check_interval = $interval->toInteger();
|
||||||
|
}
|
||||||
|
if ($timeout->isNotEmpty()) {
|
||||||
|
$this->health_check_timeout = $timeout->toInteger();
|
||||||
|
}
|
||||||
|
if ($start_period->isNotEmpty()) {
|
||||||
|
$this->health_check_start_period = $start_period->toInteger();
|
||||||
|
}
|
||||||
|
// if ($start_interval) {
|
||||||
|
// $this->health_check_start_interval = $start_interval->value();
|
||||||
|
// }
|
||||||
|
if ($retries->isNotEmpty()) {
|
||||||
|
$this->health_check_retries = $retries->toInteger();
|
||||||
|
}
|
||||||
|
if ($interval || $timeout || $start_period || $start_interval || $retries) {
|
||||||
|
$this->custom_healthcheck_found = true;
|
||||||
|
$this->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class S3Storage extends BaseModel
|
|||||||
if ($this->unusable_email_sent === false && is_transactional_emails_active()) {
|
if ($this->unusable_email_sent === false && is_transactional_emails_active()) {
|
||||||
$mail = new MailMessage();
|
$mail = new MailMessage();
|
||||||
$mail->subject('Coolify: S3 Storage Connection Error');
|
$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([]);
|
$users = collect([]);
|
||||||
$members = $this->team->members()->get();
|
$members = $this->team->members()->get();
|
||||||
foreach ($members as $user) {
|
foreach ($members as $user) {
|
||||||
|
|||||||
@@ -860,6 +860,9 @@ $schema://$host {
|
|||||||
}
|
}
|
||||||
public function isNonRoot()
|
public function isNonRoot()
|
||||||
{
|
{
|
||||||
|
if ($this->user instanceof Stringable) {
|
||||||
|
return $this->user->value() !== 'root';
|
||||||
|
}
|
||||||
return $this->user !== 'root';
|
return $this->user !== 'root';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,6 +150,29 @@ class Service extends BaseModel
|
|||||||
foreach ($applications as $application) {
|
foreach ($applications as $application) {
|
||||||
$image = str($application->image)->before(':')->value();
|
$image = str($application->image)->before(':')->value();
|
||||||
switch ($image) {
|
switch ($image) {
|
||||||
|
case str($image)?->contains('tolgee'):
|
||||||
|
$data = collect([]);
|
||||||
|
$admin_password = $this->environment_variables()->where('key', 'SERVICE_PASSWORD_TOLGEE')->first();
|
||||||
|
$data = $data->merge([
|
||||||
|
'Admin User' => [
|
||||||
|
'key' => 'TOLGEE_AUTHENTICATION_INITIAL_USERNAME',
|
||||||
|
'value' => 'admin',
|
||||||
|
'readonly' => true,
|
||||||
|
'rules' => 'required',
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
if ($admin_password) {
|
||||||
|
$data = $data->merge([
|
||||||
|
'Admin Password' => [
|
||||||
|
'key' => 'SERVICE_PASSWORD_TOLGEE',
|
||||||
|
'value' => data_get($admin_password, 'value'),
|
||||||
|
'rules' => 'required',
|
||||||
|
'isPassword' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$fields->put('Tolgee', $data);
|
||||||
|
break;
|
||||||
case str($image)?->contains('logto'):
|
case str($image)?->contains('logto'):
|
||||||
$data = collect([]);
|
$data = collect([]);
|
||||||
$logto_endpoint = $this->environment_variables()->where('key', 'LOGTO_ENDPOINT')->first();
|
$logto_endpoint = $this->environment_variables()->where('key', 'LOGTO_ENDPOINT')->first();
|
||||||
|
|||||||
@@ -208,5 +208,4 @@ class StandaloneKeydb extends BaseModel
|
|||||||
{
|
{
|
||||||
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
return $this->morphMany(ScheduledDatabaseBackup::class, 'database');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ class DeploymentFailed extends Notification implements ShouldQueue
|
|||||||
public function toDiscord(): string
|
public function toDiscord(): string
|
||||||
{
|
{
|
||||||
if ($this->preview) {
|
if ($this->preview) {
|
||||||
$message = 'Coolify: Pull request #' . $this->preview->pull_request_id . ' of **' . $this->application_name . '** (' . $this->preview->fqdn . ') deployment failed: ';
|
$message = 'Coolify: Pull request #' . $this->preview->pull_request_id . ' of ' . $this->application_name . ' (' . $this->preview->fqdn . ') deployment failed: ';
|
||||||
$message .= '[View Deployment Logs](' . $this->deployment_url . ')';
|
$message .= '[View Deployment Logs](' . $this->deployment_url . ')';
|
||||||
} else {
|
} else {
|
||||||
$message = 'Coolify: Deployment failed of **' . $this->application_name . '** (' . $this->fqdn . '): ';
|
$message = 'Coolify: Deployment failed of ' . $this->application_name . ' (' . $this->fqdn . '): ';
|
||||||
$message .= '[View Deployment Logs](' . $this->deployment_url . ')';
|
$message .= '[View Deployment Logs](' . $this->deployment_url . ')';
|
||||||
}
|
}
|
||||||
return $message;
|
return $message;
|
||||||
@@ -80,9 +80,9 @@ class DeploymentFailed extends Notification implements ShouldQueue
|
|||||||
public function toTelegram(): array
|
public function toTelegram(): array
|
||||||
{
|
{
|
||||||
if ($this->preview) {
|
if ($this->preview) {
|
||||||
$message = 'Coolify: Pull request #' . $this->preview->pull_request_id . ' of **' . $this->application_name . '** (' . $this->preview->fqdn . ') deployment failed: ';
|
$message = 'Coolify: Pull request #' . $this->preview->pull_request_id . ' of ' . $this->application_name . ' (' . $this->preview->fqdn . ') deployment failed: ';
|
||||||
} else {
|
} else {
|
||||||
$message = 'Coolify: Deployment failed of **' . $this->application_name . '** (' . $this->fqdn . '): ';
|
$message = 'Coolify: Deployment failed of ' . $this->application_name . ' (' . $this->fqdn . '): ';
|
||||||
}
|
}
|
||||||
$buttons[] = [
|
$buttons[] = [
|
||||||
"text" => "Deployment logs",
|
"text" => "Deployment logs",
|
||||||
|
|||||||
@@ -15,11 +15,12 @@ class BackupFailed extends Notification implements ShouldQueue
|
|||||||
{
|
{
|
||||||
use Queueable;
|
use Queueable;
|
||||||
|
|
||||||
public $tries = 1;
|
public $backoff = 10;
|
||||||
|
public $tries = 2;
|
||||||
public string $name;
|
public string $name;
|
||||||
public string $frequency;
|
public string $frequency;
|
||||||
|
|
||||||
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $output)
|
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $output, public $database_name)
|
||||||
{
|
{
|
||||||
$this->name = $database->name;
|
$this->name = $database->name;
|
||||||
$this->frequency = $backup->frequency;
|
$this->frequency = $backup->frequency;
|
||||||
@@ -27,7 +28,7 @@ class BackupFailed extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function via(object $notifiable): array
|
public function via(object $notifiable): array
|
||||||
{
|
{
|
||||||
return [DiscordChannel::class, TelegramChannel::class, MailChannel::class];
|
return setNotificationChannels($notifiable, 'database_backups');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function toMail(): MailMessage
|
public function toMail(): MailMessage
|
||||||
@@ -36,6 +37,7 @@ class BackupFailed extends Notification implements ShouldQueue
|
|||||||
$mail->subject("Coolify: [ACTION REQUIRED] Backup FAILED for {$this->database->name}");
|
$mail->subject("Coolify: [ACTION REQUIRED] Backup FAILED for {$this->database->name}");
|
||||||
$mail->view('emails.backup-failed', [
|
$mail->view('emails.backup-failed', [
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
|
'database_name' => $this->database_name,
|
||||||
'frequency' => $this->frequency,
|
'frequency' => $this->frequency,
|
||||||
'output' => $this->output,
|
'output' => $this->output,
|
||||||
]);
|
]);
|
||||||
@@ -44,11 +46,11 @@ class BackupFailed extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function toDiscord(): string
|
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
|
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 [
|
return [
|
||||||
"message" => $message,
|
"message" => $message,
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -12,11 +12,12 @@ class BackupSuccess extends Notification implements ShouldQueue
|
|||||||
{
|
{
|
||||||
use Queueable;
|
use Queueable;
|
||||||
|
|
||||||
public $tries = 1;
|
public $backoff = 10;
|
||||||
|
public $tries = 3;
|
||||||
public string $name;
|
public string $name;
|
||||||
public string $frequency;
|
public string $frequency;
|
||||||
|
|
||||||
public function __construct(ScheduledDatabaseBackup $backup, public $database)
|
public function __construct(ScheduledDatabaseBackup $backup, public $database, public $database_name)
|
||||||
{
|
{
|
||||||
$this->name = $database->name;
|
$this->name = $database->name;
|
||||||
$this->frequency = $backup->frequency;
|
$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->subject("Coolify: Backup successfully done for {$this->database->name}");
|
||||||
$mail->view('emails.backup-success', [
|
$mail->view('emails.backup-success', [
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
|
'database_name' => $this->database_name,
|
||||||
'frequency' => $this->frequency,
|
'frequency' => $this->frequency,
|
||||||
]);
|
]);
|
||||||
return $mail;
|
return $mail;
|
||||||
@@ -40,11 +42,12 @@ class BackupSuccess extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
public function toDiscord(): string
|
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
|
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 [
|
return [
|
||||||
"message" => $message,
|
"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 $disabled = false,
|
||||||
public bool $readonly = false,
|
public bool $readonly = false,
|
||||||
public bool $allowTab = false,
|
public bool $allowTab = false,
|
||||||
|
public bool $spellcheck = false,
|
||||||
public ?string $helper = null,
|
public ?string $helper = null,
|
||||||
public bool $realtimeValidation = false,
|
public bool $realtimeValidation = false,
|
||||||
public bool $allowToPeak = true,
|
public bool $allowToPeak = true,
|
||||||
public string $defaultClass = "input scrollbar",
|
public string $defaultClass = "input scrollbar font-mono",
|
||||||
public string $defaultClassInput = "input"
|
public string $defaultClassInput = "input"
|
||||||
) {
|
) {
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use App\Models\StandaloneDocker;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Spatie\Url\Url;
|
use Spatie\Url\Url;
|
||||||
|
|
||||||
function queue_application_deployment(Application $application, string $deployment_uuid, int | null $pull_request_id = 0, string $commit = 'HEAD', bool $force_rebuild = false, bool $is_webhook = false, bool $restart_only = false, ?string $git_type = null, bool $no_questions_asked = false, Server $server = null, StandaloneDocker $destination = null, bool $only_this_server = false)
|
function queue_application_deployment(Application $application, string $deployment_uuid, int | null $pull_request_id = 0, string $commit = 'HEAD', bool $force_rebuild = false, bool $is_webhook = false, bool $restart_only = false, ?string $git_type = null, bool $no_questions_asked = false, Server $server = null, StandaloneDocker $destination = null, bool $only_this_server = false, bool $rollback = false)
|
||||||
{
|
{
|
||||||
$application_id = $application->id;
|
$application_id = $application->id;
|
||||||
$deployment_link = Url::fromString($application->link() . "/deployment/{$deployment_uuid}");
|
$deployment_link = Url::fromString($application->link() . "/deployment/{$deployment_uuid}");
|
||||||
@@ -38,6 +38,7 @@ function queue_application_deployment(Application $application, string $deployme
|
|||||||
'is_webhook' => $is_webhook,
|
'is_webhook' => $is_webhook,
|
||||||
'restart_only' => $restart_only,
|
'restart_only' => $restart_only,
|
||||||
'commit' => $commit,
|
'commit' => $commit,
|
||||||
|
'rollback' => $rollback,
|
||||||
'git_type' => $git_type,
|
'git_type' => $git_type,
|
||||||
'only_this_server' => $only_this_server
|
'only_this_server' => $only_this_server
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use App\Models\ServiceApplication;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Spatie\Url\Url;
|
use Spatie\Url\Url;
|
||||||
|
use Visus\Cuid2\Cuid2;
|
||||||
|
|
||||||
function getCurrentApplicationContainerStatus(Server $server, int $id, ?int $pullRequestId = null, ?bool $includePullrequests = false): Collection
|
function getCurrentApplicationContainerStatus(Server $server, int $id, ?int $pullRequestId = null, ?bool $includePullrequests = false): Collection
|
||||||
{
|
{
|
||||||
@@ -272,7 +273,7 @@ function fqdnLabelsForCaddy(string $network, string $uuid, Collection $domains,
|
|||||||
}
|
}
|
||||||
return $labels->sort();
|
return $labels->sort();
|
||||||
}
|
}
|
||||||
function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_https_enabled = false, $onlyPort = null, ?Collection $serviceLabels = null, ?bool $is_gzip_enabled = true, ?bool $is_stripprefix_enabled = true, ?string $service_name = null)
|
function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_https_enabled = false, $onlyPort = null, ?Collection $serviceLabels = null, ?bool $is_gzip_enabled = true, ?bool $is_stripprefix_enabled = true, ?string $service_name = null, bool $generate_unique_uuid = false)
|
||||||
{
|
{
|
||||||
$labels = collect([]);
|
$labels = collect([]);
|
||||||
$labels->push('traefik.enable=true');
|
$labels->push('traefik.enable=true');
|
||||||
@@ -313,7 +314,9 @@ function fqdnLabelsForTraefik(string $uuid, Collection $domains, bool $is_force_
|
|||||||
}
|
}
|
||||||
foreach ($domains as $loop => $domain) {
|
foreach ($domains as $loop => $domain) {
|
||||||
try {
|
try {
|
||||||
// $uuid = new Cuid2(7);
|
if ($generate_unique_uuid) {
|
||||||
|
$uuid = new Cuid2(7);
|
||||||
|
}
|
||||||
$url = Url::fromString($domain);
|
$url = Url::fromString($domain);
|
||||||
$host = $url->getHost();
|
$host = $url->getHost();
|
||||||
$path = $url->getPath();
|
$path = $url->getPath();
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ function remote_process(
|
|||||||
if ($server->isNonRoot()) {
|
if ($server->isNonRoot()) {
|
||||||
$command = parseCommandsByLineForSudo(collect($command), $server);
|
$command = parseCommandsByLineForSudo(collect($command), $server);
|
||||||
}
|
}
|
||||||
ray($command);
|
|
||||||
$command_string = implode("\n", $command);
|
$command_string = implode("\n", $command);
|
||||||
if (auth()->user()) {
|
if (auth()->user()) {
|
||||||
$teams = auth()->user()->teams->pluck('id');
|
$teams = auth()->user()->teams->pluck('id');
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function collectRegex(string $name)
|
|||||||
}
|
}
|
||||||
function replaceVariables($variable)
|
function replaceVariables($variable)
|
||||||
{
|
{
|
||||||
return $variable->replaceFirst('$', '')->replaceFirst('{', '')->replaceLast('}', '');
|
return $variable->before('}')->replaceFirst('$', '')->replaceFirst('{', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Application $oneService, bool $isInit = false)
|
function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Application $oneService, bool $isInit = false)
|
||||||
@@ -27,7 +27,7 @@ function getFilesystemVolumesFromServer(ServiceApplication|ServiceDatabase|Appli
|
|||||||
if ($oneService->getMorphClass() === 'App\Models\Application') {
|
if ($oneService->getMorphClass() === 'App\Models\Application') {
|
||||||
$workdir = $oneService->workdir();
|
$workdir = $oneService->workdir();
|
||||||
$server = $oneService->destination->server;
|
$server = $oneService->destination->server;
|
||||||
} else{
|
} else {
|
||||||
$workdir = $oneService->service->workdir();
|
$workdir = $oneService->service->workdir();
|
||||||
$server = $oneService->service->server;
|
$server = $oneService->service->server;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,11 +29,13 @@ use DanHarrin\LivewireRateLimiting\Exceptions\TooManyRequestsException;
|
|||||||
use Illuminate\Database\UniqueConstraintViolationException;
|
use Illuminate\Database\UniqueConstraintViolationException;
|
||||||
use Illuminate\Mail\Message;
|
use Illuminate\Mail\Message;
|
||||||
use Illuminate\Notifications\Messages\MailMessage;
|
use Illuminate\Notifications\Messages\MailMessage;
|
||||||
|
use Illuminate\Process\Pool;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\File;
|
use Illuminate\Support\Facades\File;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
use Illuminate\Support\Facades\Process;
|
||||||
use Illuminate\Support\Facades\Request;
|
use Illuminate\Support\Facades\Request;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
@@ -1266,6 +1268,11 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
$serviceLabels->push("$removedLabelName=$removedLabel");
|
$serviceLabels->push("$removedLabelName=$removedLabel");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($serviceLabels->count() > 0) {
|
||||||
|
$serviceLabels = $serviceLabels->map(function ($value, $key) {
|
||||||
|
return escapeDollarSign($value);
|
||||||
|
});
|
||||||
|
}
|
||||||
$baseName = generateApplicationContainerName($resource, $pull_request_id);
|
$baseName = generateApplicationContainerName($resource, $pull_request_id);
|
||||||
$containerName = "$serviceName-$baseName";
|
$containerName = "$serviceName-$baseName";
|
||||||
if (count($serviceVolumes) > 0) {
|
if (count($serviceVolumes) > 0) {
|
||||||
@@ -1424,6 +1431,14 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
foreach ($definedNetwork as $key => $network) {
|
foreach ($definedNetwork as $key => $network) {
|
||||||
$networks->put($network, null);
|
$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());
|
data_set($service, 'networks', $networks->toArray());
|
||||||
// Get variables from the service
|
// Get variables from the service
|
||||||
foreach ($serviceVariables as $variableName => $variable) {
|
foreach ($serviceVariables as $variableName => $variable) {
|
||||||
@@ -1585,7 +1600,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
$fqdns = data_get($domains, "$serviceName.domain");
|
$fqdns = data_get($domains, "$serviceName.domain");
|
||||||
if ($fqdns) {
|
if ($fqdns) {
|
||||||
$fqdns = str($fqdns)->explode(',');
|
$fqdns = str($fqdns)->explode(',');
|
||||||
$uuid = new Cuid2(7);
|
|
||||||
if ($pull_request_id !== 0) {
|
if ($pull_request_id !== 0) {
|
||||||
$fqdns = $fqdns->map(function ($fqdn) use ($pull_request_id, $resource) {
|
$fqdns = $fqdns->map(function ($fqdn) use ($pull_request_id, $resource) {
|
||||||
$preview = ApplicationPreview::findPreviewByApplicationAndPullId($resource->id, $pull_request_id);
|
$preview = ApplicationPreview::findPreviewByApplicationAndPullId($resource->id, $pull_request_id);
|
||||||
@@ -1604,13 +1618,14 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik(
|
$serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik(
|
||||||
uuid: $uuid,
|
uuid: $resource->uuid,
|
||||||
domains: $fqdns,
|
domains: $fqdns,
|
||||||
serviceLabels: $serviceLabels
|
serviceLabels: $serviceLabels,
|
||||||
|
generate_unique_uuid: $resource->build_pack === 'dockercompose'
|
||||||
));
|
));
|
||||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForCaddy(
|
$serviceLabels = $serviceLabels->merge(fqdnLabelsForCaddy(
|
||||||
network: $resource->destination->network,
|
network: $resource->destination->network,
|
||||||
uuid: $uuid,
|
uuid: $resource->uuid,
|
||||||
domains: $fqdns,
|
domains: $fqdns,
|
||||||
serviceLabels: $serviceLabels
|
serviceLabels: $serviceLabels
|
||||||
));
|
));
|
||||||
@@ -2004,3 +2019,37 @@ function parseLineForSudo(string $command, Server $server): string
|
|||||||
|
|
||||||
return $command;
|
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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ return [
|
|||||||
|
|
||||||
// The release version of your application
|
// The release version of your application
|
||||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||||
'release' => '4.0.0-beta.259',
|
'release' => '4.0.0-beta.271',
|
||||||
// When left empty or `null` the Laravel environment will be used
|
// When left empty or `null` the Laravel environment will be used
|
||||||
'environment' => config('app.env'),
|
'environment' => config('app.env'),
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return '4.0.0-beta.259';
|
return '4.0.0-beta.271';
|
||||||
|
|||||||
@@ -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('application_deployment_queues', function (Blueprint $table) {
|
||||||
|
$table->boolean('rollback')->default(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('application_deployment_queues', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('rollback');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -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 {
|
get_public_ips();
|
||||||
$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";
|
|
||||||
}
|
|
||||||
|
|
||||||
$oauth_settings_seeder = new OauthSettingSeeder();
|
$oauth_settings_seeder = new OauthSettingSeeder();
|
||||||
$oauth_settings_seeder->run();
|
$oauth_settings_seeder->run();
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ services:
|
|||||||
expose:
|
expose:
|
||||||
- "${APP_PORT:-8000}"
|
- "${APP_PORT:-8000}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: curl --fail http://localhost:80/api/health || exit 1
|
test: curl --fail http://127.0.0.1:80/api/health || exit 1
|
||||||
interval: 5s
|
interval: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
@@ -142,7 +142,7 @@ services:
|
|||||||
SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}"
|
SOKETI_DEFAULT_APP_KEY: "${PUSHER_APP_KEY}"
|
||||||
SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET}"
|
SOKETI_DEFAULT_APP_SECRET: "${PUSHER_APP_SECRET}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: wget -qO- http://localhost:6001/ready || exit 1
|
test: wget -qO- http://127.0.0.1:6001/ready || exit 1
|
||||||
interval: 5s
|
interval: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
|
|||||||
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 |
@@ -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;
|
@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 {
|
.badge-success {
|
||||||
@apply bg-success;
|
@apply bg-success;
|
||||||
}
|
}
|
||||||
@@ -195,7 +200,7 @@ tr td:first-child {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.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 {
|
.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 ;
|
@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.remove='dark:focus:ring-coolgray-300 dark:ring-coolgray-300'
|
||||||
wire:dirty.class="dark:focus:ring-warning dark:ring-warning" wire:loading.attr="disabled"
|
wire:dirty.class="dark:focus:ring-warning dark:ring-warning" wire:loading.attr="disabled"
|
||||||
type="{{ $type }}" @disabled($disabled)
|
type="{{ $type }}" @disabled($disabled)
|
||||||
|
min="{{ $attributes->get('min') }}" max="{{ $attributes->get('max') }}"
|
||||||
@if ($id !== 'null') id={{ $id }} @endif name="{{ $name }}"
|
@if ($id !== 'null') id={{ $id }} @endif name="{{ $name }}"
|
||||||
placeholder="{{ $attributes->get('placeholder') }}">
|
placeholder="{{ $attributes->get('placeholder') }}">
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
@else
|
@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 }}"
|
@if ($realtimeValidation) wire:model.debounce.200ms="{{ $id }}"
|
||||||
@else
|
@else
|
||||||
wire:model={{ $value ?? $id }}
|
wire:model={{ $value ?? $id }}
|
||||||
|
|||||||
@@ -156,6 +156,33 @@
|
|||||||
Destinations
|
Destinations
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
<li>
|
||||||
<a title="Notifications"
|
<a title="Notifications"
|
||||||
class="{{ request()->is('notifications*') ? 'menu-item-active menu-item' : 'menu-item' }}"
|
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:enter-start="translate-y-full" x-transition:enter-end="translate-y-0"
|
||||||
x-transition:leave="transition ease-in duration-300" x-transition:leave-start="translate-y-0"
|
x-transition:leave="transition ease-in duration-300" x-transition:leave-start="translate-y-0"
|
||||||
x-transition:leave-end="translate-y-full" x-init="setTimeout(() => { bannerVisible = true }, bannerVisibleAfter);"
|
x-transition:leave-end="translate-y-full" x-init="setTimeout(() => { bannerVisible = true }, bannerVisibleAfter);"
|
||||||
class="fixed bottom-0 right-0 h-auto duration-300 ease-out px-5 pb-5 max-w-[46rem] z-[999]"
|
class="fixed bottom-0 right-0 h-auto duration-300 ease-out px-5 pb-5 max-w-[46rem] z-[999]" x-cloak>
|
||||||
x-cloak>
|
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-center justify-between w-full h-full max-w-4xl p-6 mx-auto bg-white border shadow-lg lg:border-t dark:border-coolgray-300 dark:bg-coolgray-100 lg:p-8 lg:flex-row sm:rounded">
|
class="flex flex-col items-center justify-between w-full h-full max-w-4xl p-6 mx-auto bg-white border shadow-lg lg:border-t dark:border-coolgray-300 dark:bg-coolgray-100/40 hover:dark:bg-coolgray-100/100 lg:p-8 lg:flex-row sm:rounded">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-start h-full pb-0 text-xs lg:items-center lg:flex-row lg:pr-6 lg:space-x-5 dark:text-neutral-300 ">
|
class="flex flex-col items-start h-full pb-0 text-xs lg:items-center lg:flex-row lg:pr-6 lg:space-x-5 dark:text-neutral-300 ">
|
||||||
@if (isset($icon))
|
@if (isset($icon))
|
||||||
{{ $icon }}
|
{{ $icon }}
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="pt-0">
|
<div class="pt-0">
|
||||||
<h4 class="w-full mb-1 text-base font-bold leading-none -translate-y-1 lg:text-xl text-neutral-900 dark:text-white">
|
<h4
|
||||||
|
class="w-full mb-1 text-base font-bold leading-none -translate-y-1 text-neutral-900 dark:text-white">
|
||||||
{{ $title }}
|
{{ $title }}
|
||||||
</h4>
|
</h4>
|
||||||
<p class="">{{ $description }}</span></p>
|
<div>{{ $description }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<button @click="bannerVisible=false">
|
||||||
|
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||||
|
stroke-width="1.5" stroke="currentColor" class="w-full h-full">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<h1>Team</h1>
|
<h1>Team</h1>
|
||||||
<x-modal-input buttonTitle="+ Add" title="New Team">
|
<x-modal-input buttonTitle="+ Add" title="New Team">
|
||||||
<livewire:team.create/>
|
<livewire:team.create />
|
||||||
</x-modal-input>
|
</x-modal-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="subtitle">Team settings & shared environment variables.</div>
|
<div class="subtitle">Team wide configurations.</div>
|
||||||
<nav class="navbar-main">
|
<nav class="navbar-main">
|
||||||
<a class="{{ request()->routeIs('team.index') ? 'dark:text-white' : '' }}" href="{{ route('team.index') }}">
|
<a class="{{ request()->routeIs('team.index') ? 'dark:text-white' : '' }}" href="{{ route('team.index') }}">
|
||||||
<button>General</button>
|
<button>General</button>
|
||||||
@@ -14,14 +14,6 @@
|
|||||||
href="{{ route('team.member.index') }}">
|
href="{{ route('team.member.index') }}">
|
||||||
<button>Members</button>
|
<button>Members</button>
|
||||||
</a>
|
</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>
|
<div class="flex-1"></div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<x-emails.layout>
|
<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
|
### Reason
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<x-emails.layout>
|
<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>
|
</x-emails.layout>
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
@php use App\Enums\ProxyTypes; @endphp
|
@php use App\Enums\ProxyTypes; @endphp
|
||||||
<section class="flex flex-col h-full lg:items-center lg:justify-center">
|
<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')
|
@if ($currentState === 'welcome')
|
||||||
<h1 class="text-3xl font-bold lg:text-5xl">Welcome to Coolify</h1>
|
<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="py-6 text-center lg:text-xl">Let me help you set up the basics.</div>
|
||||||
<div class="flex justify-center ">
|
<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
|
Started
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,7 +62,8 @@
|
|||||||
server.
|
server.
|
||||||
<br />
|
<br />
|
||||||
Check this <a target="_blank" class="underline"
|
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.input readonly id="serverPublicKey"></x-forms.input>
|
||||||
<x-forms.button class="lg:w-64 box-boarding" wire:target="setServerType('localhost')"
|
<x-forms.button class="lg:w-64 box-boarding" wire:target="setServerType('localhost')"
|
||||||
wire:click="setServerType('localhost')">Check again
|
wire:click="setServerType('localhost')">Check again
|
||||||
@@ -120,7 +123,8 @@
|
|||||||
<x-slot:actions>
|
<x-slot:actions>
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
<div>
|
<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
|
one
|
||||||
for
|
for
|
||||||
me)
|
me)
|
||||||
@@ -146,7 +150,8 @@
|
|||||||
'root' or skip the boarding process and add a new private key manually to Coolify and to the
|
'root' or skip the boarding process and add a new private key manually to Coolify and to the
|
||||||
server.
|
server.
|
||||||
<x-forms.input readonly id="serverPublicKey"></x-forms.input>
|
<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
|
again
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
@endif
|
@endif
|
||||||
@@ -207,9 +212,14 @@
|
|||||||
<x-forms.input required placeholder="127.0.0.1" label="IP Address" id="remoteServerHost" />
|
<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."
|
<x-forms.input required placeholder="Port number of your server. Default is 22."
|
||||||
label="Port" id="remoteServerPort" />
|
label="Port" id="remoteServerPort" />
|
||||||
<x-forms.input required readonly
|
<div class="w-full">
|
||||||
placeholder="Username to connect to your server. Default is root." label="Username"
|
<x-forms.input required placeholder="User to connect to your server. Default is root."
|
||||||
id="remoteServerUser" />
|
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>
|
||||||
<div class="lg:w-64">
|
<div class="lg:w-64">
|
||||||
<x-forms.checkbox
|
<x-forms.checkbox
|
||||||
|
|||||||
@@ -5,14 +5,12 @@
|
|||||||
<x-forms.input id="name" label="Name" required />
|
<x-forms.input id="name" label="Name" required />
|
||||||
<x-forms.input id="network" label="Network" required />
|
<x-forms.input id="network" label="Network" required />
|
||||||
</div>
|
</div>
|
||||||
@if ($server_id)
|
<x-forms.select id="server_id" label="Select a server" required wire:change="generate_name">
|
||||||
<x-forms.select id="server_id" label="Select a server" required wire:change="generate_name">
|
<option disabled>Select a server</option>
|
||||||
<option disabled>Select a server</option>
|
@foreach ($servers as $server)
|
||||||
@foreach ($servers as $server)
|
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
@endforeach
|
||||||
@endforeach
|
</x-forms.select>
|
||||||
</x-forms.select>
|
|
||||||
@endif
|
|
||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
Continue
|
Continue
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div>Your feedback helps us to improve Coolify. Thank you! 💜</div>
|
<div>Your feedback helps us to improve Coolify. Thank you! 💜</div>
|
||||||
<form wire:submit="submit" class="flex flex-col gap-4 pt-4">
|
<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.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>
|
placeholder="Please provide as much information as possible."></x-forms.textarea>
|
||||||
<div></div>
|
<div></div>
|
||||||
<x-forms.button class="w-full mt-4" type="submit" @click="modalOpen=false">Send</x-forms.button>
|
<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" />
|
instantSave id="is_gzip_enabled" />
|
||||||
<x-forms.checkbox helper="Strip Prefix is used to remove prefixes from paths. Like /api/ to /api."
|
<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" />
|
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)
|
@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."
|
<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" />
|
instantSave id="application.settings.is_log_drain_enabled" label="Drain Logs" />
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -83,48 +83,48 @@
|
|||||||
<livewire:project.application.general :application="$application" />
|
<livewire:project.application.general :application="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'swarm'" class="h-full">
|
<div x-cloak x-show="activeTab === 'swarm'" class="h-full">
|
||||||
<livewire:project.application.swarm :application="$application" lazy />
|
<livewire:project.application.swarm :application="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'advanced'" class="h-full">
|
<div x-cloak x-show="activeTab === 'advanced'" class="h-full">
|
||||||
<livewire:project.application.advanced :application="$application" lazy />
|
<livewire:project.application.advanced :application="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'environment-variables'">
|
<div x-cloak x-show="activeTab === 'environment-variables'">
|
||||||
<livewire:project.shared.environment-variable.all :resource="$application" lazy />
|
<livewire:project.shared.environment-variable.all :resource="$application" />
|
||||||
</div>
|
</div>
|
||||||
@if ($application->git_based())
|
@if ($application->git_based())
|
||||||
<div x-cloak x-show="activeTab === 'source'">
|
<div x-cloak x-show="activeTab === 'source'">
|
||||||
<livewire:project.application.source :application="$application" lazy />
|
<livewire:project.application.source :application="$application" />
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<div x-cloak x-show="activeTab === 'servers'">
|
<div x-cloak x-show="activeTab === 'servers'">
|
||||||
<livewire:project.shared.destination :resource="$application" :servers="$servers" lazy />
|
<livewire:project.shared.destination :resource="$application" :servers="$servers" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'storages'">
|
<div x-cloak x-show="activeTab === 'storages'">
|
||||||
<livewire:project.service.storage :resource="$application" lazy />
|
<livewire:project.service.storage :resource="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'webhooks'">
|
<div x-cloak x-show="activeTab === 'webhooks'">
|
||||||
<livewire:project.shared.webhooks :resource="$application" lazy />
|
<livewire:project.shared.webhooks :resource="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'previews'">
|
<div x-cloak x-show="activeTab === 'previews'">
|
||||||
<livewire:project.application.previews :application="$application" lazy />
|
<livewire:project.application.previews :application="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'health'">
|
<div x-cloak x-show="activeTab === 'health'">
|
||||||
<livewire:project.shared.health-checks :resource="$application" lazy />
|
<livewire:project.shared.health-checks :resource="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'rollback'">
|
<div x-cloak x-show="activeTab === 'rollback'">
|
||||||
<livewire:project.application.rollback :application="$application" lazy />
|
<livewire:project.application.rollback :application="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'resource-limits'">
|
<div x-cloak x-show="activeTab === 'resource-limits'">
|
||||||
<livewire:project.shared.resource-limits :resource="$application" lazy />
|
<livewire:project.shared.resource-limits :resource="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'scheduled-tasks'">
|
<div x-cloak x-show="activeTab === 'scheduled-tasks'">
|
||||||
<livewire:project.shared.scheduled-task.all :resource="$application" lazy />
|
<livewire:project.shared.scheduled-task.all :resource="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'resource-operations'">
|
<div x-cloak x-show="activeTab === 'resource-operations'">
|
||||||
<livewire:project.shared.resource-operations :resource="$application" lazy />
|
<livewire:project.shared.resource-operations :resource="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'tags'">
|
<div x-cloak x-show="activeTab === 'tags'">
|
||||||
<livewire:project.shared.tags :resource="$application" lazy />
|
<livewire:project.shared.tags :resource="$application" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'danger'">
|
<div x-cloak x-show="activeTab === 'danger'">
|
||||||
<livewire:project.shared.danger :resource="$application" />
|
<livewire:project.shared.danger :resource="$application" />
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
@foreach (decode_remote_command_output($application_deployment_queue) as $line)
|
@foreach (decode_remote_command_output($application_deployment_queue) as $line)
|
||||||
<span @class([
|
<span @class([
|
||||||
'dark:text-warning whitespace-pre-line' => $line['hidden'],
|
'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'])
|
])>[{{ $line['timestamp'] }}] @if ($line['hidden'])
|
||||||
<br><br>[COMMAND] {{ $line['command'] }}<br>[OUTPUT]
|
<br><br>[COMMAND] {{ $line['command'] }}<br>[OUTPUT]
|
||||||
@endif @if (str($line['output'])->contains('http://') || str($line['output'])->contains('https://'))
|
@endif @if (str($line['output'])->contains('http://') || str($line['output'])->contains('https://'))
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
@endphp {!! $line['output'] !!}
|
@endphp {!! $line['output'] !!}
|
||||||
@else
|
@else
|
||||||
{{ $line['output'] }}
|
{{ $line['output'] }}
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
</span>
|
</span>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<h2>General</h2>
|
<h2>General</h2>
|
||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
Save
|
Save
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</div>
|
</div>
|
||||||
<div>General configuration for your application.</div>
|
<div>General configuration for your application.</div>
|
||||||
<div class="flex flex-col gap-2 py-4">
|
<div class="flex flex-col gap-2 py-4">
|
||||||
@@ -38,18 +38,13 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@if ($application->build_pack === 'dockercompose')
|
@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)
|
@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)
|
@foreach (data_get($parsedServices, 'services') as $serviceName => $service)
|
||||||
@if (!isDatabaseImage(data_get($service, 'image')))
|
@if (!isDatabaseImage(data_get($service, 'image')))
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<x-forms.input
|
<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() }}"
|
label="Domains for {{ str($serviceName)->headline() }}"
|
||||||
id="parsedServiceDomains.{{ $serviceName }}.domain"></x-forms.input>
|
id="parsedServiceDomains.{{ $serviceName }}.domain"></x-forms.input>
|
||||||
<x-forms.button wire:click="generateDomain('{{ $serviceName }}')">Generate
|
<x-forms.button wire:click="generateDomain('{{ $serviceName }}')">Generate
|
||||||
@@ -64,7 +59,7 @@
|
|||||||
@if ($application->build_pack !== 'dockercompose')
|
@if ($application->build_pack !== 'dockercompose')
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<x-forms.input placeholder="https://coolify.io" id="application.fqdn" label="Domains"
|
<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 wire:click="getWildcardDomain">Generate Domain
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<div class="pb-4">Previews</div>
|
<div class="pb-4">Previews</div>
|
||||||
<div class="flex flex-wrap gap-6">
|
<div class="flex flex-wrap gap-6">
|
||||||
@foreach ($application->previews as $preview)
|
@foreach ($application->previews as $preview)
|
||||||
<div class="flex flex-col p-4 dark:bg-coolgray-200">
|
<div class="flex flex-col p-4 dark:bg-coolgray-100">
|
||||||
<div class="flex gap-2">PR #{{ data_get($preview, 'pull_request_id') }} |
|
<div class="flex gap-2">PR #{{ data_get($preview, 'pull_request_id') }} |
|
||||||
@if (Str::of(data_get($preview, 'status'))->startsWith('running'))
|
@if (Str::of(data_get($preview, 'status'))->startsWith('running'))
|
||||||
<x-status.running :status="data_get($preview, 'status')" />
|
<x-status.running :status="data_get($preview, 'status')" />
|
||||||
@@ -86,18 +86,20 @@
|
|||||||
Redeploy
|
Redeploy
|
||||||
@endif
|
@endif
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
<a
|
@if (count($parameters) > 0)
|
||||||
href="{{ route('project.application.deployment.index', [...$parameters, 'pull_request_id' => data_get($preview, 'pull_request_id')]) }}">
|
<a
|
||||||
<x-forms.button class="dark:bg-coolgray-500">
|
href="{{ route('project.application.deployment.index', [...$parameters, 'pull_request_id' => data_get($preview, 'pull_request_id')]) }}">
|
||||||
Deployment Logs
|
<x-forms.button class="dark:bg-coolgray-500">
|
||||||
</x-forms.button>
|
Deployment Logs
|
||||||
</a>
|
</x-forms.button>
|
||||||
<a
|
</a>
|
||||||
href="{{ route('project.application.logs', [...$parameters, 'pull_request_id' => data_get($preview, 'pull_request_id')]) }}">
|
<a
|
||||||
<x-forms.button class="dark:bg-coolgray-500">
|
href="{{ route('project.application.logs', [...$parameters, 'pull_request_id' => data_get($preview, 'pull_request_id')]) }}">
|
||||||
Application Logs
|
<x-forms.button class="dark:bg-coolgray-500">
|
||||||
</x-forms.button>
|
Application Logs
|
||||||
</a>
|
</x-forms.button>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
<x-forms.button isError class="dark:bg-coolgray-500"
|
<x-forms.button isError class="dark:bg-coolgray-500"
|
||||||
wire:click="stop({{ data_get($preview, 'pull_request_id') }})">Delete
|
wire:click="stop({{ data_get($preview, 'pull_request_id') }})">Delete
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
@forelse ($images as $image)
|
@forelse ($images as $image)
|
||||||
<div class="w-2/4 p-2">
|
<div class="w-2/4 p-2">
|
||||||
<div class="bg-white border rounded dark:border-bg-black dark:bg-coolgray-100">
|
<div class="bg-white border rounded dark:border-black dark:bg-coolgray-100">
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<div class="">
|
<div class="">
|
||||||
@if (data_get($image, 'is_current'))
|
@if (data_get($image, 'is_current'))
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex 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" />
|
label="Repository" />
|
||||||
<x-forms.input placeholder="main" id="application.git_branch" label="Branch" />
|
<x-forms.input placeholder="main" id="application.git_branch" label="Branch" />
|
||||||
</div>
|
</div>
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
label="Commit SHA" />
|
label="Commit SHA" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@isset($application->private_key_id)
|
@if(data_get($application, 'private_key_id'))
|
||||||
<h3 class="pt-4">Deploy Key</h3>
|
<h3 class="pt-4">Deploy Key</h3>
|
||||||
<div class="py-2 pt-4">Currently attached Private Key: <span
|
<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>
|
</div>
|
||||||
|
|
||||||
<h4 class="py-2 ">Select another Private Key</h4>
|
<h4 class="py-2 ">Select another Private Key</h4>
|
||||||
@@ -49,6 +49,6 @@
|
|||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
@endisset
|
@endif
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,43 +1,51 @@
|
|||||||
<div class="flex flex-col-reverse gap-2">
|
<div>
|
||||||
@forelse($executions as $execution)
|
<div class="flex items-center gap-2">
|
||||||
<form wire:key="{{ data_get($execution, 'id') }}"
|
<h3 class="py-4">Executions</h3>
|
||||||
class="relative flex flex-col p-4 bg-white box-without-bg dark:bg-coolgray-100" @class([
|
<x-forms.button wire:click='cleanupFailed'>Cleanup Failed Backups</x-forms.button>
|
||||||
'border-green-500' => data_get($execution, 'status') === 'success',
|
</div>
|
||||||
'border-red-500' => data_get($execution, 'status') === 'failed',
|
<div class="flex flex-col-reverse gap-2">
|
||||||
])>
|
@forelse($executions as $execution)
|
||||||
@if (data_get($execution, 'status') === 'running')
|
<form wire:key="{{ data_get($execution, 'id') }}"
|
||||||
<div class="absolute top-2 right-2">
|
class="relative flex flex-col p-4 bg-white box-without-bg dark:bg-coolgray-100"
|
||||||
<x-loading />
|
@class([
|
||||||
</div>
|
'border-green-500' => data_get($execution, 'status') === 'success',
|
||||||
@endif
|
'border-red-500' => data_get($execution, 'status') === 'failed',
|
||||||
<div>Database: {{ data_get($execution, 'database_name', 'N/A') }}</div>
|
])>
|
||||||
<div>Status: {{ data_get($execution, 'status') }}</div>
|
@if (data_get($execution, 'status') === 'running')
|
||||||
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
|
<div class="absolute top-2 right-2">
|
||||||
@if (data_get($execution, 'message'))
|
<x-loading />
|
||||||
<div>Message: {{ data_get($execution, 'message') }}</div>
|
</div>
|
||||||
@endif
|
|
||||||
<div>Size: {{ data_get($execution, 'size') }} B / {{ round((int) data_get($execution, 'size') / 1024, 2) }}
|
|
||||||
kB / {{ round((int) data_get($execution, 'size') / 1024 / 1024, 3) }} MB
|
|
||||||
</div>
|
|
||||||
<div>Location: {{ data_get($execution, 'filename', 'N/A') }}</div>
|
|
||||||
<div class="flex gap-2">
|
|
||||||
<div class="flex-1"></div>
|
|
||||||
@if (data_get($execution, 'status') === 'success')
|
|
||||||
<x-forms.button class=" dark:hover:bg-coolgray-400"
|
|
||||||
x-on:click="download_file('{{ data_get($execution, 'id') }}')">Download</x-forms.button>
|
|
||||||
@endif
|
@endif
|
||||||
<x-modal-confirmation isErrorButton action="deleteBackup({{ data_get($execution, 'id') }})">
|
<div>Database: {{ data_get($execution, 'database_name', 'N/A') }}</div>
|
||||||
<x-slot:button-title>
|
<div>Status: {{ data_get($execution, 'status') }}</div>
|
||||||
Delete
|
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
|
||||||
</x-slot:button-title>
|
@if (data_get($execution, 'message'))
|
||||||
This will delete this backup. It is not reversible.<br>Please think again.
|
<div>Message: {{ data_get($execution, 'message') }}</div>
|
||||||
</x-modal-confirmation>
|
@endif
|
||||||
</div>
|
<div>Size: {{ data_get($execution, 'size') }} B /
|
||||||
</form>
|
{{ round((int) data_get($execution, 'size') / 1024, 2) }}
|
||||||
|
kB / {{ round((int) data_get($execution, 'size') / 1024 / 1024, 3) }} MB
|
||||||
|
</div>
|
||||||
|
<div>Location: {{ data_get($execution, 'filename', 'N/A') }}</div>
|
||||||
|
<div class="flex gap-2">
|
||||||
|
<div class="flex-1"></div>
|
||||||
|
@if (data_get($execution, 'status') === 'success')
|
||||||
|
<x-forms.button class=" dark:hover:bg-coolgray-400"
|
||||||
|
x-on:click="download_file('{{ data_get($execution, 'id') }}')">Download</x-forms.button>
|
||||||
|
@endif
|
||||||
|
<x-modal-confirmation isErrorButton action="deleteBackup({{ data_get($execution, 'id') }})">
|
||||||
|
<x-slot:button-title>
|
||||||
|
Delete
|
||||||
|
</x-slot:button-title>
|
||||||
|
This will delete this backup. It is not reversible.<br>Please think again.
|
||||||
|
</x-modal-confirmation>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
@empty
|
@empty
|
||||||
<div>No executions found.</div>
|
<div>No executions found.</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function download_file(executionId) {
|
function download_file(executionId) {
|
||||||
window.open('/download/backup/' + executionId, '_blank');
|
window.open('/download/backup/' + executionId, '_blank');
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
<livewire:project.database.heading :database="$database" />
|
<livewire:project.database.heading :database="$database" />
|
||||||
<div class="pt-6">
|
<div class="pt-6">
|
||||||
<livewire:project.database.backup-edit :backup="$backup" :s3s="$s3s" :status="data_get($database, 'status')" />
|
<livewire:project.database.backup-edit :backup="$backup" :s3s="$s3s" :status="data_get($database, 'status')" />
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<h3 class="py-4">Executions</h3>
|
|
||||||
<x-forms.button wire:click='cleanupFailed'>Cleanup Failed Backups</x-forms.button>
|
|
||||||
</div>
|
|
||||||
<livewire:project.database.backup-executions :backup="$backup" :executions="$executions" />
|
<livewire:project.database.backup-executions :backup="$backup" :executions="$executions" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</x-forms.select>
|
</x-forms.select>
|
||||||
<x-forms.button type="submit" @click="slideOverOpen=false">
|
<x-forms.button type="submit" @click="modalOpen=false">
|
||||||
Save
|
Save
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
</form>
|
</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') }">
|
<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"
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/dropzone.min.js"
|
||||||
integrity="sha512-U2WE1ktpMTuRBPoCFDzomoIorbOyUv0sP8B+INA3EzNAhehbzED1rOJg6bCqPf/Tuposxb5ja/MAUnC8THSbLQ=="
|
integrity="sha512-U2WE1ktpMTuRBPoCFDzomoIorbOyUv0sP8B+INA3EzNAhehbzED1rOJg6bCqPf/Tuposxb5ja/MAUnC8THSbLQ=="
|
||||||
crossorigin="anonymous" referrerpolicy="no-referrer" defer async></script>
|
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||||
@script
|
@script
|
||||||
<script>
|
<script>
|
||||||
Dropzone.options.myDropzone = {
|
Dropzone.options.myDropzone = {
|
||||||
|
|||||||
@@ -2,21 +2,21 @@
|
|||||||
<div class="flex flex-wrap gap-2">
|
<div class="flex flex-wrap gap-2">
|
||||||
@forelse($database->scheduledBackups as $backup)
|
@forelse($database->scheduledBackups as $backup)
|
||||||
@if ($type == 'database')
|
@if ($type == 'database')
|
||||||
<div class="box">
|
<a class="box"
|
||||||
<a class="flex flex-col"
|
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
|
||||||
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
|
<div class="flex flex-col">
|
||||||
<div>Frequency: {{ $backup->frequency }}</div>
|
<div>Frequency: {{ $backup->frequency }}</div>
|
||||||
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
|
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
|
||||||
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
|
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
@else
|
@else
|
||||||
<div class="box">
|
<div class="box" wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')">
|
||||||
<div @class([
|
<div @class([
|
||||||
'border-coollabs' =>
|
'border-coollabs' =>
|
||||||
data_get($backup, 'id') === data_get($selectedBackup, 'id'),
|
data_get($backup, 'id') === data_get($selectedBackup, 'id'),
|
||||||
'flex flex-col border-l-2 border-transparent',
|
'flex flex-col border-l-2 border-transparent',
|
||||||
]) wire:click="setSelectedBackup('{{ data_get($backup, 'id') }}')">
|
])>
|
||||||
<div>Frequency: {{ $backup->frequency }}</div>
|
<div>Frequency: {{ $backup->frequency }}</div>
|
||||||
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
|
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
|
||||||
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
|
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
|
||||||
|
|||||||
@@ -14,24 +14,4 @@
|
|||||||
<x-forms.input label="Description" id="project.description" />
|
<x-forms.input label="Description" id="project.description" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</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>
|
</div>
|
||||||
|
|||||||
@@ -42,21 +42,4 @@
|
|||||||
<x-forms.input label="Description" id="environment.description" />
|
<x-forms.input label="Description" id="environment.description" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</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>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="pb-4">Deploy any public Git repositories.</div>
|
<div class="pb-4">Deploy any public Git repositories.</div>
|
||||||
<form class="flex flex-col gap-2" wire:submit='load_branch'>
|
<form class="flex flex-col gap-2" wire:submit='load_branch'>
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<x-forms.input required id="repository_url" label="Repository URL (https://)" helper="{!! __('repository.url') !!}" />
|
<x-forms.input required id="repository_url" label="Repository URL (https://)" helper="{!! __('repository.url') !!}" />
|
||||||
<x-forms.button type="submit">
|
<x-forms.button type="submit">
|
||||||
|
|||||||
@@ -576,9 +576,9 @@
|
|||||||
@empty
|
@empty
|
||||||
<div class="w-96">No service found. Please try to reload the list!</div>
|
<div class="w-96">No service found. Please try to reload the list!</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
@if ($current_step === 'servers')
|
@if ($current_step === 'servers')
|
||||||
<h2>Select a server</h2>
|
<h2>Select a server</h2>
|
||||||
@@ -645,4 +645,3 @@
|
|||||||
</form>
|
</form>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -50,321 +50,311 @@
|
|||||||
<template x-for="item in filteredApplications" :key="item.id">
|
<template x-for="item in filteredApplications" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col w-full px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 box-title" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-full truncate box-description" x-text="item.description"></div>
|
<div class="max-w-full px-4 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.fqdn"></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group-hover:text-black group min-h-6">
|
<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">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredPostgresqls" :key="item.id">
|
<template x-for="item in filteredPostgresqls" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold box-title" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-full truncate box-description" x-text="item.description"></div>
|
<div class="max-w-full px-4 truncate box-description" x-text="item.description"></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group-hover:text-black group min-h-6">
|
<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">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredRedis" :key="item.id">
|
<template x-for="item in filteredRedis" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||||
<template x-for="tag in item.tags">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredMongodbs" :key="item.id">
|
<template x-for="item in filteredMongodbs" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||||
<template x-for="tag in item.tags">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredMysqls" :key="item.id">
|
<template x-for="item in filteredMysqls" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||||
<template x-for="tag in item.tags">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredMariadbs" :key="item.id">
|
<template x-for="item in filteredMariadbs" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||||
<template x-for="tag in item.tags">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredKeydbs" :key="item.id">
|
<template x-for="item in filteredKeydbs" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||||
<template x-for="tag in item.tags">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredDragonflies" :key="item.id">
|
<template x-for="item in filteredDragonflies" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||||
<template x-for="tag in item.tags">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredClickhouses" :key="item.id">
|
<template x-for="item in filteredClickhouses" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||||
<template x-for="tag in item.tags">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template x-for="item in filteredServices" :key="item.id">
|
<template x-for="item in filteredServices" :key="item.id">
|
||||||
<span>
|
<span>
|
||||||
<a class="h-24 box group" :href="item.hrefLink">
|
<a class="h-24 box group" :href="item.hrefLink">
|
||||||
<div class="flex flex-col px-4 mx-2">
|
<div class="flex flex-col w-full">
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2 px-4">
|
||||||
<div class="pb-2 font-bold dark:text-white" x-text="item.name"></div>
|
<div class="pb-2 truncate box-title" x-text="item.name"></div>
|
||||||
|
<div class="flex-1"></div>
|
||||||
<template x-if="item.status.startsWith('running')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('exited')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('restarting')">
|
<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>
|
||||||
<template x-if="item.status.startsWith('degraded')">
|
<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>
|
</template>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
<div class="flex gap-1 pt-1 group-hover:dark:text-white group min-h-6">
|
||||||
<template x-for="tag in item.tags">
|
<template x-for="tag in item.tags">
|
||||||
<div class="tag"
|
<div class="tag" @click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
||||||
@click.prevent="gotoTag(tag.name)" x-text="tag.name"></div>
|
|
||||||
</template>
|
</template>
|
||||||
<div class="add-tag"
|
<div class="add-tag" @click.prevent="goto(item)">Add tag</div>
|
||||||
@click.prevent="goto(item)">Add tag</div>
|
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -75,7 +75,8 @@
|
|||||||
<x-modal-input title="Edit Domains">
|
<x-modal-input title="Edit Domains">
|
||||||
<x-slot:content>
|
<x-slot:content>
|
||||||
<span class="cursor-pointer">
|
<span class="cursor-pointer">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 dark:text-warning text-coollabs"
|
<svg xmlns="http://www.w3.org/2000/svg"
|
||||||
|
class="w-4 h-4 dark:text-warning text-coollabs"
|
||||||
viewBox="0 0 24 24">
|
viewBox="0 0 24 24">
|
||||||
<g fill="none" stroke="currentColor"
|
<g fill="none" stroke="currentColor"
|
||||||
stroke-linecap="round" stroke-linejoin="round"
|
stroke-linecap="round" stroke-linejoin="round"
|
||||||
@@ -89,7 +90,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</x-slot:content>
|
</x-slot:content>
|
||||||
<livewire:project.service.edit-domain
|
<livewire:project.service.edit-domain
|
||||||
applicationId="{{ $application->id }}" wire:key="edit-domain-{{ $application->id }}" />
|
applicationId="{{ $application->id }}"
|
||||||
|
wire:key="edit-domain-{{ $application->id }}" />
|
||||||
</x-modal-input>
|
</x-modal-input>
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
@@ -160,29 +162,29 @@
|
|||||||
<span class="dark:text-warning">Please modify storage layout in your Docker Compose file.</span>
|
<span class="dark:text-warning">Please modify storage layout in your Docker Compose file.</span>
|
||||||
@foreach ($applications as $application)
|
@foreach ($applications as $application)
|
||||||
<livewire:project.service.storage wire:key="application-{{ $application->id }}"
|
<livewire:project.service.storage wire:key="application-{{ $application->id }}"
|
||||||
:resource="$application" lazy />
|
:resource="$application" />
|
||||||
@endforeach
|
@endforeach
|
||||||
@foreach ($databases as $database)
|
@foreach ($databases as $database)
|
||||||
<livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database" lazy />
|
<livewire:project.service.storage wire:key="database-{{ $database->id }}" :resource="$database" />
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'webhooks'">
|
<div x-cloak x-show="activeTab === 'webhooks'">
|
||||||
<livewire:project.shared.webhooks :resource="$service" lazy />
|
<livewire:project.shared.webhooks :resource="$service" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'logs'">
|
<div x-cloak x-show="activeTab === 'logs'">
|
||||||
<livewire:project.shared.logs :resource="$service" />
|
<livewire:project.shared.logs :resource="$service" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'execute-command'">
|
<div x-cloak x-show="activeTab === 'execute-command'">
|
||||||
<livewire:project.shared.execute-container-command :resource="$service" />
|
<livewire:project.shared.execute-container-command :resource="$service" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'environment-variables'">
|
<div x-cloak x-show="activeTab === 'environment-variables'">
|
||||||
<livewire:project.shared.environment-variable.all :resource="$service" lazy />
|
<livewire:project.shared.environment-variable.all :resource="$service" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'resource-operations'">
|
<div x-cloak x-show="activeTab === 'resource-operations'">
|
||||||
<livewire:project.shared.resource-operations :resource="$service" lazy />
|
<livewire:project.shared.resource-operations :resource="$service" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'tags'">
|
<div x-cloak x-show="activeTab === 'tags'">
|
||||||
<livewire:project.shared.tags :resource="$service" lazy />
|
<livewire:project.shared.tags :resource="$service" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'danger'">
|
<div x-cloak x-show="activeTab === 'danger'">
|
||||||
<livewire:project.shared.danger :resource="$service" />
|
<livewire:project.shared.danger :resource="$service" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<form wire:submit.prevent='submit' class="flex flex-col w-full gap-2">
|
<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>
|
<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"
|
<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>
|
<x-forms.button type="submit">Save</x-forms.button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -25,10 +25,10 @@
|
|||||||
@if ($application->required_fqdn)
|
@if ($application->required_fqdn)
|
||||||
<x-forms.input required placeholder="https://app.coolify.io" label="Domains"
|
<x-forms.input required placeholder="https://app.coolify.io" label="Domains"
|
||||||
id="application.fqdn"
|
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
|
@else
|
||||||
<x-forms.input placeholder="https://app.coolify.io" label="Domains" id="application.fqdn"
|
<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
|
||||||
@endif
|
@endif
|
||||||
<x-forms.input required
|
<x-forms.input required
|
||||||
|
|||||||
@@ -23,10 +23,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-2 gap-2">
|
<div class="grid grid-cols-2 gap-2">
|
||||||
@foreach ($fields as $serviceName => $field)
|
@foreach ($fields as $serviceName => $field)
|
||||||
|
<div class="flex items-center gap-2"><span
|
||||||
|
class="font-bold">{{ data_get($field, 'serviceName') }}</span>{{ data_get($field, 'name') }}<x-helper
|
||||||
|
helper="Variable name: {{ $serviceName }}" /></div>
|
||||||
<x-forms.input type="{{ data_get($field, 'isPassword') ? 'password' : 'text' }}"
|
<x-forms.input type="{{ data_get($field, 'isPassword') ? 'password' : 'text' }}"
|
||||||
required="{{ str(data_get($field, 'rules'))?->contains('required') }}"
|
required="{{ str(data_get($field, 'rules'))?->contains('required') }}"
|
||||||
helper="Variable name: {{ $serviceName }}"
|
|
||||||
label="{{ data_get($field, 'serviceName') }} {{ data_get($field, 'name') }}"
|
|
||||||
id="fields.{{ $serviceName }}.value"></x-forms.input>
|
id="fields.{{ $serviceName }}.value"></x-forms.input>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
The latest configuration has not been applied
|
The latest configuration has not been applied
|
||||||
</x-slot:title>
|
</x-slot:title>
|
||||||
<x-slot:icon>
|
<x-slot:icon>
|
||||||
<svg class="hidden w-16 h-16 dark:text-warning lg:block" viewBox="0 0 256 256"
|
<svg class="hidden w-10 h-10 dark:text-warning lg:block" viewBox="0 0 256 256"
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<path fill="currentColor"
|
<path fill="currentColor"
|
||||||
d="M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16" />
|
d="M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71m-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73M116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0m28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<form wire:submit='submit'
|
<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">
|
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
|
<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"
|
class="hidden w-4 h-4 dark:text-warning lg:block" viewBox="0 0 256 256"
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
stroke-width="2" d="M12 5v14m4-4l-4 4m-4-4l4 4" />
|
stroke-width="2" d="M12 5v14m4-4l-4 4m-4-4l4 4" />
|
||||||
</svg></button>
|
</svg></button>
|
||||||
|
|
||||||
<button title="Fullscreen" x-show="!fullscreen" class="absolute top-6 right-4"
|
<button title="Fullscreen" x-show="!fullscreen" class="absolute top-5 right-1"
|
||||||
x-on:click="makeFullscreen"><svg class="icon" viewBox="0 0 24 24"
|
x-on:click="makeFullscreen"><svg class="icon" viewBox="0 0 24 24"
|
||||||
xmlns="http://www.w3.org/2000/svg">
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="none">
|
<g fill="none">
|
||||||
|
|||||||
@@ -5,27 +5,33 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pb-4">Define how your resource's health should be checked.</div>
|
<div class="pb-4">Define how your resource's health should be checked.</div>
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
|
@if ($resource->custom_healthcheck_found)
|
||||||
|
<div class="text-warning">A custom health check has been found and will be used until you enable this.</div>
|
||||||
|
@endif
|
||||||
<div class="w-32">
|
<div class="w-32">
|
||||||
<x-forms.checkbox instantSave id="resource.health_check_enabled" label="Enabled" />
|
<x-forms.checkbox instantSave id="resource.health_check_enabled" label="Enabled" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input id="resource.health_check_method" placeholder="GET" label="Method" required />
|
<x-forms.input id="resource.health_check_method" placeholder="GET" label="Method" required />
|
||||||
|
|
||||||
<x-forms.input id="resource.health_check_scheme" placeholder="http" label="Scheme" required />
|
<x-forms.input id="resource.health_check_scheme" placeholder="http" label="Scheme" required />
|
||||||
<x-forms.input id="resource.health_check_host" placeholder="localhost" label="Host" required />
|
<x-forms.input id="resource.health_check_host" placeholder="localhost" label="Host" required />
|
||||||
<x-forms.input id="resource.health_check_port"
|
<x-forms.input type="number" id="resource.health_check_port"
|
||||||
helper="If no port is defined, the first exposed port will be used." placeholder="80" label="Port" />
|
helper="If no port is defined, the first exposed port will be used." placeholder="80" label="Port" />
|
||||||
<x-forms.input id="resource.health_check_path" placeholder="/health" label="Path" required />
|
<x-forms.input id="resource.health_check_path" placeholder="/health" label="Path" required />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input id="resource.health_check_return_code" placeholder="200" label="Return Code" required />
|
<x-forms.input type="number" id="resource.health_check_return_code" placeholder="200" label="Return Code"
|
||||||
|
required />
|
||||||
<x-forms.input id="resource.health_check_response_text" placeholder="OK" label="Response Text" />
|
<x-forms.input id="resource.health_check_response_text" placeholder="OK" label="Response Text" />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<x-forms.input id="resource.health_check_interval" placeholder="30" label="Interval" required />
|
<x-forms.input min=1 type="number" id="resource.health_check_interval" placeholder="30" label="Interval"
|
||||||
<x-forms.input id="resource.health_check_timeout" placeholder="30" label="Timeout" required />
|
required />
|
||||||
<x-forms.input id="resource.health_check_retries" placeholder="3" label="Retries" required />
|
<x-forms.input type="number" id="resource.health_check_timeout" placeholder="30" label="Timeout"
|
||||||
<x-forms.input id="resource.health_check_start_period" placeholder="30" label="Start Period" required />
|
required />
|
||||||
|
<x-forms.input type="number" id="resource.health_check_retries" placeholder="3" label="Retries" required />
|
||||||
|
<x-forms.input min=1 type="number" id="resource.health_check_start_period" placeholder="30"
|
||||||
|
label="Start Period" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -2,11 +2,13 @@
|
|||||||
<form wire:submit='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
<form wire:submit='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||||
@if ($isReadOnly)
|
@if ($isReadOnly)
|
||||||
@if ($isFirst)
|
@if ($isFirst)
|
||||||
<x-forms.input id="storage.name" label="Volume Name" required readonly />
|
<x-forms.input id="storage.name" label="Volume Name" required
|
||||||
<x-forms.input id="storage.host_path" label="Source Path (on host)" 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" label="Source Path (on host)" helper="Warning: Changing the source path after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||||
<x-forms.input id="storage.mount_path" label="Destination Path (in container)" required readonly />
|
<x-forms.input id="storage.mount_path" label="Destination Path (in container)" required readonly />
|
||||||
@else
|
@else
|
||||||
<x-forms.input id="storage.name" required readonly />
|
<x-forms.input id="storage.name" required readonly
|
||||||
|
helper="Warning: Changing the volume name after the initial start could cause problems. Only use it when you know what are you doing." />
|
||||||
<x-forms.input id="storage.host_path" readonly />
|
<x-forms.input id="storage.host_path" readonly />
|
||||||
<x-forms.input id="storage.mount_path" required readonly />
|
<x-forms.input id="storage.mount_path" required readonly />
|
||||||
@endif
|
@endif
|
||||||
@@ -25,7 +27,8 @@
|
|||||||
Update
|
Update
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
<x-modal-confirmation isErrorButton buttonTitle="Delete">
|
<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
|
is
|
||||||
not
|
not
|
||||||
reversible. <br>Please think again.
|
reversible. <br>Please think again.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<h2>Tags</h2>
|
<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'))
|
@if (data_get($this->resource, 'tags'))
|
||||||
@forelse (data_get($this->resource,'tags') as $tagId => $tag)
|
@forelse (data_get($this->resource,'tags') as $tagId => $tag)
|
||||||
<div
|
<div
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
@if (count($tags) > 0)
|
@if (count($tags) > 0)
|
||||||
<h3 class="pt-4">Exisiting Tags</h3>
|
<h3 class="pt-4">Exisiting Tags</h3>
|
||||||
<div>Click to add quickly</div>
|
<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)
|
@foreach ($tags as $tag)
|
||||||
<x-forms.button wire:click="addTag('{{ $tag->id }}','{{ $tag->name }}')">
|
<x-forms.button wire:click="addTag('{{ $tag->id }}','{{ $tag->name }}')">
|
||||||
{{ $tag->name }}</x-forms.button>
|
{{ $tag->name }}</x-forms.button>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user