فهرست منبع

HTTP/2 added to Nginx image `1.18-4`

Mark Shust 4 سال پیش
والد
کامیت
8cfbd3f160
7فایلهای تغییر یافته به همراه34 افزوده شده و 31 حذف شده
  1. 5 0
      CHANGELOG.md
  2. 14 24
      README.md
  3. 10 2
      compose/bin/download
  4. 0 1
      compose/bin/setup
  5. 1 1
      compose/docker-compose.dev.yml
  6. 2 2
      compose/docker-compose.yml
  7. 2 1
      images/nginx/1.18/conf/default.conf

+ 5 - 0
CHANGELOG.md

@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
 
 N/A
 
+## [34.1.0] - 2020-10-15
+
+### Added
+- HTTP/2 added to Nginx image `1.18-4`
+
 ## [34.0.0] - 2020-10-11
 
 ### Added

+ 14 - 24
README.md

@@ -83,7 +83,8 @@ View Dockerfiles:
 
 - [markoshust/magento-nginx (Docker Hub)](https://hub.docker.com/r/markoshust/magento-nginx/)
   - 1.18
-      - [`1.18`, `1.18-3`](https://github.com/markshust/docker-magento/tree/master/images/nginx/1.18)
+      - [`1.18`, `1.18-4`](https://github.com/markshust/docker-magento/tree/master/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)
       - [`1.18-0`](https://github.com/markshust/docker-magento/tree/31.0.0/images/nginx/1.18)
@@ -133,16 +134,16 @@ Run this automated one-liner from the directory you want to install your project
 #### No sample data
 
 ```bash
-curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento2.test 2.4.0
+curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento2.test 2.4.1
 ```
 
 #### With sample data
 
 ```bash
-curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento2.test with-samples-2.4.0
+curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento2.test with-samples-2.4.1
 ```
 
-The `magento2.test` above defines the hostname to use, and the `2.4.0` 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.4.1` 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.
 
 Prefix the version with `with-samples-` if you would like to automatically install sample data along with Magento.
 
@@ -159,19 +160,21 @@ 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
 
 # Download the version of Magento you want to use with:
-bin/download 2.4.0
+bin/download 2.4.1
+
+# If the download fails, the script will attempt to download Magento with Composer
 
 # 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.4.0 src
+# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-community-edition=2.4.1 src
 #
 # COMMERCE:
 #
 # rm -rf src
-# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-enterprise-edition=2.4.0 src
+# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-enterprise-edition=2.4.1 src
 
 # Create a DNS host entry for the site:
 echo "127.0.0.1 ::1 magento2.test" | sudo tee -a /etc/hosts
@@ -188,9 +191,6 @@ open https://magento2.test
 # Download the Docker Compose template:
 curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash
 
-# Remove existing src directory:
-rm -rf src
-
 # Replace with existing source code of your existing Magento instance:
 cp -R ~/Sites/existing src
 # or: git clone git@github.com:myrepo.git src
@@ -240,16 +240,6 @@ We recommend keeping your docker config files in version control, so you can mon
 
 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.
 
-### Older Versions
-
-Versions older than `24.0.0` did not include a `bin/update` helper script, and versions older than `26.0.0` had a different directory structure. For both of these situations, you can download the most recent file to your project by running:
-
-```
-(cd bin && curl -OL https://raw.githubusercontent.com/markshust/docker-magento/master/compose/bin/update && chmod +x update)
-```
-
-You'll now have an updated `bin/update` helper script, and can run it to update your project.
-
 ## 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.
@@ -260,7 +250,7 @@ You'll now have an updated `bin/update` helper script, and can run it to update
 - `bin/copytocontainer`: Copy folders or files from host to container. Ex. `bin/copytocontainer --all`
 - `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.4.0`
+- `bin/download`: Download & extract specific Magento version to the `src` directory. If the archive download fails, it will attempt to download with Composer. Ex. `bin/download 2.4.1`.
 - `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`
@@ -331,15 +321,15 @@ Use the following lines to enable Redis on existing installs:
 
 **Enable for Cache:**
 
-`bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server=redis --cache-backend-redis-db=0`
+`bin/magento config:set --cache-backend=redis --cache-backend-redis-server=redis --cache-backend-redis-db=0`
 
 **Enable for Full Page Cache:**
 
-`bin/magento setup:config:set --page-cache=redis --page-cache-redis-server=redis --page-cache-redis-db=1`
+`bin/magento config:set --page-cache=redis --page-cache-redis-server=redis --page-cache-redis-db=1`
 
 **Enable for Session:**
 
-`bin/magento setup:config:set --session-save=redis --session-save-redis-host=redis --session-save-redis-log-level=4 --session-save-redis-db=2`
+`bin/magento config:set --session-save=redis --session-save-redis-host=redis --session-save-redis-log-level=4 --session-save-redis-db=2`
 
 You may also monitor Redis by running: `bin/redis redis-cli monitor`
 

+ 10 - 2
compose/bin/download

@@ -11,5 +11,13 @@ if [ $(find ~/.docker-magento/magento2-$1.tar.gz -size -1M) ]; then
     (cd ~/.docker-magento && curl -o magento2-$1.tar.gz -OL https://www.magento.mirror.hypernode.com/releases/magento-$1.tar.gz)
 fi
 
-echo "Extracting magento2-$1.tar.gz to ./src"
-mkdir -p src && tar xzf ~/.docker-magento/magento2-$1.tar.gz -o -C src
+# Final fallback. If no archive exists, let's use Composer!
+if [ $(find ~/.docker-magento/magento2-$1.tar.gz -size -1M) ]; then
+    echo "Archive not found, or not yet available due to new version release."
+    echo "Attempting install with Composer..."
+    rm -rf src
+    composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-community-edition=$1 src
+else
+    echo "Extracting magento2-$1.tar.gz to ./src"
+    mkdir -p src && tar xzf ~/.docker-magento/magento2-$1.tar.gz -o -C src
+fi

+ 0 - 1
compose/bin/setup

@@ -10,7 +10,6 @@ sleep 5 #Ensure containers are started...
 
 echo "Copying all files from host to container..."
 rm -rf src/vendor #Clear for step below
-mv .vscode src/
 bin/copytocontainer --all
 
 bin/clinotty chmod u+x bin/magento

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

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

+ 2 - 2
compose/docker-compose.yml

@@ -1,13 +1,13 @@
 # Mark Shust's Docker Configuration for Magento
 # (https://github.com/markshust/docker-magento)
 #
-# Version 34.0.0
+# Version 34.1.0
 
 version: "3"
 
 services:
   app:
-    image: markoshust/magento-nginx:1.18-3
+    image: markoshust/magento-nginx:1.18-4
     ports:
       - "80:8000"
       - "443:8443"

+ 2 - 1
images/nginx/1.18/conf/default.conf

@@ -8,7 +8,8 @@ server {
 }
 
 server {
-  listen 8443 ssl;
+  listen [::]:8443 ssl http2 ipv6only=on;
+  listen 8443 ssl http2;
 
   ssl_certificate /etc/nginx/certs/nginx.crt;
   ssl_certificate_key /etc/nginx/certs/nginx.key;