Skip to main content

ContainerDeployerParameters

@webda/oci


Class: ContainerDeployerParameters

Defined in: packages/oci/src/container.service.ts:24

Parameters of the ContainerDeployer

Every string can use the deployment templates: ${package.version}, ${git.commit}, ${deployment}, ${deployer.name}, ${env.MY_VAR}, ...

Extends​

  • ServiceParameters

Constructors​

Constructor​

new ContainerDeployerParameters(): ContainerDeployerParameters

Returns​

ContainerDeployerParameters

Inherited from​

ServiceParameters.constructor

Properties​

baseImage?​

optional baseImage?: string

Defined in: packages/oci/src/container.service.ts:30

Base image, scratch for none

Default​

"node:22-slim"

cmd?​

optional cmd?: string[]

Defined in: packages/oci/src/container.service.ts:63

Command of the image, the arguments of the entrypoint

Default​

["serve", "--bind", "0.0.0.0"]

credentials?​

optional credentials?: Record<string, RegistryCredentials>

Defined in: packages/oci/src/container.service.ts:113

Credentials per registry host, they take precedence over ~/.docker/config.json

Use templates to read them from the environment: { "ghcr.io": { "username": "${env.GHCR_USER}", "password": "${env.GHCR_TOKEN}" } }


entrypoint?​

optional entrypoint?: string[]

Defined in: packages/oci/src/container.service.ts:57

Entrypoint of the image

Default​

["node", "<workdir>/node_modules/@webda/core/lib/bin/cli.js"]

env?​

optional env?: Record<string, string>

Defined in: packages/oci/src/container.service.ts:69

Environment variables

Default​

{ "NODE_ENV": "production" }

exposedPorts?​

optional exposedPorts?: string[]

Defined in: packages/oci/src/container.service.ts:83

Exposed ports

Default​

["18080/tcp"]

image?​

optional image?: string

Defined in: packages/oci/src/container.service.ts:36

Repository to push to, without tag: ghcr.io/my-org/my-app

Required to push.


insecureRegistries?​

optional insecureRegistries?: string[]

Defined in: packages/oci/src/container.service.ts:117

Registries reached over plain http, localhost and 127.0.0.1 always are


labels?​

optional labels?: Record<string, string>

Defined in: packages/oci/src/container.service.ts:73

Labels, added to the default OCI ones (version, revision, source, title)


mtime?​

optional mtime?: number

Defined in: packages/oci/src/container.service.ts:107

Modification time of the files and creation time of the image, in seconds

Default​

the SOURCE_DATE_EPOCH environment variable, or 0

output?​

optional output?: string

Defined in: packages/oci/src/container.service.ts:97

Output of container build: an OCI layout folder, or a tar archive when ending with .tar

Relative to the application folder. The folder keeps the downloaded base layers between builds.

Default​

".webda/oci/${deployer.name}"

package?​

optional package?: PackageOptions

Defined in: packages/oci/src/container.service.ts:101

Options of the application packaging


platforms?​

optional platforms?: string[]

Defined in: packages/oci/src/container.service.ts:89

Platforms to build, several platforms produce a multi-platform index

Default​

["linux/amd64"]

tags?​

optional tags?: string[]

Defined in: packages/oci/src/container.service.ts:45

Tags of the image

Invalid characters are replaced by -, so the snapshot version 1.2.4+20261004120000 becomes 1.2.4-20261004120000.

Default​

["${git.version}"]

type​

type: string

Defined in: packages/core/lib/services/serviceparameters.d.ts:8

Type of the service

Inherited from​

ServiceParameters.type


user?​

optional user?: string

Defined in: packages/oci/src/container.service.ts:77

User the container runs as, the base image one by default


workdir?​

optional workdir?: string

Defined in: packages/oci/src/container.service.ts:51

Folder of the application in the image

Default​

"/app"

Methods​

load()​

load(params?): this

Defined in: packages/oci/src/container.service.ts:122

Parameters​

params?​

any = {}

Returns​

this

Overrides​

ServiceParameters.load


update()​

update(params, delta): this

Defined in: packages/core/lib/services/serviceparameters.d.ts:25

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

ServiceParameters.update


with()​

with(callback): this

Defined in: packages/core/lib/services/serviceparameters.d.ts:31

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

ServiceParameters.with