{"id":13752104,"url":"https://github.com/mage2click/m2c","last_synced_at":"2025-10-23T17:39:03.567Z","repository":{"id":52937998,"uuid":"192688834","full_name":"mage2click/m2c","owner":"mage2click","description":"Mage2click toolset to create and manage the Magento Docker development environment with mutagen.io file-sync for macOS and native filesystem mounts on Linux.","archived":false,"fork":false,"pushed_at":"2021-06-07T11:34:40.000Z","size":2874,"stargazers_count":69,"open_issues_count":14,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-05T02:31:45.439Z","etag":null,"topics":["command-line-tool","docker","docker-magento","elasticsearch","linux","local-development","macos","magento","magento2","mailhog","mariadb","mutagen","nginx","ngrok","php","phpmyadmin","redis","traefik","varnish","xdebug"],"latest_commit_sha":null,"homepage":"https://mage2.click","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mage2click.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-19T08:13:48.000Z","updated_at":"2023-08-14T13:25:45.000Z","dependencies_parsed_at":"2022-08-24T13:50:55.400Z","dependency_job_id":null,"html_url":"https://github.com/mage2click/m2c","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mage2click/m2c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2click%2Fm2c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2click%2Fm2c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2click%2Fm2c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2click%2Fm2c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mage2click","download_url":"https://codeload.github.com/mage2click/m2c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2click%2Fm2c/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260162490,"owners_count":22968056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","docker","docker-magento","elasticsearch","linux","local-development","macos","magento","magento2","mailhog","mariadb","mutagen","nginx","ngrok","php","phpmyadmin","redis","traefik","varnish","xdebug"],"created_at":"2024-08-03T09:00:59.555Z","updated_at":"2025-10-23T17:39:03.504Z","avatar_url":"https://github.com/mage2click.png","language":"Shell","readme":"\u003ch1 align=\"center\"\u003eMage2click - Magento Docker Toolset\u003c/h1\u003e \n\n\u003cp align=\"center\"\u003e\u003cimg src=\"assets/images/install.png\" width=\"600\" align=\"center\" alt=\"Mage2click Magento Docker environment and toolset\" /\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/magento/magento2\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/magento-2.X-brightgreen.svg?logo=magento\u0026longCache=true\u0026style=for-the-badge\u0026logoColor=white\" alt=\"Supported Magento Versions\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/mage2click/m2c/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/mage2click/m2c.svg?label=docker%20pulls\u0026style=for-the-badge\u0026logo=docker\u0026logoColor=white\u0026color=brightgreen\" alt=\"Docker Hub Pulls\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://mage2click.slack.com/#general\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/chat-Mage2click-brightgreen.svg?style=for-the-badge\u0026logo=slack\" alt=\"Mage2click in Slack\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/intent/follow?screen_name=mage2click\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/mage2click?color=brightgreen\u0026label=mage2click\u0026logo=twitter\u0026logoColor=white\u0026style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nMage2click toolset is a system-wide command-line tool for creating and managing simultaneously running Magento Docker projects with insanely easy installation and configuration. It includes plenty of configurable services and useful commands for developing and project orchestration right out of the box. On macOS systems, mutagen.io tool will be bundled in the toolset for high-performance files sync between host and Docker containers.\n\n## Table of contents\n\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [What is included](#what-is-included)\n    - [Global system-wide services](#global-system-wide-services)\n    - [Per-project services](#per-project-services)\n- [Usage](#usage)\n    - [Interactive project initialization mode](#interactive-project-initialization-mode)\n    - [Commandline project initialization mode](#commandline-project-initialization-mode)\n    - [CLI Commands reference](#cli-commands-reference)\n    - [Connecting to Database](#connecting-to-database)\n    - [Debugging with Xdebug](#debugging-with-xdebug)\n- [Authors Information](#authors-information)\n- [License](#license)\n\n## Prerequisites\n\nThis setup assumes you are running Docker on a computer with at least 6GB of allocated RAM, a dual-core, and an SSD hard drive. \n \nThis configuration has been tested on macOS. Linux based systems still require testing. Any testing are welcomed!\n\n## Installation\n\nTo install Mage2click toolset to your system, simply run command below.\n\n```bash\ncurl -sL raw.githubusercontent.com/mage2click/m2c/master/get | bash\n```\n\nOr shortened version of above.\n\n```bash\ncurl -sL get.m2c.run | bash\n```\n\n## What is included\n\n### Global system-wide services \n\nAfter toolset is installed, you will have the next tools available locally:\n\n**Traefik** - `https://traefik.m2c.test`\n\u003e Traefik is the leading open source reverse proxy and load balancer for HTTP and TCP-based applications that is easy, dynamic, automatic, fast, full-featured, production proven, provides metrics, and integrates with every major cluster technology. \u003ca href=\"https://containo.us/traefik\" target=\"_blank\"\u003ehttps://containo.us/traefik\u003c/a\u003e\n\u003e\n**Portainer** - `https://portainer.m2c.test`\n\u003e Portainer is a lightweight management toolset that allows you to easily build, manage and maintain Docker environments. Created by experts, Portainer is an opinionated toolset that captures years of experience to allow you to reliably and quickly create, operate and trouble-shoot your Docker environments. \u003ca href=\"https://portainer.io\" target=\"_blank\"\u003ehttps://portainer.io\u003c/a\u003e\n\n**Mailhog** - `https://mailhog.m2c.test`\n\u003e MailHog is an email testing tool for developers. Allows to view messages in the web UI, or retrieve them with the JSON API. Optionally allows to release messages to real SMTP servers for delivery. \u003ca href=\"https://github.com/mailhog/MailHog\" target=\"_blank\"\u003ehttps://github.com/mailhog/MailHog\u003c/a\u003e\n\n**Dnsmasq** - `https://dnsmasq.m2c.test`\n\u003e Dnsmasq provides network infrastructure for small networks: DNS, DHCP, router advertisement and network boot. It is designed to be lightweight and have a small footprint, suitable for resource constrained routers and firewalls. \u003ca href=\"http://www.thekelleys.org.uk/dnsmasq/doc.html\" target=\"_blank\"\u003ehttp://www.thekelleys.org.uk/dnsmasq/doc.html\u003c/a\u003e\n\nToolset local homepage with links to all tools listed above - `https://m2c.test`\n\n**All Docker images with services listed above required to be active for toolset functioning.**  \nThese services are configured to start automatically and should not be stopped. Without active Traefik and Dnsmasq, m2c backed projects can't work properly.  \n\nIf you don't want auto-start of these services, you can disable it with the command below.\n\n```bash\nm2c global autostart off\n```\n\n### Per-project services\n\nMost of services are available with version on your choice.\n\nAll Magento Docker projects initialized with: \n\n- Nginx\n- PHP-FPM\n- MariaDB\n- Redis\n- Xdebug\n\nAnd optionally available:\n\n- Varnish\n- Elasticsearch\n- phpMyadmin\n- RabbitMQ \n\n## Usage\n\nAfter toolset is installed on your system, you may use it to initialize new or existing magento projects.\n\nTo get a list of all commands and usage information, run command below.\n\n```bash\nm2c --help\n```\n\n### Interactive project initialization mode\n\nTo initialize project, open the desired directory with terminal and run\n\n```bash\nm2c init\n```\n\nThis command will launch project initialization in interactive mode. Simply follow the steps to configure the desired Magento Docker development environment.\n\n### Commandline project initialization mode\n\nIf at least one command argument is defined, automated setup will be started. All undefined parameters will be set with default values.\n\n```bash\nm2c init [parameters...] [flags...]\n```\n\nTo get a list of all available parameters and flags for project configuration, run \n\n```bash\nm2c init --help\n```\n\n### CLI Commands reference\n\n#### Project area commands \n\n```bash\nm2c add service \u003cservice\u003e [--help]\nm2c add domain \u003cdomain\u003e [--help]\nm2c add [--help]\n``` \nAdds optional service or extra domain to the project. Available optional services are: `elasticsearch`, `phpmyadmin`, `rabbitmq` and `varnish`. Run `m2c add --help` for command usage information.\n\n```bash\nm2c bash [--debug] [--root] ...\n```\nOpens the bash prompt on the project's php Docker service.  With `--debug` flag, the bash prompt will be opened on the project's xdebug Docker service. With `--root` flag, the root user will be used.\n\n```bash\nm2c cli [--debug] [--root] ...\n```\nRuns any CLI command without going into the bash prompt of the project's php service. With `--debug` flag, the CLI command will run on the project's xdebug service. With `--root` flag, the root user will be used.\n\n```bash\nm2c composer \u003ccommand\u003e [options] [arguments]\n```\nRuns [Composer](https://getcomposer.org) specific commands. Run `m2c composer` for command usage information.\n\n```bash\nm2c db [command] [--help]\n```\nDatabase related commands. Import/Export database commands and MySQL CLI tool access. Available optional services are: `export`, `import` and `mysql`. Run `m2c db --help` for command usage information.\n\n```bash\nm2c down\n```\nRemoves project Docker containers, volumes, and networks. Project sources on the host will be untouched. Don't forget to create a database backup before running this command.\n\n```bash\nm2c grunt\n```\nThe grunt command-line interface. Runs grunt specific commands at projects Docker container. Run `m2c grunt --help` for command usage information.\n\n```bash\nm2c info\n```\nPrints project info and Docker containers status.\n\n```bash\nm2c init\n```\nInitializes project in the current directory. Run `m2c init --help` for command usage information.\n\n```bash\nm2c m\n```\nMagento command-line tool interface. Runs `bin/magento` specific commands at projects Docker container.  Its is shortened alias of `m2c magento` command.\n\n```bash\nm2c mr\n```\nN98-magerun command-line tool interface. Runs `n98-magerun` specific commands at projects Docker container. It is shortened alias of `m2c magerun` command. Run `m2c mr --help` for command usage information.\n\n```bash\nm2c node \n```\nNode command-line tool interface. Runs `node` specific commands at projects Docker container. Run `m2c node --help` for command usage information.\n\n```bash\nm2c npm\n```\nNPM command-line tool interface. Runs `npm` specific commands at projects Docker container. Run `m2c npm --help` for command usage information.\n\n```bash\nm2c pwa \u003ccommand|script\u003e [--help]\n```\nPWA Studio related commands and wrapper for `yarn run` command inside of project directory. Run `m2c pwa --help` for command usage information.\n\n```bash\nm2c redis [options] [cmd [arg [arg ...]]]\n```\nRedis command-line tool interface. Runs `redis-cli` specific commands at projects Redis Docker container. Run `m2c redis --help` for command usage information.\n\n```bash\nm2c remove [service] [--help]\n```\nRemoves optional service from the project. Available optional services are: `elasticsearch`, `phpmyadmin`, `rabbitmq` and `varnish`. Run `m2c remove --help` for command usage information.\n\n```bash\nm2c restart [service [service ...]]\n```\nRestarts running project Docker services and starts all stopped ones. If services are explicitly specified, only specified will be restarted.\n\n```bash\nm2c share [region] [--help]\n```\nStarts sharing session over [ngrok](https://ngrok.com) secure tunnels. Command accepts an optional parameter to specify a region. Ex. `m2c share eu`. Available regions are `us`, `eu`, `ap`, `au`, `sa`, `jp`, and `in`. By default, region is `us`. For proper functioning of this command, required dependencies will be installed. Please, visit [https://github.com/shkoliar/magento-ngrok](https://github.com/shkoliar/magento-ngrok) and [https://github.com/shkoliar/docker-ngrok](https://github.com/shkoliar/docker-ngrok) for more information. Run `m2c share --help` for command usage information. \n\n```bash\nm2c sign [domain [domain ...]]\n```\nSigns SSL certificate for provided domain names. Only domains with .test TLD are allowed.  \n\n```bash\nm2c start [service [service ...]]\n```\nStarts stopped project services. If services are explicitly specified, only specified will be started.\n\n```bash\nm2c status\n```\nPrints project information and services status.\n\n```bash\nm2c stop [service [service ...]]\n```\nStops active project services. If services are explicitly specified, only specified will be stopped.\n\n```bash\nm2c sync [command] [--help]\n```\nControls the synchronization sessions between host and docker container.\n\n```bash\nm2c update\n```\nUpdates the project's docker configuration to the latest version.\n\n```bash\nm2c urn\n```\nGenerates Uniform Resource Names (URN) for PHPStorm and remaps paths for the host.\n\n```bash\nm2c varnish \u003ctool\u003e\n```\nRun varnish command line tools such as `varnishadm`, `varnishhist`, `varnishstat`, `varnishtop`, `varnishtest`, `varnishlog` etc.\n\n\n_Adding information about other CLI commands is in progress..._\n\n\n### Connecting to Database\n\nProject database can be easily accessed in a few ways - with help of optional phpMyAdmin service or with database managing applications by using a direct connection to the database via SSH tunnel.  \nRead the article at project's wiki page on how to connect to your project's database - \u003ca href=\"https://github.com/mage2click/m2c/wiki/Connecting-to-Database\" target=\"_blank\"\u003eConnecting to Database\u003c/a\u003e\n\n### Debugging with Xdebug\n\nMage2click toolset supports Magento debugging with Xdebug out of the box. Only a few configuration steps are required.  \nRead the article at project's wiki page on how to use Xdebug with PHPStorm - \u003ca href=\"https://github.com/mage2click/m2c/wiki/Debugging-with-Xdebug\" target=\"_blank\"\u003eDebugging with Xdebug\u003c/a\u003e\n\n## Authors Information\n\n### Dmitry Shkoliar\n\u003ca href=\"https://www.zend.com/en/yellow-pages/ZEND026786\" target=\"_blank\"\u003eZend Certified PHP Engineer\u003c/a\u003e, Magento2, Docker, PWA, Varnish, JS, HTML5, Mobile, iOS, Android  \nGithub: \u003ca href=\"https://github.com/shkoliar\" target=\"_blank\"\u003e@shkoliar\u003c/a\u003e  \nTwitter: \u003ca href=\"https://twitter.com/shkoliar\" target=\"_blank\"\u003e@shkoliar\u003c/a\u003e  \nWebsite: \u003ca href=\"https://shkoliar.com\" target=\"_blank\"\u003eshkoliar.com\u003c/a\u003e  \n\n## License\n\n[MIT](LICENSE)\n","funding_links":[],"categories":["Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmage2click%2Fm2c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmage2click%2Fm2c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmage2click%2Fm2c/lists"}