Docker SDK configuration reference

Edit on GitHub

This document is a quick reference for the most common configuration options of the Docker SDK.

The configuration parameters in this document are exemplary. You may need to adjust them per your project requirements.

Configuring Opcache

To configure Opcache, adjust deploy.*.yml as follows:

image:
    tag: spryker/php:7.3
    php:
        ini:
            "opcache.revalidate_freq": 0
            "opcache.enable_cli": 0
            "opcache.enable": 1
            ...
Never disable Opcache on deployed environments

With opcache.enable: 0, PHP recompiles the entire application code on every request. On a Symfony and API Platform based stack this adds a flat multi-second overhead to every request.

For the full configuration reference, see Opcache activation.

Defining a memory limit

To define a memory limit, adjust deploy.*.yml as follows:

image:
    tag: spryker/php:7.3
    php:
        ini:
            "memory_limit": 512m

Providing custom environment variables to Spryker applications

To provide custom environment variables to Spryker applications, adjust deploy.*.yml as follows:

image:
    tag: spryker/php:7.3
    environment:
        MY_CUSTOM_ENVIRONMENT_VARIABLE: 1
        ...

The environment variables defined in environment: are embedded into all application images.

Increasing maximum upload size

To increase maximum upload size, update deploy.*.yml as follows:

  1. In Nginx configuration, update maximum request body size:
...
		applications:
			backoffice:
				application: backoffice
				http:
					max-request-body-size: {request_body_size_value}
				...
  1. Update PHP memory limit:
image:
    ...
    php:
        ini:
            memory_limit: {memroy_limit_value}
            ...