Skip to content

faradey/madock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

madock

Local development environment based on Docker

Supported platforms: Magento2, PWA, Shopify, Shopware, Custom PHP projects.

GoDoc Go Report Card GitHub release GitHub license GitHub issues

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

madock - install the two Magento 2 projects

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.

Mac
  1. Install Docker
  2. Install Golang
  3. 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

  1. Go to the cloned directory
cd madock
  1. Compile
Run command below for Apple M1

GOARCH=arm64 go build -o madock
Run command below for Apple Intel

go build -o madock
  1. 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/
  1. Open a new terminal tab/window and check that madock works
which madock
madock
  1. Optionally you can also apply these performance tweaks
Linux
  1. Install docker
  2. Configure permissions
  3. Install Docker-compose
  4. Install Golang
  5. 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

  1. Compile
go build -o madock
  1. Add madock bin into your $PATH
ln -s absolute_path_to_your_madock_dir/madock /usr/local/bin/
  1. Open a new terminal tab/window and check that madock works
which madock
madock

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

Donations

If you find it useful and want to invite us for a beer, just click on the donation button. Thanks!

"Buy Me A Coffee"

Resources

This project has been possible thanks to the following resources:

License

Copyright

(c) faradey