Home

Awesome

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

Tested on

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.

<details> <summary>Mac</summary>
  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
</details> <details> <summary>Linux</summary>
  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
</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

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