From 4b38865cc9cfe3707719cab97c5dabda8c436692 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 3 May 2022 12:07:37 +0200 Subject: [PATCH] fix: Webhook build images --- package.json | 2 +- src/lib/database/applications.ts | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7c28949bd..ccc938119 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.6.1", + "version": "2.6.2", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev --host 0.0.0.0", diff --git a/src/lib/database/applications.ts b/src/lib/database/applications.ts index d64537b69..caceef396 100644 --- a/src/lib/database/applications.ts +++ b/src/lib/database/applications.ts @@ -138,7 +138,18 @@ export async function getApplicationWebhook({ return s; }); } - return { ...application }; + const { baseImage, baseBuildImage, baseBuildImages, baseImages } = setDefaultBaseImage( + application.buildPack + ); + + // Set default build images + if (!application.baseImage) { + application.baseImage = baseImage; + } + if (!application.baseBuildImage) { + application.baseBuildImage = baseBuildImage; + } + return { ...application, baseBuildImages, baseImages }; } catch (e) { throw { status: 404, body: { message: e.message } }; }