# Reference: runtime type container

URL: https://scalws.com/docs/reference/runtime-container/
Source: `docs/reference/schema` in the ScalWS repository

<h3 id="tenants-.applications-.routes-.runtime.container.command"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.command</code></h3>

| | |
|---|---|
| Syntax | `command: [<string>, ...]` |
| Default | `[]` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Arguments after the image; `{port}` is replaced by the port scalws chose.


<h3 id="tenants-.applications-.routes-.runtime.container.drop_capabilities"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.drop_capabilities</code></h3>

| | |
|---|---|
| Syntax | `drop_capabilities: true \| false` |
| Default | `false` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Drop all Linux capabilities.


<h3 id="tenants-.applications-.routes-.runtime.container.engine"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.engine</code></h3>

| | |
|---|---|
| Syntax | `engine: podman \| docker` |
| Default | `podman` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Container engine: `podman` or `docker`.


<h3 id="tenants-.applications-.routes-.runtime.container.engine_path"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.engine_path</code></h3>

| | |
|---|---|
| Syntax | `engine_path: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Engine binary; default `podman` / `docker` from `PATH`.


<h3 id="tenants-.applications-.routes-.runtime.container.env"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.env</code></h3>

| | |
|---|---|
| Syntax | `env: {<key>: <string>, ...}` |
| Default | `empty` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Environment variables for the containers.


<h3 id="tenants-.applications-.routes-.runtime.container.health_path"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.health_path</code></h3>

| | |
|---|---|
| Syntax | `health_path: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Path requested to decide that a container is ready and healthy.


<h3 id="tenants-.applications-.routes-.runtime.container.image"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.image</code></h3>

| | |
|---|---|
| Syntax | `image: <string>` |
| Default | `required` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Image reference, e.g. `docker.io/library/nginx:1.27`.


<h3 id="tenants-.applications-.routes-.runtime.container.mounts"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.mounts</code></h3>

| | |
|---|---|
| Syntax | `mounts: [{...}, ...]` |
| Default | `[]` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Host directories mounted into the containers.


<h3 id="tenants-.applications-.routes-.runtime.container.mounts-.read_only"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.mounts[].read_only</code></h3>

| | |
|---|---|
| Syntax | `read_only: true \| false` |
| Default | `true` |
| Context | `tenants[].applications[].routes[].runtime<container>.mounts[]` |
| Reload | applies on reload |

Mount read-only.


<h3 id="tenants-.applications-.routes-.runtime.container.mounts-.source"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.mounts[].source</code></h3>

| | |
|---|---|
| Syntax | `source: <string>` |
| Default | `required` |
| Context | `tenants[].applications[].routes[].runtime<container>.mounts[]` |
| Reload | applies on reload |

Host path (absolute).


<h3 id="tenants-.applications-.routes-.runtime.container.mounts-.target"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.mounts[].target</code></h3>

| | |
|---|---|
| Syntax | `target: <string>` |
| Default | `required` |
| Context | `tenants[].applications[].routes[].runtime<container>.mounts[]` |
| Reload | applies on reload |

Path inside the container (absolute).


<h3 id="tenants-.applications-.routes-.runtime.container.network"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.network</code></h3>

| | |
|---|---|
| Syntax | `network: bridge \| host` |
| Default | `bridge` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

`bridge`: publish `port` on a loopback port; `host`: share the host network.


<h3 id="tenants-.applications-.routes-.runtime.container.port"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.port</code></h3>

| | |
|---|---|
| Syntax | `port: <integer>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Port the application listens on inside the container (`bridge` networking).


<h3 id="tenants-.applications-.routes-.runtime.container.pull"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.pull</code></h3>

| | |
|---|---|
| Syntax | `pull: missing \| always \| never` |
| Default | `missing` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

When the image is pulled: `missing`, `always` or `never`.


<h3 id="tenants-.applications-.routes-.runtime.container.read_only"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.read_only</code></h3>

| | |
|---|---|
| Syntax | `read_only: true \| false` |
| Default | `false` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Read-only root filesystem (a tmpfs is mounted at `/tmp`).


<h3 id="tenants-.applications-.routes-.runtime.container.response_timeout"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.response_timeout</code></h3>

| | |
|---|---|
| Syntax | `response_timeout: <duration> (e.g. 30s)` |
| Default | `60s` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Time to wait for the response headers of the application.


<h3 id="tenants-.applications-.routes-.runtime.container.startup_timeout"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.startup_timeout</code></h3>

| | |
|---|---|
| Syntax | `startup_timeout: <duration> (e.g. 30s)` |
| Default | `120s` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Time a container gets to become ready (includes pulling the image).


<h3 id="tenants-.applications-.routes-.runtime.container.stop_timeout"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.stop_timeout</code></h3>

| | |
|---|---|
| Syntax | `stop_timeout: <duration> (e.g. 30s)` |
| Default | `10s` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Time a container gets to stop before it is killed.


<h3 id="tenants-.applications-.routes-.runtime.container.user"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.user</code></h3>

| | |
|---|---|
| Syntax | `user: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

