Skip to main content

Configuration

The DL uses docker-compose configuration files, so you can override any variables and even images.

Used images:

Setting up the .env file​

With the help of variables in the .env file, you can flexibly control the environment settings.

Main​

VariableRequiredDefault valueNote
NETWORK_NAMENoGenerated from HOST_NAMEThe name of the docker network. Generated from HOST_NAME without special characters
DOCUMENT_ROOTNo/var/www/htmlThe root directory of the site where the index.php file is located. 1
HOST_NAMENoGenerated from name of the current directorySite name or domain. Used to build a local URL 2

Deploy files and database​

VariableRequiredDefault valueNote
CATALOG_SRVNo 3The root directory of the site on the server
USER_SRVNo 3SSH username to connect to the server
PORT_SRVNo 3SSH port to connect to the server
SERVERNo 3IP address (or domain) to connect to the server
SSH_KEYNo 3id_rsaSpecifies the name of the ssh key located in the ~/.ssh/ directory
ASK_KEY_PASSPHRASENofalseAsk for private key passphrase.
Available values: true, false
USE_SSH_PASSNofalseIgnore ssh key and use password to connect.
Available values: true, false
EXCLUDED_TABLESNoMySQL tables excluded when downloading a dump from the server
EXCLUDED_FILESNoExcluded files when downloading an archive of files from the server

Database connection​

If the script could not automatically determine access to the database on the server, write the settings to the env file manually

VariableRequiredDefault valueNote
MYSQL_HOST_SRVNolocalhostHost
MYSQL_PORT_SRVNo3306Port
MYSQL_DATABASE_SRVYesBase name
MYSQL_LOGIN_SRVYesUser name
MYSQL_PASSWORD_SRVYesUser password

PHP settings​

VariableRequiredDefault valueNote
PHP_VERSIONYesPHP version
Available values: 7.3-apache, 7.4-apache, 8.0-apache, 8.1-apache, 8.2-apache, 7.3-fpm, 7.4-fpm, 8.0-fpm, 8.1-fpm, 8.2-fpm
PHP_MEMORY_LIMITNo256MPHP memory limit
PHP_POST_MAX_SIZENo100MMaximum POST request size
PHP_UPLOAD_MAX_FILESIZENo100MMaximum file size allowed for upload
PHP_MAX_FILE_UPLOADSNo50Maximum number of uploaded files
PHP_MAX_EXECUTION_TIMENo60Maximum script execution time
PHP_MODULESNoAdditional php extensions. For example PHP_MODULES="redis memcached"
XDEBUGNooff 4To enable the XDebug module, use the debug option
XDEBUG_IDE_KEYNoPHPSTORMKey to be passed when initializing an XDebug session
XDEBUG_PORTNo9003XDebug port
PHP_INI_SOURCENo/dev/nullRelative link to php.ini file to completely override configuration
(for example: PHP_INI_SOURCE: .docker/php/php.ini)

DB settings​

If a value is specified, the database container will be raised.

Database name: db
Username: db
User password: db

VariableRequiredDefault valueNote
MYSQL_VERSIONNoMySQL version.
Available values: 5.7, 8.0
MARIADB_VERSIONNoMariaDB version.
Available values: Supported tags
POSTGRES_VERSIONNoPostgreSQL version.
Available values: Supported tags

Additional containers​

VariableRequiredDefault valueNote
REDISNofalseIf set to true, the Redis container will be launched
REDIS_PASSWORDNopassRedis password
MEMCACHEDNofalseIf set to true, the Memcached container will be launched

Other settings​

VariableRequiredDefault valueNote
LOCALTIMENoEurope/MoscowTime zone set in PHP and MySQL containers
NGINX_CONFNo~/.config/dl/config-files/default.conf.templateNginx config template. Required when using php-fpm version (nginx + php-fpm)
LOCAL_IPNoExternal local IP
e.g. 192.168.0.5
If the IP of the computer was incorrectly determined, it must be specified manually in the .env file
APPEND_COMPOSE_FILENoAdd a docker-compose.yaml file to be run with the project. (If there are several files, they must be separated by a colon)

File configuration example for Bitrix CMS​

## Remote Server (PROD) ##
CATALOG_SRV=/var/www/site.com/public_html
USER_SRV=user
PORT_SRV=22
SERVER=127.0.0.1

## Local container config ##
HOST_NAME=site.com
DOCUMENT_ROOT=/var/www/html
## Avalible versions: 7.3-apache 7.4-apache 8.0-apache 8.1-apache 8.2-apache 7.3-fpm 7.4-fpm 8.0-fpm 8.1-fpm 8.2-fpm ##
PHP_VERSION=8.2-apache
## Avalible versions: 5.7 8.0 ##
MYSQL_VERSION=8.0

## Deploy settings ##
EXCLUDED_TABLES=b_event_log,b_search_content_stem,b_search_content,b_search_content_text,b_search_content_title,b_search_phrase,b_search_suggest,b_perf_error
EXCLUDED_FILES=.git,upload,bitrix/backup,bitrix/cache,bitrix/managed_cache,bitrix/stack_cache,bitrix/tmp,.env

  1. For example, if you specify site.com, the local address will be site.com.localhost (or site.com.127.0.0.1.nip.io)↩
  2. For example, for Laravel the value would be /var/www/html/public↩
  3. Required variable when using the deploy command ↩
  4. All XDebug Options https://xdebug.org/docs/all_settings#mode↩