Workflow
March 3, 2026 · View on GitHub
The following guide shows you the normal development workflow using Madock.
IMPORTANT: After changing any option in the following files, you should run madock rebuild
madock/projects/config.xml
madock/projects/{project name}/env.xml
1. Start containers
madock start
2. Composer commands
madock composer <command>
3. Magento commands
madock magento <command>
4. Working on frontend
madock node <command>
madock node grunt exec:<theme>
madock node grunt watch
IMPORTANT: For the Chrome browser, you can download the LiveReload plugin specifically for Madock from the link Google Chrome plugin. Then install it and enable it for the site you need.
NOTE: You might also need to disable your browser cache. For example in Chrome:
Open inspector > Settings > Network > Disable cache (while DevTools is open)
5. xdebug
-
Enable xdebug
madock debug:enable -
Configure xdebug in PHPStorm (Only first time)
-
Disable xdebug when finish
madock debug:disable
6. SSL certificates
If you want to manually add an ssl certificate to the browser, you can find it at [path to Madock folder]/aruntime/ctx/madockCA.pem
If the SSL certificates do not work, run the madock ssl:rebuild command and restart your browser.
7. auth.json
If your project does not have an auth.json file, then when executing composer commands, the global auth.json file will be used.
8. Multistores and website codes
Magento uses "base" as the store code by default.
But if you are using multistore, then you need to specify the code of each website along with the website host in the madock configuration. For example: madock config:set --name=HOSTS --value="website1.test:base website2.test:websitecode". You can see site codes in the database table store_website. Or by querying the database SELECT * FROM store_website.
9. help
madock help
This command shows you the following items:
bashConnect into container using bash
--service-name, -s Name of container. Optional. Default container: php. For example: php, node, db, db2, nginx
--user, -u User
--shell Shell. Example: bash, sh. Default: bash
-
c:fCleaning up static and generated files -
cliExecute any commands inside php container. If you want to run several commands you can cover them in the quotes. For example:madock cli "php bin/magento setup:upgrade && php bin/magento setup:di:compile" -
cloudExecuting commands to work with Magento Cloud. Also, can be used the long command: magento-cloud) -
composerExecute composer inside php container. For example:madock composer install -
compressCompress a project to archive -
config:cache:cleanClearing internal Madock cache -
c:c:cThe short alias ofconfig:cache:cleancommand -
config:listList all project environment settings
--json, -j Output in JSON format
config:setSet a new value for parameter. For example:madock config:set --name=HOSTS --value="website1.test:base website2.test:websitecode"
--name, -n Parameter name
--value, -v Parameter value
-
cron:enableEnable cron -
cron:disableDisable cron -
db:importImport database. For example:madock db:import path/to/dump.sql.gz
[file] Path to database file (optional). If not specified, interactive file selector is shown
-f Force mode
--service, -s DB container name. Optional. Default container: db. Example: db2
db:exportExport database. For example:madock db:export --name=fromdevsite
--name, -n Name of the DB export file
--service-name, -s DB container name. Optional. Default container: db. Example: db2
--ignore-table, -i Ignore the table when exporting. The specified table will not be included in the backup file. To specify multiple tables, specify this option multiple times.
db:executeordb:eExecute SQL query in the database container. For example:madock db:e "SELECT 1"
[query] SQL query to execute (required)
--service, -s DB container name. Optional. Default container: db. Example: db2
--user, -u User
db:infoInformation about credentials and remote host and port
--json, -j Output in JSON format
-
debug:enableEnable xdebug -
debug:disableDisable xdebug -
debug:profile:enableEnable xdebug profiling -
debug:profile:disableDisable xdebug profiling -
diffGenerate code diffs between two versions or paths for a platform. For example:madock diff --platform magento --old 2.4.8-p1 --new 2.4.8-p2 --path diffs
--platform Target platform (currently supports: magento)
--old, -o OLD version or path
--new, -n NEW version or path
--path, -p Public output directory relative to site root (default: diffs)
-
infoShow information about third-parties modules (name, current version, latest version, status) -
info:portsShow allocated ports for the current project. Supports --json (-j) output -
installInstall Magento, Shopware, etc. -
helpDisplays help for commands -
logsView logs of the container. For example:madock logs php
[name of container] Container name. Optional. Default container: php. Example: php
-
magentoormExecute Magento command inside php container. For example:madock m setup:upgrade -
mftfExecute MFTF command inside php container. For example:madock mftf generate:tests -
mftf:initInit MFTF configuration. For example:madock mftf:init -
n98Execute n98 command inside php container. For example:madock n98 sys:info -
nodeExecute NodeJs command inside php container. For example:madock node grunt exec:<theme> -
openOpen project in browser
--service, -s Open a specific project service in the browser. For example: phpmyadmin
patch:createCreate patch. The patch can be used with the composer plugin cweagans/composer-patches. For example:madock patch:create --file=vendor/magento/module-analytics/Cron/CollectData.php --name=collect-data-cron.patch --title="Collect data cron patch" --force
--file Path of changed file. For example: vendor/magento/module-analytics/Cron/CollectData.php
--name, -n Name of the patch file
--title, -t Title of the patch
--force, -f Replace patch if it already exists
-
prestashoporpsExecute PrestaShop command inside php container. For example:madock ps about -
project:cloneClone project. For example:madock project:clone --name=project_name
--name, -n Name of the new project
-
project:removeRemove project (project folder, madock project configuration, volumes, images, containers) -
proxy:startStart a proxy server -
proxy:stopStop a proxy server -
proxy:restartRestart a proxy server -
proxy:rebuildRebuild a proxy server -
proxy:reloadGracefully reload nginx configuration without downtime -
proxy:prunePrune a proxy server -
pruneStop and delete running project containers. For example:madock prune --with-volumes
--with-volumes, -v Remove volumes, too
-
rebuildRecreation of all containers in the project. All containers are re-created and the images from the Dockerfile are rebuilt -
remote:sync:mediaSynchronization media files from remote host. For example:madock remote:sync:media --images-only --compress
--images-only, -i Synchronization images only
--compress, -c Apply lossy compression. Images will have weight equals 30% of original
--ssh-type, -s SSH type (dev, stage, prod)
remote:sync:dbCreate and download dump of DB from remote host. For example:madock remote:sync:db --name=local
--name, -n Name of the DB export file
--ignore-table, -i Ignore the table when exporting. The specified table will not be included in the backup file. To specify multiple tables, specify this option multiple times.
--ssh-type, -s SSH type (dev, stage, prod)
--db-host (optional) DB host
--db-port (optional) DB port
--db-name (optional) DB name
--db-user (optional) DB user
--db-password (optional) DB password
remote:sync:fileCreate and download dump of DB from remote host
--path Path to file on server (from Magento root)
--ssh-type, -s SSH type (dev, stage, prod)
-
restartRestarting all containers and services. Stop all containers and start them again -
scope:addAdd and activate a new config scope
[scope name] Scope name
scope:listShow all config scopes
--json, -j Output in JSON format
scope:setSet config scope
[scope name] Scope name
service:listShow all services
--json, -j Output in JSON format
service:enableEnable the service. For example:madock service:enable phpmyadmin
[service name] Service name
--global, -g Enable the service globally
service:disableDisable the service. For example:madock service:disable phpmyadmin
[service name] Service name
--global, -g Disable the service globally
setupInitial the project setup
--download, -d Download the specific Magento, Shopware, etc. to the container
--install, -i Install Magento, Shopware, etc. from the source code
--sample-data, -s Install Sample Data for Magento, Shopware, etc.
--yes, -y Skip confirmation prompts
--preset Use a preset configuration (e.g., 'magento-247', 'magento-246', 'shopware-65')
--platform Platform (magento2, shopify, custom, etc.)
--platform-edition Platform edition (community or enterprise for Magento 2)
--platform-version Platform version
--php PHP version
--db DB version
--composer Composer version
--search-engine Search Engine
--search-engine-version Search Engine version
--redis Redis version
--valkey Valkey version
--rabbitmq RabbitMQ version
--hosts Hosts
--nodejs Node.js version
--yarn Yarn version
setup:envGenerate app/etc/env.php
-f Force re-create the file
--host, -h Default host
-
shopifyorsyExecute the Shopify command inside the php container. For example:madock shopify yarn create @shopify/app --template php -
shopify:weborsy:wExecute the Shopify command inside the php container in 'web' folder. For example:madock shopify:web composer install -
shopify:web:frontendorsy:w:fExecute the Shopify command inside the php container in 'web/frontend' folder. For example:madock shopify:web:frontend SHOPIFY_API_KEY=REPLACE_ME yarn build -
shopwareorswExecute the Shopware command inside the php container. For example:madock shopware es:index -
snapshot:createTo create a snapshot of the project. The snapshot will include databases and project files
--name, -n Name of the snapshot
-
snapshot:restoreTo restore a project of the snapshot. The databases and project files will be restored -
ssl:rebuildRebuild SSL Certificates -
startStarting all containers and services -
statusDisplay the status of the project
--json, -j Output in JSON format
-
stopStopping all containers and services -
uncompressUncompress the project from archive