The development environment can be configured using environment variables, configuration files, and marker files.
Create a .env file in the root of your development directory to set environment variables:
cd ~/development
nano .env# MySQL root password
MYSQL_ROOT_PASSWORD=secret
# Varnish cache size
CACHE_SIZE=256M
# Composer memory limit
COMPOSER_MEMORY_LIMIT=-1
# Domain suffix (default: .localhost)
DOMAIN_SUFFIX=.localhostThe .env file is gitignored by default, so your local settings won't be committed.
Many services are enabled by creating marker directories in conf/:
mkdir -p conf/elasticsearch # Enable Elasticsearch
mkdir -p conf/rabbitmq # Enable RabbitMQ
mkdir -p conf/mongo # Enable MongoDB
mkdir -p conf/opensearch # Enable OpenSearch
mkdir -p conf/varnish # Enable Varnish
mkdir -p conf/blackfire # Enable BlackfireAfter creating markers, rebuild:
dev rebuildMySQL configuration is in conf/mysql/my.cnf:
mkdir -p conf/mysql
nano conf/mysql/my.cnfExample configuration:
[mysqld]
max_connections = 200
innodb_buffer_pool_size = 1GBlackfire credentials in conf/blackfire:
BLACKFIRE_CLIENT_ID=your-client-id
BLACKFIRE_CLIENT_TOKEN=your-client-token
BLACKFIRE_SERVER_ID=your-server-id
BLACKFIRE_SERVER_TOKEN=your-server-tokenSee configure-blackfire.md for details.
Varnish VCL configuration in conf/varnish.vcl. See varnish.md for details.
Run the setup wizard to configure your environment interactively:
dev setupThe wizard will:
- Set your domain suffix
- Choose default PHP version
- Enable optional services
- Configure workspace and database volumes
You can run dev setup multiple times to reconfigure.
PHP versions are set using marker files in your workspace. See how-to-use-different-php-versions.md for details.
For advanced configuration, use custom compose files. See custom-compose-files.md.
After modifying configuration files, restart the affected service:
dev restart servicenameOr rebuild entirely:
dev rebuildList all configuration:
ls -la conf/View current environment variables:
cat .env