- Setup a development environment for a Magento Cloud project using Docker (ECE Tools)
- Appropriate for developers new to Magento Cloud and Docker
- php, composer, magento cloud project
magento-cloud
cli tool- docker desktop
- Project files
mgc get <project_code>
composer install
- DB
mgc db:dump
- Media (optional)
mgc mount:download -m pub/media --exclude="cache"
-
Build dynamic Docker configuration
./vendor/bin/ece-docker build:compose --host="customBaseUrl" --mode="developer"
Use--sync-engine="mutagen"
option in case of Mac- 2 files to check
- docker-composer.yml
- config.php.dist inside the new .docker folder
-
Move the DB dump to correct location for automatic import
mv sqldumpfile.sql .docker/mysql/docker-entrypoint-initdb.d/
- Optional, but important, step for contribution to multiple projects
- Change namespace to something less generic
- Db
- Base Url
- Extend Magento's base Docker configuration
- docker-compose.override.yml (Optional)
- .docker/config.php
- Start Docker environment
bin/magento-docker up
- Start file sync
mutagen.sh
(optional in Ubuntu)
- env.php!
bin/magento-docker ece-deploy
bin/magento-docker bash
to get into Magento app root/etc/hosts
add the local domain url
- Use
bin/magento-docker start
,bin/magento-docker stop
- Not
bin/magento-docker up
,bin/magento-docker down
Remember to start Mutagen along with the environment! (optional in Ubuntu)
bin/magento-docker bash
- enter the Docker environment and performbin/magento
commands.
- For linux systems if
ERROR: for deploy Container "<containerid>" is unhealthy
occurs. Run this commandsudo sysctl -w vm.max_map_count=262144;
- For reference - https://devdocs.magento.com/cloud/docker/docker-development.html
This deployment steps are not working in 2.4.5 p3 version. Could you please share any installation steps or tutorial for adobe commerce 2.4.5 p3 version?