Use Dockerfile builds for frontend release targets

This commit is contained in:
Jeppe Bundgaard
2026-05-20 18:53:41 +02:00
parent 16cfcaf41f
commit f7ff9f0a3b
4 changed files with 78 additions and 23 deletions
@@ -158,7 +158,7 @@ it('supports isolated stack mode and names new Coolify services explicitly', fun
expect(base64_decode($payload['docker_compose_raw'], true))->toContain('ghcr.io/copenhagentruckwash/front-end-vue:main');
});
it('creates Coolify GitHub App application payloads so pulls use the app token', function (): void {
it('creates frontend Coolify GitHub App application payloads with the release Dockerfile', function (): void {
$manager = new release_manager();
$payloadMethod = new ReflectionMethod(release_manager::class, 'releaseCoolifyApplicationPayload');
$payloadMethod->setAccessible(true);
@@ -189,14 +189,12 @@ it('creates Coolify GitHub App application payloads so pulls use the app token',
expect($payload['github_app_uuid'])->toBe('github-app-copenhagentruckwash-github');
expect($payload['git_repository'])->toBe('copenhagentruckwash/pleno-vue');
expect($payload['git_branch'])->toBe('release/canary');
expect($payload['build_pack'])->toBe('static');
expect($payload['build_pack'])->toBe('dockerfile');
expect($payload['ports_exposes'])->toBe('80');
expect($payload['install_command'])->toBe('npm ci');
expect($payload['build_command'])->toBe('npm run build');
expect($payload['publish_directory'])->toBe('dist');
expect($payload['is_static'])->toBeTrue();
expect($payload['is_spa'])->toBeTrue();
expect($payload['dockerfile_location'])->toBe('/Dockerfile.coolify-frontend');
expect($payload['domains'])->toBe('https://canary.example.test/canary/frontend');
expect($payload)->not->toHaveKey('publish_directory');
expect($payload)->not->toHaveKey('is_static');
expect($payload)->not->toHaveKey('docker_compose_raw');
});
@@ -275,13 +273,11 @@ it('updates existing frontend Coolify applications away from legacy Nixpacks det
expect($payload['git_repository'])->toBe('copenhagentruckwash/pleno-vue');
expect($payload['git_branch'])->toBe('master');
expect($payload['git_commit_sha'])->toBe('1132c8c2560e44478d1bb777c88c762a5e1d0b20');
expect($payload['build_pack'])->toBe('static');
expect($payload['build_pack'])->toBe('dockerfile');
expect($payload['ports_exposes'])->toBe('80');
expect($payload['install_command'])->toBe('npm ci');
expect($payload['build_command'])->toBe('npm run build');
expect($payload['publish_directory'])->toBe('dist');
expect($payload['is_static'])->toBeTrue();
expect($payload['is_spa'])->toBeTrue();
expect($payload['dockerfile_location'])->toBe('/Dockerfile.coolify-frontend');
expect($payload)->not->toHaveKey('publish_directory');
expect($payload)->not->toHaveKey('is_static');
});
it('can use the Coolify instance default GitHub App when source targets do not store it yet', function (): void {