VMmanager: Administrator guide
en En
es Es

Container modification via patches

You can change the settings of Docker containers on a server with a platform using patches. For example, you can add files to a container, change environment variables, and change service settings.

A platform patch is a YAML file in Docker Compose format that contains new container settings. For more information about Docker Compose, see the official documentation.

This article contains instructions for creating and disabling patches.

Creating a patch

The example shows how to change environment variables for the input container. After applying the patch, the value of the NGINX_KEEPALIVE_TIMEOUT variable will be 200, and NGINX_WORKER_CONNECTIONS will be 1000.

To create a patch:

  1. Connect to the server with the platform via SSH. For more information about connecting via SSH, see Workstation setup.
  2. Create the patch file patch.yaml:

    patch.yaml
    version: "3.5"
    services:
      input:
        environment:
          NGINX_KEEPALIVE_TIMEOUT: 200
          NGINX_WORKER_CONNECTIONS: 1000
  3. Apply the patch:

    vm add-patch -p=<patch_name> -f=</path/to/patch.yaml>

    Comments to the command:

    • <patch_name> — unique patch name;
    • </path/to/patch.yaml> — path to the patch file.

The platform will apply the patch and restart the necessary containers. If the patch is applied successfully, the patch content will be added to the Patches section of the /opt/ispsystem/vm/config.json file in base64 encoding:

Entry example
{
  ...
  "Patches": {
    "patch_name": {
      "base64_compose": "dmVyc2lvbjogIjMuNSIKc2VydmljZXM6CiAgaW5wdXQ6CiAgICBlbnZpcm9ubWVudDoKICAgICAgTkdJTlhfS0VFUEFMSVZFX1RJTUVPVVQ6IDIwMAogICAgICBOR0lOWF9XT1JLRVJfQ09OTkVDVElPTlM6IDEwMDA="
    }
    },
  ...
}

To verify that the environment variables have been changed, examine the output of the commands:

docker exec input env | grep NGINX_KEEPALIVE_TIMEOUT
docker exec input env | grep NGINX_WORKER_CONNECTIONS

Disabling a patch

To disable a patch:

  1. Connect to the server with the platform via SSH. For more information about connecting via SSH, see Workstation setup.
  2. Disable a patch:

    vm remove-patch -p=<patch_name>

    Comments to the command:

    • <patch_name> — patch name.

Examples of configurable environment variables

ContainerVariableMeaning
inputNGINX_WORKER_CONNECTIONSthe maximum number of simultaneous connections that each Nginx worker process can handle
NGINX_KEEPALIVE_TIMEOUTkeep-alive connection timeout between Nginx and the client, sec
statisticCOLLECTOR_INTERVAL_MINstatistics collection interval, sec
COLLECTOR_METRIC_TIMEOUT_SECresponse time when collecting statistics, sec
COLLECTOR_WORKER_LIMITmaximum number of simultaneous connections when collecting statistics
Useful tips


The article was last updated on 01.20.2026. The article was prepared by technical writers of ISPsystem