Selaa lähdekoodia

Merge pull request #1096 from YevhenZvieriev/fix/description-of-scripts

Add descriptions for scripts in the README.md file
Mark Shust 1 vuosi sitten
vanhempi
commit
a4ce4e8d38
2 muutettua tiedostoa jossa 86 lisäystä ja 10 poistoa
  1. 9 3
      README.md
  2. 77 7
      compose/Makefile

+ 9 - 3
README.md

@@ -277,23 +277,26 @@ It is recommended to keep your root docker config files in one repository, and y
 - `bin/clinotty`: Run any CLI command with no TTY. Ex. `bin/clinotty chmod u+x bin/magento`
 - `bin/cliq`: The same as `bin/cli`, but pipes all output to `/dev/null`. Useful for a quiet CLI, or implementing long-running processes.
 - `bin/composer`: Run the composer binary. Ex. `bin/composer install`
+- `bin/configure-linux`: Adds the Docker container's IP address to the system's `/etc/hosts` file if it's not already present. Additionally, it prompts the user to open port 9003 for Xdebug if desired.
 - `bin/copyfromcontainer`: Copy folders or files from container to host. Ex. `bin/copyfromcontainer vendor`
 - `bin/copytocontainer`: Copy folders or files from host to container. Ex. `bin/copytocontainer --all`
 - `bin/create-user`: Create either an admin user or customer account.
 - `bin/cron`: Start or stop the cron service. Ex. `bin/cron start`
+- `bin/debug-cli`: Enable Xdebug for bin/magento, with an optional argument of the IDE key. Defaults to PHPSTORM Ex. `bin/debug-cli enable PHPSTORM`
+- `bin/deploy`: Runs the standard Magento deployment process commands. Pass extra locales besides `en_US` via an optional argument. Ex. `bin/deploy nl_NL`
+- `bin/dev-test-run`: Facilitates running PHPUnit tests for a specified test type (e.g., integration). It expects the test type as the first argument and passes any additional arguments to PHPUnit, allowing for customization of test runs. If no test type is provided, it prompts the user to specify one before exiting.
 - `bin/dev-urn-catalog-generate`: Generate URN's for PhpStorm and remap paths to local host. Restart PhpStorm after running this command.
 - `bin/devconsole`: Alias for `bin/n98-magerun2 dev:console`
 - `bin/docker-compose`: Support V1 (`docker-compose`) and V2 (`docker compose`) docker compose command, and use custom configuration files, such as `compose.yml` and `compose.dev.yml`
+- `bin/docker-stats`: Display container name and container ID, status for CPU, memory usage(in MiB and %), and memory limit of currently-running Docker containers.
 - `bin/download`: Download specific Magento version from Composer to the container, with optional arguments of the version (2.4.6-p4 [default]) and type ("community" [default], "enterprise", or "mageos"). Ex. `bin/download 2.4.6-p4 enterprise`
-- `bin/debug-cli`: Enable Xdebug for bin/magento, with an optional argument of the IDE key. Defaults to PHPSTORM Ex. `bin/debug-cli enable PHPSTORM`
-- `bin/deploy`: Runs the standard Magento deployment process commands. Pass extra locales besides `en_US` via an optional argument. Ex. `bin/deploy nl_NL`
-- `bin/docker-stats`: Display status for CPU, memory usage, and memory limit of currently-running Docker containers.
 - `bin/fixowns`: This will fix filesystem ownerships within the container.
 - `bin/fixperms`: This will fix filesystem permissions within the container.
 - `bin/grunt`: Run the grunt binary. Ex. `bin/grunt exec`
 - `bin/install-php-extensions`: Install PHP extension in the container. Ex. `bin/install-php-extensions sourceguardian`
 - `bin/log`: Monitor the Magento log files. Pass no params to tail all files. Ex. `bin/log debug.log`
 - `bin/magento`: Run the Magento CLI. Ex: `bin/magento cache:flush`
+- `bin/magento-version`: Determine the Magento version installed in the current environment.
 - `bin/mftf`: Run the Magento MFTF. Ex: `bin/mftf build:project`
 - `bin/mysql`: Run the MySQL CLI with database config from `env/db.env`. Ex. `bin/mysql -e "EXPLAIN core_config_data"` or`bin/mysql < magento.sql`
 - `bin/mysqldump`: Backup the Magento database. Ex. `bin/mysqldump > magento.sql`
@@ -307,6 +310,7 @@ It is recommended to keep your root docker config files in one repository, and y
 - `bin/redis`: Run a command from the redis container. Ex. `bin/redis redis-cli monitor`
 - `bin/remove`: Remove all containers.
 - `bin/removeall`: Remove all containers, networks, volumes, and images, calling `bin/stopall` before doing so.
+- `bin/removenetwork`: Remove a network associated with the current directory's name.
 - `bin/removevolumes`: Remove all volumes.
 - `bin/restart`: Stop and then start all containers.
 - `bin/root`: Run any CLI command as root without going into the bash prompt. Ex `bin/root apt-get install nano`
