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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: select Traefik networks and stabilize dropdown positioning
Andras Bacsaiab5025f0a778
diff --git a/bootstrap/helpers/parsers.php b/bootstrap/helpers/parsers.phpindex 7dd1c163c0..b47e570477 100644--- a/bootstrap/helpers/parsers.php+++ b/bootstrap/helpers/parsers.php@@ -1359,6 +1359,9 @@ function applicationParser(Application $resource, int $pull_request_id = 0, ?int$redirectDirection = in_array($composeRedirect, ['www', 'non-www', 'both'], true)? $composeRedirect: 'both';+ if (! $use_network_mode && (! $shouldGenerateLabelsExactly || $server->proxyType() === ProxyTypes::TRAEFIK->value)) {+ $serviceLabels = addTraefikDockerNetworkLabel($serviceLabels, $baseNetwork->first());+ }if ($shouldGenerateLabelsExactly) {switch ($server->proxyType()) {case ProxyTypes::TRAEFIK->value:@@ -2633,6 +2636,9 @@ function serviceParser(Service $resource): Collection$redirectDirection = in_array(data_get($originalResource, 'redirect'), ['www', 'non-www', 'both'], true)? data_get($originalResource, 'redirect'): 'both';+ if (! $use_network_mode && (! $shouldGenerateLabelsExactly || $server->proxyType() === ProxyTypes::TRAEFIK->value)) {+ $serviceLabels = addTraefikDockerNetworkLabel($serviceLabels, $baseNetwork->first());+ }if ($shouldGenerateLabelsExactly) {switch ($server->proxyType()) {case ProxyTypes::TRAEFIK->value:diff --git a/resources/views/components/table/dropdown.blade.php b/resources/views/components/table/dropdown.blade.phpindex 6a0472191e..b290128f97 100644--- a/resources/views/components/table/dropdown.blade.php+++ b/resources/views/components/table/dropdown.blade.php@@ -6,13 +6,16 @@<div class="relative" x-data="{open: false,- panelStyle: 'display: none;',+ panelStyle: 'position: fixed; min-width: 0; visibility: hidden;',toggle() {- this.open = !this.open;-if (this.open) {- this.$nextTick(() => this.updatePosition());+ this.open = false;+ return;}++ this.panelStyle = 'position: fixed; min-width: 0; visibility: hidden;';+ this.open = true;+ this.$nextTick(() => this.updatePosition());},updatePosition() {const trigger = this.$refs.trigger.getBoundingClientRect();@@ -24,7 +27,7 @@? trigger.bottom + 4: Math.max(viewportPadding, trigger.top - panel.height - 4);- this.panelStyle = `position: fixed; left: ${left}px; top: ${top}px;`;+ this.panelStyle = `position: fixed; left: ${left}px; top: ${top}px; min-width: 0;`;}}" @click.outside="open = false" @keydown.escape.window="open = false"x-on:resize.window="if (open) updatePosition()" x-on:scroll.window="if (open) updatePosition()">diff --git a/tests/Feature/ApplicationParserDockerComposeDomainsTest.php b/tests/Feature/ApplicationParserDockerComposeDomainsTest.phpindex 1b3e61be07..ebcb51fe19 100644--- a/tests/Feature/ApplicationParserDockerComposeDomainsTest.php+++ b/tests/Feature/ApplicationParserDockerComposeDomainsTest.php@@ -399,7 +399,7 @@ YAML;expect(json_decode($plainApplication->docker_compose_domains, true))->toBeNull();});-test('applicationParser does not force the private resource network for Traefik routed compose services', function () {+test('applicationParser selects the resource network for Traefik routed compose services', function () {$application = Application::factory()->create(['environment_id' => $this->environment->id,'destination_id' => $this->destination->id,@@ -422,7 +422,7 @@ YAML,$parsedCompose = applicationParser($application);$labels = collect(data_get($parsedCompose, 'services.frontend.labels'));- expect($labels->values()->all())->not->toContain("traefik.docker.network={$application->uuid}");+ expect($labels->values()->all())->toContain("traefik.docker.network={$application->uuid}");});test('applicationParser preserves a user-selected Traefik network', function () {diff --git a/tests/Feature/StandardTableComponentsTest.php b/tests/Feature/StandardTableComponentsTest.phpindex 28f07a9a2f..9741268bc7 100644--- a/tests/Feature/StandardTableComponentsTest.php+++ b/tests/Feature/StandardTableComponentsTest.php@@ -24,7 +24,10 @@ it('renders the standard table toolbar controls', function () {->toContain('wire:model.live="search"')->not->toContain('x-teleport="body"')->not->toContain('floatingDropdown(')+ ->toContain("panelStyle: 'position: fixed; min-width: 0; visibility: hidden;'")+ ->toContain("this.panelStyle = 'position: fixed; min-width: 0; visibility: hidden;'")->toContain('position: fixed')+ ->toContain('min-width: 0')->toContain('getBoundingClientRect()')->toContain('x-show="open"')->toContain('aria-multiselectable="true"')diff --git a/tests/Feature/TraefikServiceDockerNetworkLabelTest.php b/tests/Feature/TraefikServiceDockerNetworkLabelTest.phpindex f1d7087a29..c098a2e93a 100644--- a/tests/Feature/TraefikServiceDockerNetworkLabelTest.php+++ b/tests/Feature/TraefikServiceDockerNetworkLabelTest.php@@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Bus;uses(RefreshDatabase::class);-it('does not force the private service network for Traefik routed compose services', function () {+it('selects the private service network for Traefik routed compose services', function () {Bus::fake();$team = Team::factory()->create();@@ -45,5 +45,5 @@ YAML,$parsedCompose = serviceParser($service);$labels = collect(data_get($parsedCompose, 'services.app.labels'));- expect($labels->values()->all())->not->toContain("traefik.docker.network={$service->uuid}");+ expect($labels->values()->all())->toContain("traefik.docker.network={$service->uuid}");});