Awesome
madock
Local development environment based on Docker
Supported platforms: Magento2, PWA, Shopify, Shopware, Custom PHP projects.
Description
madock
is a local Docker-based environment that allows you to run PHP projects.
This project is written on Golang, and it is distributed under a MIT License.
Key Features
- Automatic project setup
- Two or more projects can work simultaneously
- Magento as a separate service. Works by default
- PWA Studio as a separate service
- Shopify as a separate service. Learn more
- Custom PHP project as a separate service
- Shopware as a separate service
- Cron support
- Flexible configuration for each project
- Database import and export in two clicks
- Simple viewing of logs with one command
- Debug support
- Synchronization of the local database and media files with the dev site
- Additional services: phpmyadmin, redis, rabbitMQ, elasticsearch, Kibana, ioncube, xdebug, cron
- LiveReload with Google Chrome plugin
- MailHog (email testing tool for developers)
- Magento Cloud
- Composer patches in two clicks
- Magento Functional Testing Framework (MFTF). Learn more
- Scopes. Learn more
- Configuration in a project. Learn more
- Snapshots. Learn more
- Isolation mode more
- Varnish Cache more
- Custom commands more
Tested on
- Linux (Ubuntu 20.04)
- macOS (Monterey, Sonoma)
- Windows (10, 11)
Video
Installation
You need 5 things on your local machine: git
, docker
, docker-compose
, golang
and madock
The new version 2 is not backwards compatible with version 1. If you have problems with version 2, you can use version 1.x temporarily as it is more stable. Version 1 does not receive any more improvements. To use version 1 you should switch to master-1.x.x branch
Follow the installation steps for your system.
<details> <summary>Mac</summary>git clone git@github.com:faradey/madock.git
If you got error "git@github.com: Permission denied (publickey)." see solution
- Go to the cloned directory
cd madock
- Compile
Run command below for Apple M1
GOARCH=arm64 go build -o madock
Run command below for Apple Intel
go build -o madock
- Add
madock
bin into your$PATH
Run command below for Apple M1
sudo ln -s absolute_path_to_your_madock_dir/madock /opt/homebrew/bin/
Run command below for Apple Intel
sudo ln -s absolute_path_to_your_madock_dir/madock /usr/local/bin/
- Open a new terminal tab/window and check that
madock
works
which madock
madock
- Optionally you can also apply these performance tweaks
- Install docker
- Configure permissions
- Install Docker-compose
- Install Golang
- Clone this repo and follow into folder "madock"
git clone git@github.com:faradey/madock.git
If you got error "git@github.com: Permission denied (publickey)." see solution
- Compile
go build -o madock
- Add
madock
bin into your$PATH
ln -s absolute_path_to_your_madock_dir/madock /usr/local/bin/
- Open a new terminal tab/window and check that
madock
works
which madock
madock
</details>
Project Setup
cd <your_project>
madock setup --download --install # for a new empty project with the clean Magento
madock setup # for an existing project
Usage
Start Application
madock start
madock composer install
sudo vim /etc/hosts
// Add -> 127.0.0.1 <your-domain>
Workflow
See detailed documentation about development workflow with madock IMPORTANT: Please, read all items before starting work.
More Documentation
- VSCODE + Xdebug Setup
- PHPStorm + Xdebug Setup
- Docker images list
- Customizations
- Database import, export, synchronization, phpmyadmin
- Media synchronization
- Cron
- Kibana. URL http://{you_domain_name}/kibana
- Mailhog. Default URL http://localhost:8025
Donations
If you find it useful and want to invite us for a beer, just click on the donation button. Thanks!
Resources
This project has been possible thanks to the following resources:
License
Copyright
(c) faradey