Class: Container<T>
Webda Deployer
WebdaDeployer/Container
Extends
Deployer
<T
>
Type parameters
• T extends ContainerResources
Constructors
new Container(manager, resources)
new Container<
T
>(manager
,resources
):Container
<T
>
Parameters
• manager: DeploymentManager
• resources: T
= undefined
Returns
Container
<T
>
Inherited from
Source
packages/shell/src/deployers/deployer.ts:41
Properties
_copied
_copied:
boolean
=false
Source
packages/shell/src/deployers/container.ts:82
_defaulted
_defaulted:
boolean
=false
Inherited from
Source
packages/shell/src/deployers/deployer.ts:27
app
app:
SourceApplication
Current application being deployed
Inherited from
Source
packages/shell/src/deployers/deployer.ts:22
logger
logger:
Logger
Logger to use
Inherited from
Source
packages/shell/src/deployers/deployer.ts:31
manager
manager:
DeploymentManager
Service who manage all deployments
See
DeploymentManager
Inherited from
Source
packages/shell/src/deployers/deployer.ts:18
name
name:
string
Inherited from
Source
packages/shell/src/deployers/deployer.ts:32
now
now:
number
Current date
Inherited from
Source
packages/shell/src/deployers/deployer.ts:37
packageDescription
packageDescription:
any
Package description from package.json
Inherited from
Source
packages/shell/src/deployers/deployer.ts:26
parameters
parameters:
any
Inherited from
Source
packages/shell/src/deployers/deployer.ts:39
resources
resources:
T
Inherited from
Source
packages/core/lib/utils/abstractdeployer.d.ts:7
type
type:
string
Inherited from
Source
packages/shell/src/deployers/deployer.ts:33
workspaces
workspaces:
boolean
=false
Source
packages/shell/src/deployers/container.ts:83
Methods
addCommandToImage()
addCommandToImage():
string
Returns
string
Source
packages/shell/src/deployers/container.ts:426
addDeploymentToImage()
addDeploymentToImage(
localPath
,appPath
):string
Add the deployment export
Parameters
• localPath: string
= "deployments"
• appPath: string
= "/webda/"
Returns
string
Source
packages/shell/src/deployers/container.ts:378
buildContainer()
buildContainer(
tag
,file
):Promise
<Object
>
Build a Docker image with webda application
Parameters
• tag: any
to build
• file: any
path of Dockerfile
Returns
Promise
<Object
>
error
error:
string
output
output:
string
status
status:
number
Source
packages/shell/src/deployers/container.ts:121
copyPackageFilesTo()
copyPackageFilesTo(
pkg
,dst
,addFiles
):string
Parameters
• pkg: string
• dst: string
• addFiles: string
[]= []
Returns
string
Source
packages/shell/src/deployers/container.ts:393
copyPackageToLinkModules()
copyPackageToLinkModules(
pkg
,includeModules
,_subpkg
):void
Parameters
• pkg: string
• includeModules: boolean
= false
• _subpkg: string
= ""
Returns
void
Source
packages/shell/src/deployers/container.ts:189
defaultResources()
defaultResources():
Promise
<void
>
Initiate the default value for resources
Returns
Promise
<void
>
Inherited from
Source
packages/shell/src/deployers/deployer.ts:77
deploy()
deploy():
Promise
<Object
>
Create Docker image and push
Returns
Promise
<Object
>
tag
tag:
string
Overrides
Source
packages/shell/src/deployers/container.ts:166
execute()
execute(
command
,stdin
,resolveOnError
,logLevel
):Promise
<Object
>
Parameters
• command: string
• stdin: string
= undefined
• resolveOnError: boolean
= false
• logLevel: WorkerLogLevel
= "TRACE"
Returns
Promise
<Object
>
error
error:
string
output
output:
string
status
status:
number
Inherited from
Source
packages/shell/src/deployers/deployer.ts:127
getApplication()
getApplication():
Application
Return the Webda Application
Returns
Application
Inherited from
Source
packages/shell/src/deployers/deployer.ts:70
getDockerfile()
getDockerfile():
string
Generate a dynamic Dockerfile with webda application
Returns
string
Source
packages/shell/src/deployers/container.ts:447
getDockerfileHeader()
getDockerfileHeader():
string
Returns
string
Source
packages/shell/src/deployers/container.ts:286
getDockerfileWebdaShell()
getDockerfileWebdaShell():
string
Return the instruction to add webda-shell in Docker
If within development repository it will copy all local files Otherwise just a simple yarn add
Returns
string
Source
packages/shell/src/deployers/container.ts:248
getWorkspacesDockerfile()
getWorkspacesDockerfile():
string
Returns
string
Source
packages/shell/src/deployers/container.ts:299
loadDefaults()
loadDefaults():
Promise
<void
>
Load default resources
Returns
Promise
<void
>
Overrides
Source
packages/shell/src/deployers/container.ts:86
replaceArgs()
replaceArgs(
cmd
,args
):string
Replace ${...} arguments within a string
docker build --tag ${tag} --file ${file}
will be replace by
docker build --tag mytag:1.2.3
--file /tmp/plop`
Parameters
• cmd: string
to be executed after
• args: any
map to replace
Returns
string
Source
packages/shell/src/deployers/container.ts:156
replaceResourcesVariables()
replaceResourcesVariables():
void
Replace the resources variables
this.resources = this.replaceVariables(this.resources);
Returns
void
Inherited from
Deployer
.replaceResourcesVariables
Source
packages/shell/src/deployers/deployer.ts:118
replaceVariables()
replaceVariables(
obj
):any
Replace variables in resources
Parameters
• obj: any
to replace variables from
Returns
any
Inherited from
Source
packages/shell/src/deployers/deployer.ts:98
scanLinkModules()
scanLinkModules(
absPath
,onLinkModule
):void
Parameters
• absPath: string
• onLinkModule: (src
, relPath
) => void
Returns
void
Source
packages/shell/src/deployers/container.ts:221
setName()
setName(
name
):void
Set the deployer name
Parameters
• name: string
Returns
void
Inherited from
Source
packages/shell/src/deployers/deployer.ts:55
setType()
setType(
type
):void
Set the deployer name
Parameters
• type: string
Returns
void
Inherited from
Source
packages/shell/src/deployers/deployer.ts:63
getSchema()
static
getSchema():JSONSchema6
Allow to specify the JSONSchema to configure this service
Return undefined by default to fallback on the guess from ServiceParamaters
Using this method should only be exception
Returns
JSONSchema6
Inherited from
Source
packages/core/lib/utils/abstractdeployer.d.ts:15