소스 검색

Updates for 24.0.0 release

Mark Shust 5 년 전
부모
커밋
b674b5d1c8

+ 19 - 1
CHANGELOG.md

@@ -6,8 +6,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 ## [Unreleased]
 
+N/A
+
+## [24.0.0] - 2019-10-09
+
 ### Added
-- 2019-09-26 - New image `7.3-fpm` for Magento 2.3.3 support. Image will be tagged with specific version after release of Magento 2.3.3.
+- New PHP docker image version `7.3-fpm-0` for Magento 2.3.3 support
+- New Elasticsearch docker image `markoshust/magento-elasticsearch:6.5.4-0` which comes bundled with icu and phonetic plugins. The initial `6.5` version is for parity with Magento Cloud.
+- New `bin/update` helper script that updates your docker-magento setup to the latest version
+- Added `.gitignore` file to project root to ignore `src` directory. It is recommended to keep your root docker config files in one repository, and your Magento code setup in another. This ensures the Magento base path lives at the top of one specific repository, which makes automated build pipelines and deployments easy to manage, and maintains compatibility with projects such as Magento Cloud.
+- Install n98-magerun2 when setup is executed, and added related `bin/n98-magerun` and `bin/devconsole` helper scripts.
+- Added `bin/setup-pwa-studio` (BETA) helper script to easily install PWA Studio, usage accepts a single parameter being the site URL you wish PWA Studio to connect to (ex. `bin/setup-pwa-studio magento2.test`)
+- Added `bin/pwa-studio` (BETA) helper script to easily run the PWA Studio NodeJS web server
+
+### Fixed
+- The `bin/dev-urn-catalog-generate` helper script has been updated for compatibility with more recent versions of PHPStorm
+
+### Removed
+- The `vertex/module-tax` Composer package installs correctly as of 2.3.0, so the line within the `bin/setup` script which prevented it from being installed was removed. If one is having issues installing an older version of Magento 2, add the following line to your `composer.json` file to prevent this package from being installed:
+
+  `{"replace": { "vertex/module-tax": "*" }}`
 
 ## [23.2.3] - 2019-07-20
 

+ 30 - 11
README.md

