mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-29 12:33:59 +00:00
Merge github.com:coollabsio/coolify into exposePort
This commit is contained in:
@@ -12,6 +12,7 @@ import type {
|
||||
Application,
|
||||
ApplicationPersistentStorage
|
||||
} from '@prisma/client';
|
||||
import { setDefaultBaseImage } from '$lib/buildPacks/common';
|
||||
|
||||
export async function listApplications(teamId: string): Promise<Application[]> {
|
||||
if (teamId === '0') {
|
||||
@@ -195,8 +196,18 @@ export async function getApplication({ id, teamId }: { id: string; teamId: strin
|
||||
return s;
|
||||
});
|
||||
}
|
||||
const { baseImage, baseBuildImage, baseBuildImages, baseImages } = setDefaultBaseImage(
|
||||
body.buildPack
|
||||
);
|
||||
|
||||
return { ...body };
|
||||
// Set default build images
|
||||
if (!body.baseImage) {
|
||||
body.baseImage = baseImage;
|
||||
}
|
||||
if (!body.baseBuildImage) {
|
||||
body.baseBuildImage = baseBuildImage;
|
||||
}
|
||||
return { ...body, baseBuildImages, baseImages };
|
||||
}
|
||||
|
||||
export async function configureGitRepository({
|
||||
@@ -267,7 +278,9 @@ export async function configureApplication({
|
||||
pythonVariable,
|
||||
dockerFileLocation,
|
||||
denoMainFile,
|
||||
denoOptions
|
||||
denoOptions,
|
||||
baseImage,
|
||||
baseBuildImage
|
||||
}: {
|
||||
id: string;
|
||||
buildPack: string;
|
||||
@@ -286,6 +299,8 @@ export async function configureApplication({
|
||||
dockerFileLocation: string;
|
||||
denoMainFile: string;
|
||||
denoOptions: string;
|
||||
baseImage: string;
|
||||
baseBuildImage: string;
|
||||
}): Promise<Application> {
|
||||
return await prisma.application.update({
|
||||
where: { id },
|
||||
@@ -305,7 +320,9 @@ export async function configureApplication({
|
||||
pythonVariable,
|
||||
dockerFileLocation,
|
||||
denoMainFile,
|
||||
denoOptions
|
||||
denoOptions,
|
||||
baseImage,
|
||||
baseBuildImage
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user