Makefile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. SHELL := /bin/bash
  2. args = `arg="$(filter-out $(firstword $(MAKECMDGOALS)),$(MAKECMDGOALS))" && echo $${arg:-${1}}`
  3. green = $(shell printf "\e[32;01m$1\e[0m")
  4. yellow = $(shell printf "\e[33;01m$1\e[0m")
  5. red = $(shell printf "\e[33;31m$1\e[0m")
  6. format = $(shell printf "%-40s %s" "$(call green,bin/$1)" $2)
  7. comma:= ,
  8. .DEFAULT_GOAL:=help
  9. %:
  10. @:
  11. help:
  12. @echo ""
  13. @echo "$(call yellow,Use the following CLI commands:)"
  14. @echo "$(call red,===============================)"
  15. @echo "$(call format,bash,'Drop into the bash prompt of your Docker container.')"
  16. @echo "$(call format,cache-clean,'Access the cache-clean CLI.')"
  17. @echo "$(call format,cli,'Run any CLI command without going into the bash prompt.')"
  18. @echo "$(call format,clinotty,'Run any CLI command with no TTY.')"
  19. @echo "$(call format,cliq,'Run any CLI command but pipe all output to /dev/null.')"
  20. @echo "$(call format,composer,'Run the composer binary.')"
  21. @echo "$(call format,copyfromcontainer,'Copy folders or files from container to host.')"
  22. @echo "$(call format,copytocontainer,'Copy folders or files from host to container.')"
  23. @echo "$(call format,cron,'Start or stop the cron service.')"
  24. @echo "$(call format,dev-urn-catalog-generate,'Generate URNs for PHPStorm and remap paths to local host.')"
  25. @echo "$(call format,devconsole,'Alias for n98-magerun2 dev:console.')"
  26. @echo "$(call format,devtools-cli-check,'Check & install the CLI devtools if missing from system.')"
  27. @echo "$(call format,download,'Download & extract specific Magento version to the src directory.')"
  28. @echo "$(call format,fixowns,'This will fix filesystem ownerships within the container.')"
  29. @echo "$(call format,fixperms,'This will fix filesystem permissions within the container.')"
  30. @echo "$(call format,grunt,'Run the grunt binary.')"
  31. @echo "$(call format,magento,'Run the Magento CLI.')"
  32. @echo "$(call format,mftf,'Run the Magento MFTF.')"
  33. @echo "$(call format,mysql,'Run the MySQL CLI with database config from env/db.env.')"
  34. @echo "$(call format,mysqldump,'Backup the Magento database.')"
  35. @echo "$(call format,n98-magerun2,'Access the n98-magerun2 CLI.')"
  36. @echo "$(call format,node,'Run the node binary.')"
  37. @echo "$(call format,npm,'Run the npm binary.')"
  38. @echo "$(call format,pwa-studio,'(BETA) Start the PWA Studio server.')"
  39. @echo "$(call format,redis,'Run a command from the redis container.')"
  40. @echo "$(call format,remove,'Remove all containers.')"
  41. @echo "$(call format,removeall,'Remove all containers$(comma) networks$(comma) volumes and images.')"
  42. @echo "$(call format,removevolumes,'Remove all volumes.')"
  43. @echo "$(call format,restart,'Stop and then start all containers.')"
  44. @echo "$(call format,root,'Run any CLI command as root without going into the bash prompt.')"
  45. @echo "$(call format,rootnotty,'Run any CLI command as root with no TTY.')"
  46. @echo "$(call format,setup,'Run the Magento setup process$(comma) with optional domain name.')"
  47. @echo "$(call format,setup-composer-auth,'Setup authentication credentials for Composer.')"
  48. @echo "$(call format,setup-domain,'Setup Magento domain name.')"
  49. @echo "$(call format,setup-grunt,'Install and configure Grunt JavaScript task runner.')"
  50. @echo "$(call format,setup-pwa-studio,'(BETA) Install PWA Studio.')"
  51. @echo "$(call format,setup-ssl,'Generate an SSL certificate for one or more domains.')"
  52. @echo "$(call format,setup-ssl-ca,'Generate a certificate authority and copy it to the host.')"
  53. @echo "$(call format,start,'Start all containers.')"
  54. @echo "$(call format,status,'Check the container status.')"
  55. @echo "$(call format,stop,'Stop all containers.')"
  56. @echo "$(call format,update,'Update your project to the latest version of docker-magento.')"
  57. @echo "$(call format,xdebug,'Disable or enable Xdebug.')"
  58. bash:
  59. @./bin/bash
  60. cache-clean:
  61. @./bin/cache-clean $(call args)
  62. cli:
  63. @./bin/cli $(call args)
  64. clinotty:
  65. @./bin/clinotty $(call args)
  66. cliq:
  67. @./bin/cliq $(call args)
  68. composer:
  69. @./bin/composer $(call args)
  70. copyfromcontainer:
  71. @./bin/copyfromcontainer $(call args)
  72. copytocontainer:
  73. @./bin/copytocontainer $(call args)
  74. cron:
  75. @./bin/cron $(call args)
  76. dev-urn-catalog-generate:
  77. @./bin/dev-urn-catalog-generate
  78. devconsole:
  79. @./bin/devconsole
  80. devtools-cli-check:
  81. @./bin/devtools-cli-check
  82. download:
  83. @./bin/download $(call args)
  84. fixowns:
  85. @./bin/fixowns $(call args)
  86. fixperms:
  87. @./bin/fixperms $(call args)
  88. grunt:
  89. @./bin/grunt $(call args)
  90. magento:
  91. @./bin/magento $(call args)
  92. mftf:
  93. @./bin/mftf $(call args)
  94. mysql:
  95. @./bin/mysql $(call args)
  96. mysqldump:
  97. @./bin/mysqldump $(call args)
  98. n98-magerun2:
  99. @./bin/n98-magerun2 $(call args)
  100. node:
  101. @./bin/node $(call args)
  102. npm:
  103. @./bin/npm $(call args)
  104. pwa-studio:
  105. @./bin/pwa-studio
  106. redis:
  107. @./bin/redis $(call args)
  108. remove:
  109. @./bin/remove
  110. removeall:
  111. @./bin/removeall
  112. removevolumes:
  113. @./bin/removevolumes
  114. restart:
  115. @./bin/restart $(call args)
  116. root:
  117. @./bin/root $(call args)
  118. rootnotty:
  119. @./bin/rootnotty $(call args)
  120. setup:
  121. @./bin/setup $(call args)
  122. setup-composer-auth:
  123. @./bin/setup-composer-auth
  124. setup-domain:
  125. @./bin/setup-domain $(call args)
  126. setup-grunt:
  127. @./bin/setup-grunt
  128. setup-pwa-studio:
  129. @./bin/setup-pwa-studio $(call args)
  130. setup-ssl:
  131. @./bin/setup-ssl $(call args)
  132. setup-ssl-ca:
  133. @./bin/setup-ssl-ca
  134. start:
  135. @./bin/start $(call args)
  136. status:
  137. @./bin/status
  138. stop:
  139. @./bin/stop $(call args)
  140. update:
  141. @./bin/update
  142. xdebug:
  143. @./bin/xdebug $(call args)