User the container runs as (`--user`).


<h3 id="tenants-.applications-.routes-.runtime.container.workers"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.workers</code></h3>

| | |
|---|---|
| Syntax | `workers: {...}` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: container)` |
| Reload | applies on reload |

Number of containers (`min` at start; scaled between `min` and `max`).


<h3 id="tenants-.applications-.routes-.runtime.container.workers.autoscale"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.workers.autoscale</code></h3>

| | |
|---|---|
| Syntax | `autoscale: off \| auto \| recommend` |
| Default | `recommend` |
| Context | `tenants[].applications[].routes[].runtime<container>.workers` |
| Reload | applies on reload |

`off`, `recommend` (default) or `auto` (ADR-0014).


<h3 id="tenants-.applications-.routes-.runtime.container.workers.max"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.workers.max</code></h3>

| | |
|---|---|
| Syntax | `max: <integer>` |
| Default | `required` |
| Context | `tenants[].applications[].routes[].runtime<container>.workers` |
| Reload | applies on reload |

Upper bound when the pool is scaled.


<h3 id="tenants-.applications-.routes-.runtime.container.workers.min"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.workers.min</code></h3>

| | |
|---|---|
| Syntax | `min: <integer>` |
| Default | `required` |
| Context | `tenants[].applications[].routes[].runtime<container>.workers` |
| Reload | applies on reload |

Processes started at the beginning and kept at least.


<h3 id="tenants-.applications-.routes-.runtime.container.workers.target_concurrency"><code>tenants[].applications[].routes[].runtime&lt;container&gt;.workers.target_concurrency</code></h3>

| | |
|---|---|
| Syntax | `target_concurrency: <integer>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime<container>.workers` |
| Reload | applies on reload |

Concurrent requests one worker is expected to handle well (utilisation basis).


<h3 id="tenants-.applications-.runtime.container.command"><code>tenants[].applications[].runtime&lt;container&gt;.command</code></h3>

| | |
|---|---|
| Syntax | `command: [<string>, ...]` |
| Default | `[]` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Arguments after the image; `{port}` is replaced by the port scalws chose.


<h3 id="tenants-.applications-.runtime.container.drop_capabilities"><code>tenants[].applications[].runtime&lt;container&gt;.drop_capabilities</code></h3>

| | |
|---|---|
| Syntax | `drop_capabilities: true \| false` |
| Default | `false` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Drop all Linux capabilities.


<h3 id="tenants-.applications-.runtime.container.engine"><code>tenants[].applications[].runtime&lt;container&gt;.engine</code></h3>

| | |
|---|---|
| Syntax | `engine: podman \| docker` |
| Default | `podman` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Container engine: `podman` or `docker`.


<h3 id="tenants-.applications-.runtime.container.engine_path"><code>tenants[].applications[].runtime&lt;container&gt;.engine_path</code></h3>

| | |
|---|---|
| Syntax | `engine_path: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Engine binary; default `podman` / `docker` from `PATH`.


<h3 id="tenants-.applications-.runtime.container.env"><code>tenants[].applications[].runtime&lt;container&gt;.env</code></h3>

| | |
|---|---|
| Syntax | `env: {<key>: <string>, ...}` |
| Default | `empty` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Environment variables for the containers.


<h3 id="tenants-.applications-.runtime.container.health_path"><code>tenants[].applications[].runtime&lt;container&gt;.health_path</code></h3>

| | |
|---|---|
| Syntax | `health_path: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Path requested to decide that a container is ready and healthy.


<h3 id="tenants-.applications-.runtime.container.image"><code>tenants[].applications[].runtime&lt;container&gt;.image</code></h3>

| | |
|---|---|
| Syntax | `image: <string>` |
| Default | `required` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Image reference, e.g. `docker.io/library/nginx:1.27`.


<h3 id="tenants-.applications-.runtime.container.mounts"><code>tenants[].applications[].runtime&lt;container&gt;.mounts</code></h3>

| | |
|---|---|
| Syntax | `mounts: [{...}, ...]` |
| Default | `[]` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Host directories mounted into the containers.


<h3 id="tenants-.applications-.runtime.container.mounts-.read_only"><code>tenants[].applications[].runtime&lt;container&gt;.mounts[].read_only</code></h3>

| | |
|---|---|
| Syntax | `read_only: true \| false` |
| Default | `true` |
| Context | `tenants[].applications[].runtime<container>.mounts[]` |
| Reload | applies on reload |

Mount read-only.


<h3 id="tenants-.applications-.runtime.container.mounts-.source"><code>tenants[].applications[].runtime&lt;container&gt;.mounts[].source</code></h3>

| | |
|---|---|
| Syntax | `source: <string>` |
| Default | `required` |
| Context | `tenants[].applications[].runtime<container>.mounts[]` |
| Reload | applies on reload |

Host path (absolute).


<h3 id="tenants-.applications-.runtime.container.mounts-.target"><code>tenants[].applications[].runtime&lt;container&gt;.mounts[].target</code></h3>

| | |
|---|---|
| Syntax | `target: <string>` |
| Default | `required` |
| Context | `tenants[].applications[].runtime<container>.mounts[]` |
| Reload | applies on reload |

Path inside the container (absolute).


<h3 id="tenants-.applications-.runtime.container.network"><code>tenants[].applications[].runtime&lt;container&gt;.network</code></h3>

| | |
|---|---|
| Syntax | `network: bridge \| host` |
| Default | `bridge` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

`bridge`: publish `port` on a loopback port; `host`: share the host network.


<h3 id="tenants-.applications-.runtime.container.port"><code>tenants[].applications[].runtime&lt;container&gt;.port</code></h3>

| | |
|---|---|
| Syntax | `port: <integer>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Port the application listens on inside the container (`bridge` networking).


<h3 id="tenants-.applications-.runtime.container.pull"><code>tenants[].applications[].runtime&lt;container&gt;.pull</code></h3>

| | |
|---|---|
| Syntax | `pull: missing \| always \| never` |
| Default | `missing` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

When the image is pulled: `missing`, `always` or `never`.


<h3 id="tenants-.applications-.runtime.container.read_only"><code>tenants[].applications[].runtime&lt;container&gt;.read_only</code></h3>

| | |
|---|---|
| Syntax | `read_only: true \| false` |
| Default | `false` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Read-only root filesystem (a tmpfs is mounted at `/tmp`).


<h3 id="tenants-.applications-.runtime.container.response_timeout"><code>tenants[].applications[].runtime&lt;container&gt;.response_timeout</code></h3>

| | |
|---|---|
| Syntax | `response_timeout: <duration> (e.g. 30s)` |
| Default | `60s` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Time to wait for the response headers of the application.


<h3 id="tenants-.applications-.runtime.container.startup_timeout"><code>tenants[].applications[].runtime&lt;container&gt;.startup_timeout</code></h3>

| | |
|---|---|
| Syntax | `startup_timeout: <duration> (e.g. 30s)` |
| Default | `120s` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Time a container gets to become ready (includes pulling the image).


<h3 id="tenants-.applications-.runtime.container.stop_timeout"><code>tenants[].applications[].runtime&lt;container&gt;.stop_timeout</code></h3>

| | |
|---|---|
| Syntax | `stop_timeout: <duration> (e.g. 30s)` |
| Default | `10s` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Time a container gets to stop before it is killed.


<h3 id="tenants-.applications-.runtime.container.user"><code>tenants[].applications[].runtime&lt;container&gt;.user</code></h3>

| | |
|---|---|
| Syntax | `user: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

User the container runs as (`--user`).


<h3 id="tenants-.applications-.runtime.container.workers"><code>tenants[].applications[].runtime&lt;container&gt;.workers</code></h3>

| | |
|---|---|
| Syntax | `workers: {...}` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: container)` |
| Reload | applies on reload |

Number of containers (`min` at start; scaled between `min` and `max`).


<h3 id="tenants-.applications-.runtime.container.workers.autoscale"><code>tenants[].applications[].runtime&lt;container&gt;.workers.autoscale</code></h3>

| | |
|---|---|
| Syntax | `autoscale: off \| auto \| recommend` |
| Default | `recommend` |
| Context | `tenants[].applications[].runtime<container>.workers` |
| Reload | applies on reload |

`off`, `recommend` (default) or `auto` (ADR-0014).


<h3 id="tenants-.applications-.runtime.container.workers.max"><code>tenants[].applications[].runtime&lt;container&gt;.workers.max</code></h3>

| | |
|---|---|
| Syntax | `max: <integer>` |
| Default | `required` |
| Context | `tenants[].applications[].runtime<container>.workers` |
| Reload | applies on reload |

Upper bound when the pool is scaled.


<h3 id="tenants-.applications-.runtime.container.workers.min"><code>tenants[].applications[].runtime&lt;container&gt;.workers.min</code></h3>

| | |
|---|---|
| Syntax | `min: <integer>` |
| Default | `required` |
| Context | `tenants[].applications[].runtime<container>.workers` |
| Reload | applies on reload |

Processes started at the beginning and kept at least.


<h3 id="tenants-.applications-.runtime.container.workers.target_concurrency"><code>tenants[].applications[].runtime&lt;container&gt;.workers.target_concurrency</code></h3>

| | |
|---|---|
| Syntax | `target_concurrency: <integer>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime<container>.workers` |
| Reload | applies on reload |

Concurrent requests one worker is expected to handle well (utilisation basis).
