mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 06:16:04 +00:00
Merge remote-tracking branch 'origin/next' into audit-policies
This commit is contained in:
commit
c175d3d282
259 files changed
+12779
-3172
No files matched your search
@@ -38,7 +38,7 @@ class Index extends Component
|
||||
#[Validate('required|string|timezone')]
|
||||
public string $instance_timezone;
|
||||
|
||||
#[Validate('nullable|string|max:50')]
|
||||
#[Validate(['nullable', 'string', 'max:128', 'regex:/^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$/'])]
|
||||
public ?string $dev_helper_version = null;
|
||||
|
||||
public array $domainConflicts = [];
|
||||
@@ -52,6 +52,7 @@ class Index extends Component
|
||||
protected array $messages = [
|
||||
'fqdn.url' => 'Invalid instance URL.',
|
||||
'fqdn.max' => 'URL must not exceed 255 characters.',
|
||||
'dev_helper_version.regex' => 'Dev helper version must match Docker tag format (alphanumeric, _, ., -; first char cannot be . or -).',
|
||||
];
|
||||
|
||||
public function render()
|
||||
@@ -191,6 +192,8 @@ class Index extends Component
|
||||
return;
|
||||
}
|
||||
|
||||
$this->validateOnly('dev_helper_version');
|
||||
|
||||
$version = $this->dev_helper_version ?: config('constants.coolify.helper_version');
|
||||
if (empty($version)) {
|
||||
$this->dispatch('error', 'Please specify a version to build.');
|
||||
@@ -198,7 +201,14 @@ class Index extends Component
|
||||
return;
|
||||
}
|
||||
|
||||
$buildCommand = "docker build -t ghcr.io/coollabsio/coolify-helper:{$version} -f docker/coolify-helper/Dockerfile .";
|
||||
if (! preg_match('/^[A-Za-z0-9_][A-Za-z0-9_.-]{0,127}$/', (string) $version)) {
|
||||
$this->dispatch('error', 'Invalid helper version format.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$imageRef = escapeshellarg("ghcr.io/coollabsio/coolify-helper:{$version}");
|
||||
$buildCommand = "docker build -t {$imageRef} -f docker/coolify-helper/Dockerfile .";
|
||||
|
||||
$activity = remote_process(
|
||||
command: [$buildCommand],
|
||||
|
||||
Reference in new issue
Block a user