source install: support dockerfileName and build options

This commit is contained in:
Girish Ramakrishnan
2026-03-21 17:29:47 +01:00
parent f2949c1836
commit 4859059eba
5 changed files with 54 additions and 18 deletions

View File

@@ -1921,9 +1921,14 @@ async function install(data, auditSource) {
if (data.sourceArchiveFilePath) await fileUtils.renameFile(data.sourceArchiveFilePath, `${paths.SOURCE_ARCHIVES_DIR}/${appId}.tar.gz`);
const buildConfig = {
buildArgs: data.buildArgs || [],
dockerfileName: data.dockerfileName || null
};
const task = {
args: { restoreConfig: null, skipDnsSetup, overwriteDns },
values: { },
args: { restoreConfig: null, skipDnsSetup, overwriteDns, buildConfig },
values: {},
requiredState: app.installationState
};
@@ -2340,6 +2345,7 @@ async function updateApp(app, data, auditSource) {
const updateConfig = { skipBackup, manifest }; // this will clear appStoreId/versionsUrl when updating from a repo and set it if passed in for update route
if ('appStoreId' in data) updateConfig.appStoreId = data.appStoreId;
if ('versionsUrl' in data) updateConfig.versionsUrl = data.versionsUrl;
updateConfig.buildConfig = { buildArgs: data.buildArgs || [], dockerfileName: data.dockerfileName || null };
// prevent user from installing a app with different manifest id over an existing app
// this allows cloudron install -f --app <appid> for an app installed from the appStore