Makefile 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. SHELL := /usr/bin/env 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,docker-stats,'Display status for CPU$(comma) memory usage$(comma) and memory limit of currently-running Docker containers.')"
  28. @echo "$(call format,download,'Download & extract specific Magento version to the src directory.')"
  29. @echo "$(call format,fixowns,'This will fix filesystem ownerships within the container.')"
  30. @echo "$(call format,fixperms,'This will fix filesystem permissions within the container.')"
  31. @echo "$(call format,grunt,'Run the grunt binary.')"
  32. @echo "$(call format,log,'Monitor the Magento log files. Pass no params to tail all files.')"
  33. @echo "$(call format,magento,'Run the Magento CLI.')"
  34. @echo "$(call format,mftf,'Run the Magento MFTF.')"
  35. @echo "$(call format,mysql,'Run the MySQL CLI with database config from env/db.env.')"
  36. @echo "$(call format,mysqldump,'Backup the Magento database.')"
  37. @echo "$(call format,n98-magerun2,'Access the n98-magerun2 CLI.')"
  38. @echo "$(call format,node,'Run the node binary.')"
  39. @echo "$(call format,npm,'Run the npm binary.')"
  40. @echo "$(call format,pwa-studio,'(BETA) Start the PWA Studio server.')"
  41. @echo "$(call format,redis,'Run a command from the redis container.')"
  42. @echo "$(call format,remove,'Remove all containers.')"
  43. @echo "$(call format,removeall,'Remove all containers$(comma) networks$(comma) volumes and images.')"
  44. @echo "$(call format,removevolumes,'Remove all volumes.')"
  45. @echo "$(call format,restart,'Stop and then start all containers.')"
  46. @echo "$(call format,root,'Run any CLI command as root without going into the bash prompt.')"
  47. @echo "$(call format,rootnotty,'Run any CLI command as root with no TTY.')"
  48. @echo "$(call format,setup,'Run the Magento setup process$(comma) with optional domain name.')"
  49. @echo "$(call format,setup-composer-auth,'Setup authentication credentials for Composer.')"
  50. @echo "$(call format,setup-domain,'Setup Magento domain name.')"
  51. @echo "$(call format,setup-grunt,'Install and configure Grunt JavaScript task runner.')"
  52. @echo "$(call format,setup-pwa-studio,'(BETA) Install PWA Studio.')"
  53. @echo "$(call format,setup-ssl,'Generate an SSL certificate for one or more domains.')"
  54. @echo "$(call format,setup-ssl-ca,'Generate a certificate authority and copy it to the host.')"
  55. @echo "$(call format,spx,'Disable or enable output compression to enable or disbale SPX.')"
  56. @echo "$(call format,start,'Start all containers.')"
  57. @echo "$(call format,status,'Check the container status.')"
  58. @echo "$(call format,stop,'Stop all containers.')"
  59. @echo "$(call format,update,'Update your project to the latest version of docker-magento.')"
  60. @echo "$(call format,xdebug,'Disable or enable Xdebug.')"
  61. bash:
  62. @./usr/bin/env bash
  63. cache-clean:
  64. @./bin/cache-clean $(call args)
  65. cli:
  66. @./bin/cli $(call args)
  67. clinotty:
  68. @./bin/clinotty $(call args)
  69. cliq:
  70. @./bin/cliq $(call args)
  71. composer:
  72. @./bin/composer $(call args)
  73. copyfromcontainer:
  74. @./bin/copyfromcontainer $(call args)
  75. copytocontainer:
  76. @./bin/copytocontainer $(call args)
  77. cron:
  78. @./bin/cron $(call args)
  79. dev-urn-catalog-generate:
  80. @./bin/dev-urn-catalog-generate
  81. devconsole:
  82. @./bin/devconsole
  83. devtools-cli-check:
  84. @./bin/devtools-cli-check
  85. download:
  86. @./bin/download $(call args)
  87. fixowns:
  88. @./bin/fixowns $(call args)
  89. fixperms:
  90. @./bin/fixperms $(call args)
  91. grunt:
  92. @./bin/grunt $(call args)
  93. magento:
  94. @./bin/magento $(call args)
  95. mftf:
  96. @./bin/mftf $(call args)
  97. mysql:
  98. @./bin/mysql $(call args)
  99. mysqldump:
  100. @./bin/mysqldump $(call args)
  101. n98-magerun2:
  102. @./bin/n98-magerun2 $(call args)
  103. node:
  104. @./bin/node $(call args)
  105. npm:
  106. @./bin/npm $(call args)
  107. pwa-studio:
  108. @./bin/pwa-studio
  109. redis:
  110. @./bin/redis $(call args)
  111. remove:
  112. @./bin/remove
  113. removeall:
  114. @./bin/removeall
  115. removevolumes:
  116. @./bin/removevolumes
  117. restart:
  118. @./bin/restart $(call args)
  119. root:
  120. @./bin/root $(call args)
  121. rootnotty:
  122. @./bin/rootnotty $(call args)
  123. setup:
  124. @./bin/setup $(call args)
  125. setup-composer-auth:
  126. @./bin/setup-composer-auth
  127. setup-domain:
  128. @./bin/setup-domain $(call args)
  129. setup-grunt:
  130. @./bin/setup-grunt
  131. setup-pwa-studio:
  132. @./bin/setup-pwa-studio $(call args)
  133. setup-ssl:
  134. @./bin/setup-ssl $(call args)
  135. setup-ssl-ca:
  136. @./bin/setup-ssl-ca
  137. start:
  138. @./bin/start $(call args)
  139. status:
  140. @./bin/status
  141. stop:
  142. @./bin/stop $(call args)
  143. update:
  144. @./bin/update
  145. xdebug:
  146. @./bin/xdebug $(call args)