@@ -315,6 +319,8 @@ It is recommended to keep your root docker config files in one repository, and y
 - `bin/setup-composer-auth`: Setup authentication credentials for Composer.
 - `bin/setup-domain`: Setup Magento domain name. Ex: `bin/setup-domain magento.test`
 - `bin/setup-grunt`: Install and configure Grunt JavaScript task runner to compile .less files
+- `bin/setup-install`: Automates the installation process for a Magento instance.
+- `bin/setup-integration-tests`: Script to set up integration tests.
 - `bin/setup-pwa-studio`: (BETA) Install PWA Studio (requires NodeJS and Yarn to be installed on the host machine). Pass in your base site domain, otherwise the default `master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud` will be used. Ex: `bin/setup-pwa-studio magento.test`.
 - `bin/setup-pwa-studio-sampledata`: This script makes it easier to install Venia sample data. Pass in your base site domain, otherwise the default `master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud` will be used. Ex: `bin/setup-pwa-studio-sampledata magento.test`.
 - `bin/setup-ssl`: Generate an SSL certificate for one or more domains. Ex. `bin/setup-ssl magento.test foo.test`

+ 77 - 7
compose/Makefile

@@ -19,36 +19,47 @@ help:
 	@echo ""
 	@echo "$(call yellow,Use the following CLI commands:)"
 	@echo "$(call red,===============================)"
+	@echo "$(call format,analyse,'Run `phpstan analyse` within the container to statically analyse code, passing in directory to analyse.')"
 	@echo "$(call format,bash,'Drop into the bash prompt of your Docker container.')"
 	@echo "$(call format,cache-clean,'Access the cache-clean CLI.')"
 	@echo "$(call format,cli,'Run any CLI command without going into the bash prompt.')"
 	@echo "$(call format,clinotty,'Run any CLI command with no TTY.')"
 	@echo "$(call format,cliq,'Run any CLI command but pipe all output to /dev/null.')"
 	@echo "$(call format,composer,'Run the composer binary.')"
+	@echo "$(call format,configure-linux`,'Adds the Docker container IP address to /etc/hosts if not already present. Optionally enables port 9003 for Xdebug')"
 	@echo "$(call format,copyfromcontainer,'Copy folders or files from container to host.')"
 	@echo "$(call format,copytocontainer,'Copy folders or files from host to container.')"
 	@echo "$(call format,create-user,'Create either an admin user or customer account.')"
 	@echo "$(call format,cron,'Start or stop the cron service.')"
+	@echo "$(call format,debug-cli,'Enable Xdebug for bin/magento, with an optional argument of the IDE key. Defaults to PHPSTORM.')"
+	@echo "$(call format,deploy,'Runs the standard Magento deployment process commands. Pass extra locales besides `en_US` via an optional argument.')"
+	@echo "$(call format,dev-test-run,' Facilitates running PHPUnit tests for a specified test type.')"
 	@echo "$(call format,dev-urn-catalog-generate,'Generate URNs for PHPStorm and remap paths to local host.')"
 	@echo "$(call format,devconsole,'Alias for n98-magerun2 dev:console.')"
-	@echo "$(call format,devtools-cli-check,'Check & install the CLI devtools if missing from system.')"
+	@echo "$(call format,docker-compose,'Support V1 (`docker-compose`) and V2 (`docker compose`) docker compose command, and use custom configuration files.')"
 	@echo "$(call format,docker-stats,'Display status for CPU$(comma) memory usage$(comma) and memory limit of currently-running Docker containers.')"
 	@echo "$(call format,download,'Download & extract specific Magento version to the src directory.')"
 	@echo "$(call format,fixowns,'This will fix filesystem ownerships within the container.')"
 	@echo "$(call format,fixperms,'This will fix filesystem permissions within the container.')"
 	@echo "$(call format,grunt,'Run the grunt binary.')"
+	@echo "$(call format,install-php-extensions,'Install PHP extension in the container.')"
 	@echo "$(call format,log,'Monitor the Magento log files. Pass no params to tail all files.')"
 	@echo "$(call format,magento,'Run the Magento CLI.')"
+	@echo "$(call format,magento-version,'Determine the Magento version installed in the current environment..')"
 	@echo "$(call format,mftf,'Run the Magento MFTF.')"
 	@echo "$(call format,mysql,'Run the MySQL CLI with database config from env/db.env.')"
 	@echo "$(call format,mysqldump,'Backup the Magento database.')"
 	@echo "$(call format,n98-magerun2,'Access the n98-magerun2 CLI.')"
 	@echo "$(call format,node,'Run the node binary.')"
 	@echo "$(call format,npm,'Run the npm binary.')"
+	@echo "$(call format,phpcbf,'Auto-fix PHP_CodeSniffer errors with Magento2 options.')"
+	@echo "$(call format,phpcs,'Run PHP_CodeSniffer with Magento2 options.')"
+	@echo "$(call format,phpcs-json-report,'Run PHP_CodeSniffer with Magento2 options and save to `report.json` file.')"
 	@echo "$(call format,pwa-studio,'(BETA) Start the PWA Studio server.')"
 	@echo "$(call format,redis,'Run a command from the redis container.')"
 	@echo "$(call format,remove,'Remove all containers.')"
 	@echo "$(call format,removeall,'Remove all containers$(comma) networks$(comma) volumes and images.')"
