Valet+Containers is a development environment for macOS. No Vagrant, no /etc/hosts
file.
Valet+Containers is a fork of Valet+. Valet+Containers uses Docker Desktop for running ancillary services (MySql, ElastricSearch, RabbitMQ, Redis). The primary for this was avoiding the need of switching Java versions on the host when switching ElasticSearch versions.
Valet+ commands work as outlined in the Valet+ docs. The service versions started by default are dictated based on my
needs and are not the latest and greatest. You can specify the service version when running valet start {service}
.
This is currently a proof of concept and may not work. You should be comfortable with Valet+, Docker, and any services in use. There is an excellent chance this will not work out of the box.
This assumes Docker is already installed on your Mac
- Clone this repo
git clone git@github.com:pmclain/valet-plus.git
- Enter the repo directory
cd valet-plus
- Install dependencies
composer install
- Symlink
valet
scriptln -s {pathToValetDirectory}/valet /usr/local/bin/valet
- Install or update Homebrew to the latest version using
brew update
- Add the Homebrew PHP tap for Valet+ via
brew tap henkrehorst/php
- Install PHP 7.2 using Homebrew via
brew install valet-php@7.2
- Run
valet install
The Valet+ docs include some troubleshooting instructions for common installation issues.
Valet validates running service versions against environment configuration
files. Versions are verified when executing valet
commands and an exception
is thrown when versions do not match the defined requirements.
Services .magento/services.yaml
- mysql
- redis
- elasticsearch
- rabbitmq
PHP Version .magento.app.yaml
- php
Example .valet.yml
php: 7.2
mysql: 5.7
redis: 5
elasticsearch: 5.2
rabbitmq: 3
Service versions can be specified when stopping the services with valet ex:
valet start mysql:5.7
valet start elasticsearch:6
Important The version specified when starting the service must also be specified when stopping the service.
Named volumes are mounted for ElasticSearch and MySql services. Each service version has a unique volume.
The domain is optional when running the command from a project directory.
Enable: valet fpc-on [domain]
Disable: valet fpc-off [domain]