source install: support dockerfileName and build options
This commit is contained in:
10
src/apps.js
10
src/apps.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user