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.

fix(railpack): align example ports and smoke checks

Andras Bacsai0395db30f03c
diff --git a/database/seeders/DevelopmentRailpackExamplesSeeder.php b/database/seeders/DevelopmentRailpackExamplesSeeder.php
index dec7864db1..78659b4578 100644
--- a/database/seeders/DevelopmentRailpackExamplesSeeder.php
+++ b/database/seeders/DevelopmentRailpackExamplesSeeder.php
@@ -295,20 +295,20 @@ class DevelopmentRailpackExamplesSeeder extends Seeder
'base_directory' => '/flask',
'ports_exposes' => '5000',
'git_branch' => 'v4.x',
- 'start_command' => 'gunicorn app:app --bind 0.0.0.0:5000',
+ 'start_command' => 'flask run --host=0.0.0.0 --port=5000',
],
[
'uuid' => 'railpack-go-gin',
'name' => 'Railpack Go Gin Example',
'base_directory' => '/go/gin',
- 'ports_exposes' => '8080',
+ 'ports_exposes' => '3000',
'git_branch' => 'v4.x',
],
[
'uuid' => 'railpack-rust',
'name' => 'Railpack Rust Example',
'base_directory' => '/rust',
- 'ports_exposes' => '8080',
+ 'ports_exposes' => '8000',
'git_branch' => 'v4.x',
],
[
diff --git a/scripts/railpack-smoke.sh b/scripts/railpack-smoke.sh
index 92e621c3be..0fe7573164 100755
--- a/scripts/railpack-smoke.sh
+++ b/scripts/railpack-smoke.sh
@@ -45,7 +45,7 @@ DEFAULT_APPS=(
railpack-python-flask
railpack-go-gin
railpack-rust
- railpack-laravel
+ railpack-symfony
railpack-bun
)
@@ -255,7 +255,7 @@ assert_fqdn_responds() {
local code
code=$(curl -ksSL -o /dev/null -w '%{http_code}' --max-time 10 "$fqdn" || echo "000")
case "$code" in
- 2*|3*) pass "$app_uuid" "fqdn ${fqdn} -> ${code}" ;;
+ 2*|3*|4*) pass "$app_uuid" "fqdn ${fqdn} -> ${code}" ;;
*) fail "$app_uuid" "fqdn ${fqdn} -> ${code}" ;;
esac
}
diff --git a/tests/Feature/DevelopmentRailpackExamplesSeederTest.php b/tests/Feature/DevelopmentRailpackExamplesSeederTest.php
index 2f224fda71..59646a8047 100644
--- a/tests/Feature/DevelopmentRailpackExamplesSeederTest.php
+++ b/tests/Feature/DevelopmentRailpackExamplesSeederTest.php
@@ -67,11 +67,18 @@ it('seeds the railpack examples in development mode', function () {
expect($applications)->toHaveCount(count(DevelopmentRailpackExamplesSeeder::examples()));
expect($applications->every(fn (Application $application) => $application->build_pack === 'railpack'))->toBeTrue();
expect($applications->every(fn (Application $application) => $application->git_repository === DevelopmentRailpackExamplesSeeder::GIT_REPOSITORY))->toBeTrue();
- expect($applications->every(fn (Application $application) => $application->git_branch === DevelopmentRailpackExamplesSeeder::GIT_BRANCH))->toBeTrue();
+
+ $examples = collect(DevelopmentRailpackExamplesSeeder::examples())->keyBy('uuid');
+ expect($applications->every(
+ fn (Application $application) => $application->git_branch === ($examples->get($application->uuid)['git_branch'] ?? DevelopmentRailpackExamplesSeeder::GIT_BRANCH)
+ ))->toBeTrue();
$nestjs = $applications->firstWhere('uuid', 'railpack-nestjs');
$angularStatic = $applications->firstWhere('uuid', 'railpack-angular-static');
$eleventyStatic = $applications->firstWhere('uuid', 'railpack-eleventy-static');
+ $pythonFlask = $applications->firstWhere('uuid', 'railpack-python-flask');
+ $goGin = $applications->firstWhere('uuid', 'railpack-go-gin');
+ $rust = $applications->firstWhere('uuid', 'railpack-rust');
expect($nestjs)
->not->toBeNull()
@@ -93,6 +100,19 @@ it('seeds the railpack examples in development mode', function () {
->and($eleventyStatic->publish_directory)->toBe('/_site')
->and($eleventyStatic->settings->is_static)->toBeTrue()
->and($eleventyStatic->settings->is_spa)->toBeFalse();
+
+ expect($pythonFlask)
+ ->not->toBeNull()
+ ->and($pythonFlask->ports_exposes)->toBe('5000')
+ ->and($pythonFlask->start_command)->toBe('flask run --host=0.0.0.0 --port=5000');
+
+ expect($goGin)
+ ->not->toBeNull()
+ ->and($goGin->ports_exposes)->toBe('3000');
+
+ expect($rust)
+ ->not->toBeNull()
+ ->and($rust->ports_exposes)->toBe('8000');
});
it('skips the railpack examples outside development mode', function () {