feat(build-packs): mark Nixpacks as deprecated and recommend Railpack

This commit is contained in:
Andras Bacsai
2026-10-11 18:39:45 +02:00
parent ebfa747e77
commit 90c2e58e52
8 changed files with 118 additions and 5 deletions
+1
View File
@@ -2,4 +2,5 @@
return [
'swarm' => 'Docker Swarm is deprecated and will be removed in Coolify v5. Coolify v5 will be replacing Swarm with native Docker Compose replicas and our own scaling solution. Existing Swarm deployments will continue to work on v4 as-is. We do not recommend setting up new Swarm deployments for the time being.',
'nixpacks' => 'Nixpacks is deprecated and is in maintenance mode upstream. We recommend Railpack, the successor of Nixpacks, for new and existing applications.',
];
@@ -0,0 +1,3 @@
<x-callout type="warning" title="Nixpacks is deprecated" {{ $attributes }}>
{{ config('deprecations.nixpacks') }}
</x-callout>
@@ -109,7 +109,7 @@
<div class="grid gap-4 sm:grid-cols-2">
<x-forms.listbox id="buildPack" label="Build strategy" live :options="[
['value' => 'railpack', 'label' => 'Railpack'],
['value' => 'nixpacks', 'label' => 'Nixpacks'],
['value' => 'nixpacks', 'label' => 'Nixpacks (deprecated)'],
['value' => 'static', 'label' => 'Static'],
['value' => 'dockerfile', 'label' => 'Dockerfile'],
['value' => 'dockercompose', 'label' => 'Compose'],
@@ -121,6 +121,9 @@
]" x-bind:disabled="!canUpdate" />
@endif
</div>
@if ($buildPack === 'nixpacks')
<x-nixpacks-deprecated-callout class="mt-4" />
@endif
</div>
@endif
@if ($application->could_set_build_commands() || ($isStatic && $buildPack !== 'static'))
@@ -57,7 +57,7 @@
<x-forms.input id="branch" required label="Branch" />
<x-forms.listbox id="build_pack" label="Build pack" required live :options="[
['value' => 'railpack', 'label' => 'Railpack'],
['value' => 'nixpacks', 'label' => 'Nixpacks'],
['value' => 'nixpacks', 'label' => 'Nixpacks (deprecated)'],
['value' => 'static', 'label' => 'Static'],
['value' => 'dockerfile', 'label' => 'Dockerfile'],
['value' => 'dockercompose', 'label' => 'Docker Compose'],
@@ -76,6 +76,10 @@
@endif
</div>
@if ($build_pack === 'nixpacks')
<x-nixpacks-deprecated-callout />
@endif
@if ($build_pack === 'dockercompose')
<div x-data="{
baseDir: @js($base_directory),
@@ -113,7 +113,7 @@
])->values()->all()" />
<x-forms.listbox id="build_pack" label="Build pack" required live :options="[
['value' => 'railpack', 'label' => 'Railpack'],
['value' => 'nixpacks', 'label' => 'Nixpacks'],
['value' => 'nixpacks', 'label' => 'Nixpacks (deprecated)'],
['value' => 'static', 'label' => 'Static'],
['value' => 'dockerfile', 'label' => 'Dockerfile'],
['value' => 'dockercompose', 'label' => 'Docker Compose'],
@@ -134,6 +134,10 @@
@endif
</div>
@if ($build_pack === 'nixpacks')
<x-nixpacks-deprecated-callout />
@endif
@if ($build_pack === 'dockercompose')
<div x-data="{
baseDir: @js($base_directory),
@@ -109,7 +109,7 @@
])->values()->all()" />
<x-forms.listbox id="build_pack" label="Build pack" required live :options="[
['value' => 'railpack', 'label' => 'Railpack'],
['value' => 'nixpacks', 'label' => 'Nixpacks'],
['value' => 'nixpacks', 'label' => 'Nixpacks (deprecated)'],
['value' => 'static', 'label' => 'Static'],
['value' => 'dockerfile', 'label' => 'Dockerfile'],
['value' => 'dockercompose', 'label' => 'Docker Compose'],
@@ -130,6 +130,10 @@
@endif
</div>
@if ($build_pack === 'nixpacks')
<x-nixpacks-deprecated-callout />
@endif
@if ($build_pack === 'dockercompose')
<div x-data="{
baseDir: @js($base_directory),
@@ -62,7 +62,7 @@
helper="You can choose another branch after the application is created." />
<x-forms.listbox id="build_pack" label="Build pack" required live :options="[
['value' => 'railpack', 'label' => 'Railpack'],
['value' => 'nixpacks', 'label' => 'Nixpacks'],
['value' => 'nixpacks', 'label' => 'Nixpacks (deprecated)'],
['value' => 'static', 'label' => 'Static'],
['value' => 'dockerfile', 'label' => 'Dockerfile'],
['value' => 'dockercompose', 'label' => 'Docker Compose'],
@@ -83,6 +83,10 @@
@endif
</div>
@if ($build_pack === 'nixpacks')
<x-nixpacks-deprecated-callout />
@endif
@if ($build_pack === 'dockercompose')
<div x-data="{
baseDir: @js($base_directory),
+90
View File
@@ -0,0 +1,90 @@
<?php
use App\Livewire\Project\Application\General;
use App\Models\Application;
use App\Models\Environment;
use App\Models\InstanceSettings;
use App\Models\PrivateKey;
use App\Models\Project;
use App\Models\Server;
use App\Models\StandaloneDocker;
use App\Models\Team;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Livewire\Livewire;
uses(RefreshDatabase::class);
beforeEach(function () {
$this->team = Team::factory()->create();
$this->user = User::factory()->create();
$this->team->members()->attach($this->user->id, ['role' => 'owner']);
$this->actingAs($this->user);
session(['currentTeam' => $this->team]);
InstanceSettings::unguarded(function () {
InstanceSettings::updateOrCreate(['id' => 0], []);
});
$this->project = Project::factory()->create(['team_id' => $this->team->id]);
$this->environment = Environment::factory()->create(['project_id' => $this->project->id]);
$this->privateKey = PrivateKey::create([
'name' => 'Test Key',
'private_key' => '-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACBbhpqHhqv6aI67Mj9abM3DVbmcfYhZAhC7ca4d9UCevAAAAJi/QySHv0Mk
hwAAAAtzc2gtZWQyNTUxOQAAACBbhpqHhqv6aI67Mj9abM3DVbmcfYhZAhC7ca4d9UCevA
AAAECBQw4jg1WRT2IGHMncCiZhURCts2s24HoDS0thHnnRKVuGmoeGq/pojrsyP1pszcNV
uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
-----END OPENSSH PRIVATE KEY-----',
'team_id' => $this->team->id,
]);
$this->server = Server::factory()->create([
'team_id' => $this->team->id,
'private_key_id' => $this->privateKey->id,
]);
$this->destination = StandaloneDocker::where('server_id', $this->server->id)->first()
?? StandaloneDocker::factory()->create(['server_id' => $this->server->id, 'network' => 'coolify-test']);
});
test('the application page shows the nixpacks deprecation notice only for nixpacks', function (string $buildPack, bool $showsNotice) {
$application = Application::factory()->create([
'environment_id' => $this->environment->id,
'destination_id' => $this->destination->id,
'destination_type' => StandaloneDocker::class,
'build_pack' => $buildPack,
'static_image' => 'nginx:alpine',
'base_directory' => '/',
'ports_exposes' => '3000',
'is_http_basic_auth_enabled' => false,
'redirect' => 'no',
]);
$component = Livewire::test(General::class, ['application' => $application])->assertSuccessful();
$showsNotice
? $component->assertSee(config('deprecations.nixpacks'))
: $component->assertDontSee(config('deprecations.nixpacks'));
})->with([
'nixpacks' => ['nixpacks', true],
'railpack' => ['railpack', false],
]);
test('switching the build pack to railpack hides the nixpacks deprecation notice', function () {
$application = Application::factory()->create([
'environment_id' => $this->environment->id,
'destination_id' => $this->destination->id,
'destination_type' => StandaloneDocker::class,
'build_pack' => 'nixpacks',
'static_image' => 'nginx:alpine',
'base_directory' => '/',
'ports_exposes' => '3000',
'is_http_basic_auth_enabled' => false,
'redirect' => 'no',
]);
Livewire::test(General::class, ['application' => $application])
->assertSee(config('deprecations.nixpacks'))
->set('buildPack', 'railpack')
->assertDontSee(config('deprecations.nixpacks'));
});