@@ -15,7 +15,8 @@
 - [Docker Hub](#docker-hub)
 - [Usage](#usage)
 - [Prerequisites](#prerequisites)
-- [Quick Setup](#quick-setup)
+- [Setup](#setup)
+- [Updates](#updates)
 - [Custom CLI Commands](#custom-cli-commands)
 - [Misc Info](#misc-info)
 - [Credits](#credits)
@@ -46,9 +47,9 @@ View Dockerfiles:
       - [`1.13-0`](https://github.com/markshust/docker-magento/tree/11.0.0/images/nginx/1.13)
 - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/)
   - 7.3
-      - [`7.3-fpm`](https://github.com/markshust/docker-magento/tree/master/images/php/7.3) - Available for testing on Magento 2.3.3 as of 2019-09-26
+      - [`latest`, `7.3-fpm`, `7.3-fpm-0`](https://github.com/markshust/docker-magento/tree/master/images/php/7.3)
   - 7.2
-      - [`latest`, `7.2-fpm`, `7.2-fpm-3`](https://github.com/markshust/docker-magento/tree/master/images/php/7.2)
+      - [`7.2-fpm`, `7.2-fpm-3`](https://github.com/markshust/docker-magento/tree/master/images/php/7.2)
       - [`7.2-fpm-2`](https://github.com/markshust/docker-magento/tree/23.2.1/images/php/7.2)
       - [`7.2-fpm-1`](https://github.com/markshust/docker-magento/tree/23.1.1/images/php/7.2)
       - [`7.2-fpm-0`](https://github.com/markshust/docker-magento/tree/23.0.0/images/php/7.2)
@@ -66,6 +67,9 @@ View Dockerfiles:
       - [`7.1-fpm-2`](https://github.com/markshust/docker-magento/tree/13.0.0/images/php/7.1)
       - [`7.1-fpm-1`](https://github.com/markshust/docker-magento/tree/11.1.5/images/php/7.1)
       - [`7.1-fpm-0`](https://github.com/markshust/docker-magento/tree/11.0.0/images/php/7.1)
+- [markoshust/magento-elasticsearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-elasticsearch/)
+  - 6.5
+      - [`latest`, `6.5`, `6.5.4-0`](https://github.com/markshust/docker-magento/tree/master/images/elasticsearch/6.5)
 
 ## Usage
 
@@ -86,7 +90,7 @@ This configuration has been tested on Mac & Linux.
 
 > **Windows Configurations**: The Windows configuration does not currently work and is in need of a contributor to get functional once again. Please see [issue 100](https://github.com/markshust/docker-magento/issues/100) to contribute.
 
-## Quick Setup
+## Setup
 
 ### Automated Setup (New Project)
 
@@ -95,10 +99,10 @@ This configuration has been tested on Mac & Linux.
 Run this automated one-liner from the directory you want to install your project to:
 
 ```bash
-curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento2.test 2.3.2
+curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento2.test 2.3.3
 ```
 
-The `magento2.test` above defines the hostname to use, and the `2.3.2` 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.
+The `magento2.test` above defines the hostname to use, and the `2.3.3` 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.
 
 After the one-liner above completes running, you should be able to access your site at `https://magento2.test`.
 
@@ -113,19 +117,19 @@ Same result as the one-liner above. Just replace `magento2.test` references with
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash -s -- magento-2
 
 # Download the version of Magento you want to use with:
-bin/download 2.3.2
+bin/download 2.3.3
 
 # or if you'd rather install with Composer, run:
 #
 # OPEN SOURCE:
 #
 # rm -rf src
-# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-community-edition=2.3.2 src
+# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-community-edition=2.3.3 src
 #
 # COMMERCE:
 #
 # rm -rf src
-# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-enterprise-edition=2.3.2 src
+# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-enterprise-edition=2.3.3 src
 
 # Create a DNS host entry for the site:
 echo "127.0.0.1 magento2.test" | sudo tee -a /etc/hosts
@@ -177,22 +181,35 @@ open https://magento2.test
 
 > For more details on how everything works, see the extended [setup readme](https://github.com/markshust/docker-magento/blob/master/SETUP.md).
 
+## Updates
+
+To update your project to the latest version of `docker-magento`, run:
+
+```bin/update```
+
+We recommend keeping your docker config files in version control, so you can monitor the changes to files after updates. After reviewing the code updates and ensuring they updated as intended, run `bin/restart` to restart your containers to have the new configuration take effect.
+
+It is recommended to keep your root docker config files in one repository, and your Magento code setup in another. This ensures the Magento base path lives at the top of one specific repository, which makes automated build pipelines and deployments easy to manage, and maintains compatibility with projects such as Magento Cloud.
+
 ## Custom CLI Commands
 
 - `bin/bash`: Drop into the bash prompt of your Docker container. The `phpfpm` container should be mainly used to access the filesystem within Docker.
-- `bin/dev-urn-catalog-generate`: Generate URN's for PHPStorm and remap paths to local host. Restart PHPStorm after running this command.
 - `bin/cli`: Run any CLI command without going into the bash prompt. Ex. `bin/cli ls`
 - `bin/clinotty`: Run any CLI command with no TTY. Ex. `bin/clinotty chmod u+x bin/magento`
 - `bin/composer`: Run the composer binary. Ex. `bin/composer install`
 - `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/download`: Download & extract specific Magento version to the `src` directory. Ex. `bin/download 2.3.2`
+- `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/download`: Download & extract specific Magento version to the `src` directory. Ex. `bin/download 2.3.3`
 - `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. Note that this runs the version from the node_modules directory for project version parity. Ex. `bin/grunt exec`
 - `bin/magento`: Run the Magento CLI. Ex: `bin/magento cache:flush`
+- `bin/n98-magerun2`: Access the n98 magerun CLI. Ex: `bin/n98-magerun2 dev:console`
 - `bin/node`: Run the node binary. Ex. `bin/node --version`
 - `bin/npm`: Run the npm binary. Ex. `bin/npm install`
+- `bin/pwa-studio`: (BETA) Start the PWA Studio server. Note that Chrome will throw SSL cert errors and not allow you to view the site, but Firefox will.
 - `bin/redis`: Run a command from the redis container. Ex `bin/redis redis-cli monitor`
 - `bin/remove`: Remove all containers.
 - `bin/removevolumes`: Remove all volumes.
@@ -200,9 +217,11 @@ open https://magento2.test
 - `bin/root`: Run any CLI command as root without going into the bash prompt. Ex `bin/root apt-get install nano`
 - `bin/rootnotty`: Run any CLI command as root with no TTY. Ex `bin/rootnotty chown -R app:app /var/www/html`
 - `bin/setup`: Run the Magento setup process to install Magento from the source code, with optional domain name. Defaults to `magento2.test`. Ex. `bin/setup magento2.test`
+- `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 magento2.test`
 - `bin/start`: Start all containers, good practice to use this instead of `docker-compose up -d`, as it may contain additional helpers.
 - `bin/status`: Check the container status.
 - `bin/stop`: Stop all containers.
+- `bin/update`: Update your project to the most recent version of `docker-magento`.
 - `bin/xdebug`: Disable or enable Xdebug. Accepts params `disable` (default) or `enable`. Ex. `bin/xdebug enable`
 
 ## Misc Info

+ 1 - 0
compose/magento-2/.gitignore

@@ -0,0 +1 @@
+src/

+ 0 - 2
compose/magento-2/bin/dev-urn-catalog-generate

@@ -2,8 +2,6 @@
 bin/magento dev:urn-catalog:generate misc.xml
 bin/copyfromcontainer misc.xml
 
-sed -i .bak 's?/var/www/html?'`pwd`/src'?' src/misc.xml
-rm src/misc.xml.bak
 mkdir -p src/.idea
 mv src/misc.xml src/.idea/misc.xml
 

+ 2 - 0
compose/magento-2/bin/devconsole

@@ -0,0 +1,2 @@
+#!/bin/bash
+bin/cli bin/n98-magerun2.phar dev:console

+ 2 - 0
compose/magento-2/bin/n98-magerun2

@@ -0,0 +1,2 @@
+#!/bin/bash
+bin/cli bin/n98-magerun2.phar "$@"

+ 4 - 0
compose/magento-2/bin/setup

@@ -13,6 +13,10 @@ fi
 docker-compose -f docker-compose.yml up -d
 sleep 1 #Ensure containers are started...
 
+curl -O https://files.magerun.net/n98-magerun2.phar
+chmod +x n98-magerun2.phar
+mv n98-magerun2.phar src/bin/n98-magerun2
+
 echo "Copying all files from host to container..."
 rm -rf src/vendor #Clear for step below
 bin/copytocontainer --all

+ 9 - 0
compose/magento-2/bin/update

@@ -0,0 +1,9 @@
+#!/bin/bash
+mkdir -p tmpupdate
+cd tmpupdate
+curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template|bash -s - magento-2
+rm -rf .git
+rsync -av ./ ../
+cd ..
+rm -rf tmpupdate
+echo "docker-magento has been updated"

+ 1 - 1
compose/magento-2/docker-compose.dev.yml

@@ -1,5 +1,5 @@
 # Mark Shust's Docker Configuration for Magento (https://github.com/markshust/docker-magento)
-# Version 23.2.3
+# Version 24.0.0
 
 version: "3"
 

+ 4 - 4
compose/magento-2/docker-compose.yml

@@ -1,5 +1,5 @@
 # Mark Shust's Docker Configuration for Magento (https://github.com/markshust/docker-magento)
-# Version 23.2.3
+# Version 24.0.0
 
 version: "3"
 
@@ -18,7 +18,7 @@ services:
       - sockdata:/sock
 
   phpfpm:
-    image: markoshust/magento-php:7.2-fpm-3
+    image: markoshust/magento-php:7.3-fpm-0
     links:
       - db
     volumes: *appvolumes
@@ -35,14 +35,14 @@ services:
     image: redis:5.0
 
   elasticsearch:
-    image: elasticsearch:5.6
+    image: markoshust/magento-elasticsearch:6.5.4-0
     ports:
       - "9200:9200"
       - "9300:9300"
 
   # Disabling cron by default as it uses higher CPU, enable if needed
   #cron:
-  #  image: markoshust/magento-php:7.2-fpm-3
+  #  image: markoshust/magento-php:7.3-fpm-0
   #  user: root
   #  command: /usr/local/bin/cronstart
   #  tty: true

+ 4 - 0
images/elasticsearch/6.5/Dockerfile

@@ -0,0 +1,4 @@
+FROM elasticsearch:6.5.4
+
+RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-icu
+RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic