2
0
Mark Shust 2 жил өмнө
parent
commit
4591b68c46
2 өөрчлөгдсөн 12 нэмэгдсэн , 5 устгасан
  1. 5 3
      README.md
  2. 7 2
      compose/bin/download

+ 5 - 3
README.md

@@ -127,7 +127,7 @@ mkdir -p ~/Sites/magento
 cd $_
 
 # Run this automated one-liner from the directory you want to install your project.
-curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test 2.4.5-p1
+curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test 2.4.5-p1 community
 ```
 
 The `magento.test` above defines the hostname to use, and the `2.4.5-p1` defines the Magento version to install. Note that since we need a write to `/etc/hosts` for DNS resolution, you will be prompted for your system password during setup.
@@ -158,7 +158,9 @@ cd $_
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
 
 # Download the version of Magento you want to use with:
-bin/download 2.4.5-p1
+bin/download 2.4.5-p1 community
+# You can specify the version and type (community, enterprise, or mageos).
+# If no arguments are passed, "2.4.5-p1" and "community" are the default values used.
 
 # or for Magento core development:
 # bin/docker-compose --no-dev up -d
@@ -239,7 +241,7 @@ It is recommended to keep your root docker config files in one repository, and y
 - `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 `docker-compose.yml` and `docker-compose.dev.yml`
-- `bin/download`: Download specific Magento version from Composer to the container, with an optional type of either "community" (default) or "enterprise". Ex. `bin/download 2.4.5-p1 enterprise`
+- `bin/download`: Download specific Magento version from Composer to the container, with optional arguments of the version (2.4.5-p1 [default]) and type ("community" [default], "enterprise", or "mageos"). Ex. `bin/download 2.4.5-p1 enterprise`
 - `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`

+ 7 - 2
compose/bin/download

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-VERSION=${1:-2.4.4}
+VERSION=${1:-2.4.5-p1}
 EDITION=${2:-community}
 
 bin/stop
@@ -21,6 +21,11 @@ bin/setup-composer-auth
 
 bin/fixowns
 
-bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" .
+if [ $EDITION == "mageos" ]; then
+  bin/clinotty composer create-project --stability alpha --repository-url=https://upstream-nightly.mage-os.org magento/project-community-edition .
+else
+  bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" .
+fi
 
 bin/clinotty [ ! -f "./var/composer_home/auth.json" ] && bin/clinotty mkdir -p ./var/composer_home && bin/clinotty cp /var/www/.composer/auth.json ./var/composer_home/auth.json
+