Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat(services): add architecture warning

Cinzyadfd0edff6439
diff --git a/app/Console/Commands/Generate/Services.php b/app/Console/Commands/Generate/Services.php
index 42f9360bb9..e316fc3911 100644
--- a/app/Console/Commands/Generate/Services.php
+++ b/app/Console/Commands/Generate/Services.php
@@ -88,6 +88,14 @@ class Services extends Command
$payload['envs'] = base64_encode($envFileContent);
}
+ if (str($data->get('amd_only'))->toBoolean()) {
+ $payload['amd_only'] = true;
+ }
+
+ if (str($data->get('arm_only'))->toBoolean()) {
+ $payload['arm_only'] = true;
+ }
+
return $payload;
}
@@ -160,6 +168,14 @@ class Services extends Command
$payload['envs'] = base64_encode($modifiedEnvContent);
}
+ if (str($data->get('amd_only'))->toBoolean()) {
+ $payload['amd_only'] = true;
+ }
+
+ if (str($data->get('arm_only'))->toBoolean()) {
+ $payload['arm_only'] = true;
+ }
+
return $payload;
}
@@ -229,6 +245,14 @@ class Services extends Command
$payload['envs'] = $modifiedEnvContent;
}
+ if (str($data->get('amd_only'))->toBoolean()) {
+ $payload['amd_only'] = true;
+ }
+
+ if (str($data->get('arm_only'))->toBoolean()) {
+ $payload['arm_only'] = true;
+ }
+
return $payload;
}
}
diff --git a/app/Livewire/GlobalSearch.php b/app/Livewire/GlobalSearch.php
index ed9115093a..56804d8233 100644
--- a/app/Livewire/GlobalSearch.php
+++ b/app/Livewire/GlobalSearch.php
@@ -1495,7 +1495,10 @@ class GlobalSearch extends Component
'type' => 'one-click-service-'.$serviceKey,
'category' => 'Services',
'resourceType' => 'service',
- ]);
+ ] + array_filter([
+ 'amd_only' => data_get($service, 'amd_only') ? true : null,
+ 'arm_only' => data_get($service, 'arm_only') ? true : null,
+ ]));
}
$cachedServices = $items->toArray();
diff --git a/resources/views/livewire/global-search.blade.php b/resources/views/livewire/global-search.blade.php
index 27b8d28212..8a5b19e922 100644
--- a/resources/views/livewire/global-search.blade.php
+++ b/resources/views/livewire/global-search.blade.php
@@ -822,6 +822,20 @@
<div class="font-medium text-neutral-900 dark:text-white truncate"
x-text="item.name">
</div>
+ <template x-if="item.amd_only">
+ <span
+ class="px-2 py-0.5 text-xs rounded-full bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200 shrink-0"
+ title="This service only supports AMD64/x86_64 architecture">
+ AMD only
+ </span>
+ </template>
+ <template x-if="item.arm_only">
+ <span
+ class="px-2 py-0.5 text-xs rounded-full bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200 shrink-0"
+ title="This service only supports ARM64/aarch64 architecture">
+ ARM only
+ </span>
+ </template>
<span
class="text-xs text-neutral-500 dark:text-neutral-400 shrink-0"
x-text="item.quickcommand"
diff --git a/resources/views/livewire/project/new/select.blade.php b/resources/views/livewire/project/new/select.blade.php
index 8f97c22d8b..04c09ede1f 100644
--- a/resources/views/livewire/project/new/select.blade.php
+++ b/resources/views/livewire/project/new/select.blade.php
@@ -173,6 +173,34 @@
</template>
</x-slot:logo>
</x-resource-view>
+ <template x-if="service.amd_only">
+ <div class="absolute top-2 right-10 group">
+ <span
+ class="px-2 py-0.5 text-xs rounded bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200 cursor-pointer">
+ AMD only
+ </span>
+ <div class="info-helper-popup right-0 w-sm">
+ <div class="p-4">
+ This service only supports AMD64/x86_64 architecture. It will not work
+ on ARM-based servers (e.g., Apple Silicon, Raspberry Pi, AWS Graviton).
+ </div>
+ </div>
+ </div>
+ </template>
+ <template x-if="service.arm_only">
+ <div class="absolute top-2 right-10 group">
+ <span
+ class="px-2 py-0.5 text-xs rounded-full bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200 cursor-pointer">
+ ARM only
+ </span>
+ <div class="info-helper-popup right-0 w-sm">
+ <div class="p-4">
+ This service only supports ARM64/aarch64 architecture. It will not work
+ on AMD64/x86_64-based servers.
+ </div>
+ </div>
+ </div>
+ </template>
<template x-if="shouldShowDocIcon(service)">
<a :href="getDocLink(service) || coolifyDocsUrl(service.name)" target="_blank"
@click.stop @mouseenter="resolveDocLink(service)"