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
<?php
it('adds the Coolify network when the user did not select a Traefik network', function () {
$labels = addTraefikDockerNetworkLabel(collect([
'traefik.enable=true',
]), 'app-uuid');
expect($labels->values()->all())->toContain('traefik.docker.network=app-uuid');
});
it('preserves a user-selected Traefik network', function () {
$labels = addTraefikDockerNetworkLabel(collect([
'traefik.enable=true',
'traefik.docker.network=custom-network',
]), 'app-uuid');
expect($labels->values()->all())
->toContain('traefik.docker.network=custom-network')
->not->toContain('traefik.docker.network=app-uuid');
});
it('treats a bare user-provided Traefik network label as authoritative', function () {
$labels = addTraefikDockerNetworkLabel(collect([
'traefik.docker.network',
]), 'app-uuid');
expect($labels->values()->all())
->toContain('traefik.docker.network')
->not->toContain('traefik.docker.network=app-uuid');
});