+	@echo "$(call format,removenetwork,'Remove a network associated with the current directory name.')"
 	@echo "$(call format,removevolumes,'Remove all volumes.')"
 	@echo "$(call format,restart,'Stop and then start all containers.')"
 	@echo "$(call format,root,'Run any CLI command as root without going into the bash prompt.')"
@@ -57,16 +68,24 @@ help:
 	@echo "$(call format,setup-composer-auth,'Setup authentication credentials for Composer.')"
 	@echo "$(call format,setup-domain,'Setup Magento domain name.')"
 	@echo "$(call format,setup-grunt,'Install and configure Grunt JavaScript task runner.')"
+	@echo "$(call format,setup-install,'Automates the installation process for a Magento instance.')"
+	@echo "$(call format,setup-integration-tests,'Script to set up integration tests.')"
 	@echo "$(call format,setup-pwa-studio,'(BETA) Install PWA Studio.')"
+	@echo "$(call format,setup-pwa-studio-sampledata,'This script makes it easier to install Venia sample data.')"
 	@echo "$(call format,setup-ssl,'Generate an SSL certificate for one or more domains.')"
 	@echo "$(call format,setup-ssl-ca,'Generate a certificate authority and copy it to the host.')"
 	@echo "$(call format,spx,'Disable or enable output compression to enable or disbale SPX.')"
 	@echo "$(call format,start,'Start all containers.')"
 	@echo "$(call format,status,'Check the container status.')"
-	@echo "$(call format,stop,'Stop all containers.')"
+	@echo "$(call format,stop,'Stop all project containers.')"
+	@echo "$(call format,stopall,'Stop all docker running containers.')"
 	@echo "$(call format,update,'Update your project to the latest version of docker-magento.')"
 	@echo "$(call format,xdebug,'Disable or enable Xdebug.')"
 
+
+analyse:
+	@./bin/analyse $(call args)
+
 bash:
 	@./usr/bin/env bash
 
@@ -85,6 +104,9 @@ cliq:
 composer:
 	@./bin/composer $(call args)
 
+configure-linux:
+	@./bin/configure-linux
+
 copyfromcontainer:
 	@./bin/copyfromcontainer $(call args)
 
@@ -94,15 +116,27 @@ copytocontainer:
 cron:
 	@./bin/cron $(call args)
 
+debug-cli:
+	@./bin/debug-cli $(call args)
+	
+deploy:
+	@./bin/deploy $(call args)
+	
+dev-test-run:
+	@./bin/dev-test-run
+	
 dev-urn-catalog-generate:
 	@./bin/dev-urn-catalog-generate
 
 devconsole:
 	@./bin/devconsole
 
-devtools-cli-check:
-	@./bin/devtools-cli-check
-
+docker-compose:
+	@./bin/docker-compose
+	
+docker-stats:
+	@./bin/docker-stats
+	
 download:
 	@./bin/download $(call args)
 
@@ -111,12 +145,21 @@ fixowns:
 
 fixperms:
 	@./bin/fixperms $(call args)
-
+	
 grunt:
 	@./bin/grunt $(call args)
 
+install-php-extensions:
+	@./bin/install-php-extensions $(call args)
+	
+log:
+	@./bin/log $(call args)
+	
 magento:
 	@./bin/magento $(call args)
+	
+magento-version:
+	@./bin/magento-version
 
 mftf:
 	@./bin/mftf $(call args)
@@ -135,6 +178,15 @@ node:
 
 npm:
 	@./bin/npm $(call args)
+	
+phpcbf:
+	@./bin/phpcbf $(call args)
+	
+phpcs:
+	@./bin/phpcs $(call args)
+	
+phpcs-json-report:
+	@./bin/phpcs-json-report $(call args)
 
 pwa-studio:
 	@./bin/pwa-studio
@@ -148,6 +200,9 @@ remove:
 removeall:
 	@./bin/removeall
 
+removenetwork:
+	@./bin/removenetwork
+	
 removevolumes:
 	@./bin/removevolumes
 
@@ -168,19 +223,31 @@ setup-composer-auth:
 
 setup-domain:
 	@./bin/setup-domain $(call args)
-
+	
 setup-grunt:
 	@./bin/setup-grunt
+	
+setup-install:
+	@./bin/setup-install $(call args)
 
+setup-integration-tests:
+	@./bin/setup-integration-tests
+	
 setup-pwa-studio:
 	@./bin/setup-pwa-studio $(call args)
 
+setup-pwa-studio-sampledata:
+	@./bin/setup-pwa-studio-sampledata $(call args)
+	
 setup-ssl:
 	@./bin/setup-ssl $(call args)
 
 setup-ssl-ca:
 	@./bin/setup-ssl-ca
 
+spx:
+	@./bin/spx $(call args)
+	
 start:
 	@./bin/start $(call args)
 
@@ -190,6 +257,9 @@ status:
 stop:
 	@./bin/stop $(call args)
 
+stopall:
+	@./bin/stopall $(call args)
+	
 update:
 	@./bin/update