2
0

Makefile 5.3 KB

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