Sfoglia il codice sorgente

Final updates for the 40.0.0 release! 💥

Mark Shust 3 anni fa
parent
commit
262cbab03f

+ 32 - 0
CHANGELOG.md

@@ -13,6 +13,38 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 ### Updated
 - Replace MailHog with Mailcatcher for multi-arch compatibility [#511](https://github.com/markshust/docker-magento/issues/511).
 
+## [40.0.0] - 2021-10-15
+
+This is one of the biggest releases of docker-magento 💥! This major update includes support for Apple Silicon (M1/M1X) chips, as well as SSH support for fullly native filesystem speed.
+
+All the images are now multi-arch builds, meaning they can install on both AMD & ARM chipsets. Additionally, by setting up your IDE to connect to Docker over SSH/SFTP, you can gain support for full bi-directional sync to avoid selective filesystem syncing.
+
+The docker-compose configuration files have also beeen streamlined & simplified, with dedicated files for both SSH and Linux setups. Read more about these updates at https://github.com/markshust/docker-magento#ssh and https://github.com/markshust/docker-magento#linux respectively.
+
+Many issues have been resolved, and long-standing pull requests have been merged. A special thanks to [@drpayyne](https://github.com/drpayyne) for multi-arch support, [@rangerz](https://github.com/rangerz) for their massive contributions, as well as many others for their continued work & pull requests submitted to this project.
+
+### Updated
+- Updated `onelinesetup` script to use version `2.4.3-p1` by default.
+- Updated `bin/cache-clean` with improved logic [PR #400](https://github.com/markshust/docker-magento/pull/400).
+- Simplified `docker-compose.dev.yml` file to only contain volume mounting information.
+
+### Added
+- Added new `mailcatcher` image to replace `mailhog` for multi-arch support [#511](https://github.com/markshust/docker-magento/issues/511).
+- Added `docker-compose.dev-ssh.xml` to streamline SSH setup.
+- Added `docker-compose.dev-linux.xml` to streamline Linux setup.
+- Added GitHub workflows for multi-arch build support [#396](https://github.com/markshust/docker-magento/issues/396).
+- Added multi-arch support for Nginx [PR #515](https://github.com/markshust/docker-magento/pull/515).
+- Added multi-arch support for PHP [PR #516](https://github.com/markshust/docker-magento/pull/516).
+- Added new `bin/setup-domain` script [PR #429](https://github.com/markshust/docker-magento/pull/429).
+- Added Basic MFTP Setup information [PR #269](https://github.com/markshust/docker-magento/pull/269).
+- Make uid & gid of app user configurable [#520](https://github.com/markshust/docker-magento/pull/520).
+- Added Makefile with list of available commands [#399](https://github.com/markshust/docker-magento/pull/399).
+- Xdebug 3 support for `bin/n98-magerun2` [#545](https://github.com/markshust/docker-magento/pull/545).
+
+### Fixed
+- Fixed SSL setup failing on Linux [#222](https://github.com/markshust/docker-magento/issues/222).
+- Fixed locale code for `bin/setup-grunt` [#484](https://github.com/markshust/docker-magento/pull/484).
+
 ## [39.0.2] - 2021-09-21
 
 ### Fixed

+ 25 - 7
README.md

@@ -29,7 +29,8 @@ View Dockerfiles:
 
 - [markoshust/magento-nginx (Docker Hub)](https://hub.docker.com/r/markoshust/magento-nginx/)
   - 1.18
-      - [`1.18`, `1.18-4`](https://github.com/markshust/docker-magento/tree/master/images/nginx/1.18)
+      - [`1.18`, `1.18-5`](https://github.com/markshust/docker-magento/tree/master/images/nginx/1.18)
+      - [`1.18-4`](https://github.com/markshust/docker-magento/tree/39.1.0/images/nginx/1.18)
       - [`1.18-3`](https://github.com/markshust/docker-magento/tree/34.0.0/images/nginx/1.18)
       - [`1.18-2`](https://github.com/markshust/docker-magento/tree/33.0.0/images/nginx/1.18)
       - [`1.18-1`](https://github.com/markshust/docker-magento/tree/31.0.1/images/nginx/1.18)
@@ -38,7 +39,8 @@ View Dockerfiles:
   - 8.0 (available for alpha testing)
       - [`8.0-fpm-develop`](https://github.com/markshust/docker-magento/tree/master/images/php/8.0)
   - 7.4
-      - [`7.4-fpm`, `7.4-fpm-9`](https://github.com/markshust/docker-magento/tree/master/images/php/7.4)
+      - [`7.4-fpm`, `7.4-fpm-10`](https://github.com/markshust/docker-magento/tree/master/images/php/7.4)
+      - [`7.4-fpm-9`](https://github.com/markshust/docker-magento/tree/39.1.0/images/php/7.4)
       - [`7.4-fpm-8`](https://github.com/markshust/docker-magento/tree/39.0.2/images/php/7.4)
       - [`7.4-fpm-7`](https://github.com/markshust/docker-magento/tree/39.0.0/images/php/7.4)
       - [`7.4-fpm-6`](https://github.com/markshust/docker-magento/tree/38.0.0/images/php/7.4)
@@ -49,7 +51,8 @@ View Dockerfiles:
       - [`7.4-fpm-1`](https://github.com/markshust/docker-magento/tree/34.1.0/images/php/7.4)
       - [`7.4-fpm-0`](https://github.com/markshust/docker-magento/tree/33.0.0/images/php/7.4)
   - 7.3
-      - [`7.3-fpm`, `7.3-fpm-16`](https://github.com/markshust/docker-magento/tree/master/images/php/7.3)
+      - [`7.3-fpm`, `7.3-fpm-17`](https://github.com/markshust/docker-magento/tree/master/images/php/7.3)
+      - [`7.3-fpm-16`](https://github.com/markshust/docker-magento/tree/39.1.0/images/php/7.3)
       - [`7.3-fpm-15`](https://github.com/markshust/docker-magento/tree/39.0.2/images/php/7.3)
       - [`7.3-fpm-14`](https://github.com/markshust/docker-magento/tree/39.0.0/images/php/7.3)
       - [`7.3-fpm-13`](https://github.com/markshust/docker-magento/tree/38.0.0/images/php/7.3)
@@ -68,7 +71,8 @@ View Dockerfiles:
       - [`7.3-fpm-0`](https://github.com/markshust/docker-magento/tree/24.2.0/images/php/7.3)
 - [markoshust/magento-elasticsearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-elasticsearch/)
   - 7
-      - [`7.9`, `7.9.3-0`](https://github.com/markshust/docker-magento/tree/master/images/elasticsearch/7.9)
+      - [`7.9`, `7.9.3-1`](https://github.com/markshust/docker-magento/tree/master/images/elasticsearch/7.9)
+      - [`7.9.3-0`](https://github.com/markshust/docker-magento/tree/39.1.0/images/elasticsearch/7.9)
       - [`7.7`, `7.7.1-0`](https://github.com/markshust/docker-magento/tree/master/images/elasticsearch/7.7)
       - [`7.6`, `7.6.2-2`](https://github.com/markshust/docker-magento/tree/35.0.0/images/elasticsearch/7.6)
       - [`7.6.2-1`](https://github.com/markshust/docker-magento/tree/32.0.0/images/elasticsearch/7.6)
@@ -391,11 +395,25 @@ Otherwise, this project now automatically sets up Xdebug support with VS Code. I
 
 8. Open up `src/pub/index.php`, and set a breakpoint near the end of the file. Go to `Run > Debug 'magento.test'`, and open up a web browser. Ensure the Chrome Xdebug helper is enabled by clicking on it > Debug. Navigate to your Magento store URL, and Xdebug within PHPStorm should now trigger the debugger and pause at the toggled breakpoint.
 
+### SSH
+
+Since version `40.0.0`, this project supports connecting to Docker with SSH/SFTP. This means that if you solely use either PhpStorm or VSCode, you no longer need to selectively mount host volumes in order to gain bi-directional sync capabilities from host to container. This will enable full speed in the native filesystem, as all files will be stored directly in the `appdata` container volume, rather than being synced from the host. This is especially useful if you'd like to sync larger directories such as `generated`, `pub` & `vendor`.
+
+Copy `docker-compose.dev-ssh.yml` to `docker-compose.dev.yml` before installing Magento to take advantage of this setup. Then, create an SFTP connection at  Preferences -> Build, Execution, Deployment -> Deployment. Connect to `localhost` and use `app` for the username & password. You can set additional options for working with Magento in PhpStorm at Preferences -> Build, Execution, Deployment -> Deployment -> Options.
+
+Note that you must use your IDE's SSH/SFTP functionality, otherwise changes will not be synced. To re-sync your host environment at any time, run:
+
+```
+bin/copyfromcontainer --all
+```
+
 ### Linux
 
-Running Docker on Linux should be pretty straight-forward. Note that you need to run some [post install commands](https://docs.docker.com/install/linux/linux-postinstall/) as well as [installing Docker Compose](https://docs.docker.com/compose/install/). These steps are taken care of automatically with Docker Desktop, but not on Linux.
+Running Docker on Linux should be pretty straight-forward. Note that you need to run some [post install commands](https://docs.docker.com/install/linux/linux-postinstall/) as well as [installing Docker Compose](https://docs.docker.com/compose/install/) before continuing. These steps are taken care of automatically with Docker Desktop, but not on Linux.
+
+Copy `docker-compose.dev-linux.yml` to `docker-compose.dev.yml` before installing Magento to take advantage of this setup.
 
-The `host.docker.internal` hostname is [hard-coded in the php.ini file](https://github.com/markshust/docker-magento/blob/master/images/php/7.4/conf/php.ini#L8), but this hostname does not exist on Linux. To make this hostname resolve, uncomment the `extra_hosts` param in the `docker-compose.dev.yml` file, and replace `IP` with result of:
+The `host.docker.internal` hostname is [hard-coded in the php.ini file](https://github.com/markshust/docker-magento/blob/master/images/php/7.4/conf/php.ini#L8), but this hostname does not exist on Linux. To make this hostname resolve, within the `extra_hosts` param of `docker-compose.dev.yml` replace `172.17.0.1` with the result of:
 
 ```
 docker run --rm alpine ip route | awk 'NR==1 {print $3}'
@@ -403,7 +421,7 @@ docker run --rm alpine ip route | awk 'NR==1 {print $3}'
 
 You may also have to increase a virtual memory map count on the host system. It is required by [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html).
 
-Add following line to `/etc/sysctl.conf`:
+Add the following line to the `/etc/sysctl.conf` file on your host:
 
 ```
 vm.max_map_count=262144

+ 21 - 0
compose/docker-compose.dev-linux.yml

@@ -0,0 +1,21 @@
+## Mark Shust's Docker Configuration for Magento
+## (https://github.com/markshust/docker-magento)
+##
+## Version 40.0.0
+
+version: "3"
+
+services:
+  app:
+    volumes: &appvolumes
+      - ./src/nginx.conf.sample:/var/www/html/nginx.conf:cached
+      - ./src:/var/www/html:cached
+      ## To sync your SSH key to the container, uncomment:
+      #- ~/.ssh/id_rsa:/var/www/.ssh/id_rsa:cached
+
+  phpfpm:
+    volumes: *appvolumes
+    ## Replace 172.17.0.1 with the result of:
+    ## docker run --rm alpine ip route | awk 'NR==1 {print $3}'
+    extra_hosts:
+      - "host.docker.internal:172.17.0.1"

+ 19 - 0
compose/docker-compose.dev-ssh.yml

@@ -0,0 +1,19 @@
+## Mark Shust's Docker Configuration for Magento
+## (https://github.com/markshust/docker-magento)
+##
+## Version 40.0.0
+
+version: "3"
+
+services:
+  app:
+    volumes: &appvolumes
+      - ./src/nginx.conf.sample:/var/www/html/nginx.conf:cached
+      ## To sync your SSH key to the container, uncomment:
+      #- ~/.ssh/id_rsa:/var/www/.ssh/id_rsa:cached
+
+  ssh:
+    image: markoshust/ssh
+    ports:
+      - "22:22"
+    volumes: *appvolumes

+ 5 - 27
compose/docker-compose.dev.yml

@@ -1,7 +1,7 @@
-# Mark Shust's Docker Configuration for Magento
-# (https://github.com/markshust/docker-magento)
-#
-# Version 39.1.0
+## Mark Shust's Docker Configuration for Magento
+## (https://github.com/markshust/docker-magento)
+##
+## Version 40.0.0
 
 version: "3"
 
@@ -20,30 +20,8 @@ services:
       #- ./src/patches:/var/www/html/patches:cached
       #- ./src/var/log:/var/www/html/var/log:cached
       #- ./src/var/report:/var/www/html/var/report:cached
-      ## To sync your SSH to the container, uncomment the following line:
+      ## To sync your SSH key to the container, uncomment:
       #- ~/.ssh/id_rsa:/var/www/.ssh/id_rsa:cached
-      ## Linux only: remove the above lines (except nginx.conf line) and mount the entire src directory with:
-      #- ./src:/var/www/html:cached
 
   phpfpm:
     volumes: *appvolumes
-    ## Linux users, see https://github.com/markshust/docker-magento#linux for updates needed below
-    #extra_hosts:
-    #  - "host.docker.internal:IP"
-
-  mailcatcher:
-    image: sj26/mailcatcher
-    ports:
-      - "1080:1080"
-
-  # Disabling selenium by default as it is not required for all use cases
-  #selenium:
-  #  image: selenium/standalone-chrome-debug:3.8.1
-  #  ports:
-  #    - "5900:5900"
-  # Uncomment two lines below & replace IP with result of: docker run --rm alpine ip route | awk 'NR==1 {print $3}'
-  # Replace the "magento2-composer.loc" with the url of your site
-  #  extra_hosts:
-  #    - "magento2.test:172.17.0.1"
-  #  links:
-  #    - app

+ 31 - 10
compose/docker-compose.yml

@@ -1,13 +1,16 @@
-# Mark Shust's Docker Configuration for Magento
-# (https://github.com/markshust/docker-magento)
-#
-# Version 39.1.0
+## Mark Shust's Docker Configuration for Magento
+## (https://github.com/markshust/docker-magento)
+##
+## Version 40.0.0
+
+## To use SSH, see https://github.com/markshust/docker-magento#ssh
+## Linux users, see https://github.com/markshust/docker-magento#linux
 
 version: "3"
 
 services:
   app:
-    image: markoshust/magento-nginx:1.18-4
+    image: markoshust/magento-nginx:1.18-5
     ports:
       - "80:8000"
       - "443:8443"
@@ -21,7 +24,7 @@ services:
       - ssldata:/etc/nginx/certs
 
   phpfpm:
-    image: markoshust/magento-php:7.4-fpm-9
+    image: markoshust/magento-php:7.4-fpm-10
     links:
       - db
     volumes: *appvolumes
@@ -39,16 +42,16 @@ services:
     image: redis:5.0-alpine
 
   elasticsearch:
-    image: markoshust/magento-elasticsearch:7.9.3-0
+    image: markoshust/magento-elasticsearch:7.9.3-1
     ports:
       - "9200:9200"
       - "9300:9300"
     environment:
       - "discovery.type=single-node"
-      # Set custom heap size to avoid memory errors
+      ## Set custom heap size to avoid memory errors
       - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
-      # Avoid test failures due to small disks
-      # More info at https://github.com/markshust/docker-magento/issues/488
+      ## Avoid test failures due to small disks
+      ## More info at https://github.com/markshust/docker-magento/issues/488
       - "cluster.routing.allocation.disk.threshold_enabled=false"
       - "index.blocks.read_only_allow_delete"
 
@@ -62,6 +65,24 @@ services:
     environment:
       - RABBITMQ_VM_MEMORY_HIGH_WATERMARK=1GB
 
+  mailcatcher:
+    image: sj26/mailcatcher
+    ports:
+      - "1080:1080"
+
+  ## Disabling selenium by default as it is not required for all use cases.
+  ## For extra_hosts, replace "magento.test" with the URL of your site,
+  ## and also replace 172.17.0.1 with the result of:
+  ## docker run --rm alpine ip route | awk 'NR==1 {print $3}'
+  #selenium:
+  #  image: selenium/standalone-chrome-debug:3.8.1
+  #  ports:
+  #    - "5900:5900"
+  #  links:
+  #    - app
+  #  extra_hosts:
+  #    - "magento.test:172.17.0.1"
+
 volumes:
   appdata:
   dbdata: