mirror of
https://github.com/caprover/caprover
synced 2026-09-27 17:15:38 +00:00
Saving app description
This commit is contained in:
@@ -542,6 +542,7 @@ class AppsDataStore {
|
||||
|
||||
updateAppDefinitionInDb(
|
||||
appName: string,
|
||||
description: string,
|
||||
instanceCount: number,
|
||||
captainDefinitionRelativeFilePath: string,
|
||||
envVars: IAppEnvVar[],
|
||||
@@ -626,6 +627,7 @@ class AppsDataStore {
|
||||
appObj.nodeId = nodeId
|
||||
appObj.customNginxConfig = customNginxConfig
|
||||
appObj.preDeployFunction = preDeployFunction
|
||||
appObj.description = description
|
||||
|
||||
if (httpAuth && httpAuth.user) {
|
||||
const newAuth: IHttpAuth = {
|
||||
@@ -778,6 +780,7 @@ class AppsDataStore {
|
||||
|
||||
const defaultAppDefinition: IAppDef = {
|
||||
hasPersistentData: !!hasPersistentData,
|
||||
description: '',
|
||||
instanceCount: 1,
|
||||
captainDefinitionRelativeFilePath:
|
||||
CaptainConstants.defaultCaptainDefinitionPath,
|
||||
|
||||
@@ -49,6 +49,7 @@ interface IAppCustomDomain {
|
||||
}
|
||||
|
||||
interface IAppDefinitionBase {
|
||||
description: string
|
||||
deployedVersion: number
|
||||
notExposeAsWebApp: boolean
|
||||
hasPersistentData: boolean
|
||||
|
||||
@@ -349,6 +349,7 @@ router.post('/update/', function(req, res, next) {
|
||||
let preDeployFunction = req.body.preDeployFunction || ''
|
||||
let containerHttpPort = Number(req.body.containerHttpPort) || 80
|
||||
let httpAuth = req.body.httpAuth
|
||||
let description = req.body.description || ''
|
||||
|
||||
if (repoInfo.user) {
|
||||
repoInfo.user = repoInfo.user.trim()
|
||||
@@ -365,6 +366,7 @@ router.post('/update/', function(req, res, next) {
|
||||
serviceManager
|
||||
.updateAppDefinition(
|
||||
appName,
|
||||
description,
|
||||
Number(instanceCount),
|
||||
captainDefinitionRelativeFilePath,
|
||||
envVars,
|
||||
|
||||
@@ -493,6 +493,7 @@ class ServiceManager {
|
||||
|
||||
updateAppDefinition(
|
||||
appName: string,
|
||||
description: string,
|
||||
instanceCount: number,
|
||||
captainDefinitionRelativeFilePath: string,
|
||||
envVars: IAppEnvVar[],
|
||||
@@ -590,6 +591,7 @@ class ServiceManager {
|
||||
.getAppsDataStore()
|
||||
.updateAppDefinitionInDb(
|
||||
appName,
|
||||
description,
|
||||
instanceCount,
|
||||
captainDefinitionRelativeFilePath,
|
||||
envVars,
|
||||
|
||||
@@ -321,6 +321,7 @@ export default class MigrateCaptainDuckDuck {
|
||||
.then(function() {
|
||||
return appStore.updateAppDefinitionInDb(
|
||||
appName,
|
||||
'',
|
||||
Number(app.instanceCount),
|
||||
CaptainConstants.defaultCaptainDefinitionPath,
|
||||
app.envVars || [],
|
||||
|
||||
Reference in New Issue
Block a user