From b4a74713d4aa6bd915ab33196c80f5779f3d5a8a Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Mon, 4 Dec 2023 19:11:42 +0200 Subject: [PATCH 001/115] Fix elasticsearch host and port --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 485884b80..e742e59bd 100644 --- a/README.md +++ b/README.md @@ -181,8 +181,8 @@ bin/download 2.4.6-p3 community # --opensearch-port="$OPENSEARCH_PORT" \ # --search-engine=opensearch \ # with: -# --elasticsearch-host="$OPENSEARCH_HOST" \ -# --elasticsearch-port="$OPENSEARCH_PORT" \ +# --elasticsearch-host="$ES_HOST" \ +# --elasticsearch-port="$ES_PORT" \ # --search-engine=elasticsearch7 \ # Run the setup installer for Magento: From 3ee2aa723b3659f08cf9f2339088f516acaa71b8 Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Mon, 4 Dec 2023 19:26:38 +0200 Subject: [PATCH 002/115] Add extra-settings script --- compose/bin/extra-settings | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 compose/bin/extra-settings diff --git a/compose/bin/extra-settings b/compose/bin/extra-settings new file mode 100755 index 000000000..64b051322 --- /dev/null +++ b/compose/bin/extra-settings @@ -0,0 +1,30 @@ +#!/bin/bash + +# Get the IP address from the Docker container +docker_ip=$(docker run --rm alpine ip route | awk 'NR==1 {print $3}') + +# Add a new entry to /etc/hosts +echo "$docker_ip host.docker.internal" | sudo tee -a /etc/hosts +echo "A new entry in the /etc/hosts file has been created" + +# Ask the user whether to execute the iptables command +read -p "Do you want to open port 9003 for xdebug? (y/n): " choice +if [ "$choice" == "y" ]; then + sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT + echo "Port 9003 has been opened for xdebug." +fi + +# Ask the user whether to increase the virtual memory map count for Elasticsearch +read -p "Do you need to increase the virtual memory map count for Elasticsearch? (y/n): " vm_choice +if [ "$vm_choice" == "y" ]; then + # Check if the setting already exists in /etc/sysctl.conf + if ! grep -q "vm.max_map_count=262144" /etc/sysctl.conf; then + echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf + sudo sysctl -p + echo "The virtual memory map count has been increased for Elasticsearch." + else + echo "The setting vm.max_map_count=262144 already exists in /etc/sysctl.conf." + fi +fi + +echo "Tasks completed successfully" From e8011d7ee797d137cad1539cc8e48fbe1d7017b4 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Tue, 5 Dec 2023 03:53:57 +0200 Subject: [PATCH 003/115] Fix duplicate entries in the file --- compose/bin/extra-settings | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/compose/bin/extra-settings b/compose/bin/extra-settings index 64b051322..c9998a246 100755 --- a/compose/bin/extra-settings +++ b/compose/bin/extra-settings @@ -3,9 +3,14 @@ # Get the IP address from the Docker container docker_ip=$(docker run --rm alpine ip route | awk 'NR==1 {print $3}') -# Add a new entry to /etc/hosts -echo "$docker_ip host.docker.internal" | sudo tee -a /etc/hosts -echo "A new entry in the /etc/hosts file has been created" +# Check if the IP address already exists in /etc/hosts +if grep -q "$docker_ip host.docker.internal" /etc/hosts; then + echo "The entry already exists in /etc/hosts. No action needed." +else + # Add a new entry to /etc/hosts + echo "$docker_ip host.docker.internal" | sudo tee -a /etc/hosts + echo "A new entry in the /etc/hosts file has been created" +fi # Ask the user whether to execute the iptables command read -p "Do you want to open port 9003 for xdebug? (y/n): " choice From f7db6040b135853005fb73395fb542e9f1786148 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Thu, 7 Dec 2023 02:26:11 +0200 Subject: [PATCH 004/115] Add container monitoring script --- compose/bin/container-monitoring | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 compose/bin/container-monitoring diff --git a/compose/bin/container-monitoring b/compose/bin/container-monitoring new file mode 100755 index 000000000..3b93d2f22 --- /dev/null +++ b/compose/bin/container-monitoring @@ -0,0 +1,37 @@ +#!/bin/bash + +stty -echo + +INTERVAL=3 + +trap 'stty echo; exit' INT EXIT + +while true; do + DOCKER_STATS=$(docker stats --no-stream --format "{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}") + + clear + + if [[ ! -z "$DOCKER_STATS" ]]; then + echo "+----------------------------------------------------+------------+-----------------+-----------------+" + printf "| %-50s | %-10s | %-15s | %-15s |\n" "Name" "CPU %" "Memory Usage" "Memory Limit" + echo "+----------------------------------------------------+------------+-----------------+-----------------+" + + while IFS= read -r line; do + line=$(echo "$line" | tr '/' ' ') + + container_info=($line) + container_name=${container_info[0]} + container_stats=(${container_info[@]:1}) + + printf "| %-50s | %-10s | %-15s | %-15s |\n" "$container_name" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" + done <<< "$DOCKER_STATS" + + echo "+----------------------------------------------------+------------+-----------------+-----------------+" + else + echo "No active containers found" + break + fi + + sleep $INTERVAL +done + From 2dfb8a740f5b9d32ebc1c54219b1ef82ef124fd8 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Thu, 7 Dec 2023 02:42:06 +0200 Subject: [PATCH 005/115] Improve readability and code structure --- compose/bin/container-monitoring | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/compose/bin/container-monitoring b/compose/bin/container-monitoring index 3b93d2f22..cbcdd2b2b 100755 --- a/compose/bin/container-monitoring +++ b/compose/bin/container-monitoring @@ -6,24 +6,30 @@ INTERVAL=3 trap 'stty echo; exit' INT EXIT +print_header() { + echo "+----------------------------------------------------+------------+-----------------+-----------------+" + printf "| %-50s | %-10s | %-15s | %-15s |\n" "Name" "CPU %" "Memory Usage" "Memory Limit" + echo "+----------------------------------------------------+------------+-----------------+-----------------+" +} + +print_container_info() { + local container_info=($1) + local container_name=${container_info[0]} + local container_stats=(${container_info[@]:1}) + + printf "| %-50s | %-10s | %-15s | %-15s |\n" "$container_name" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" +} + while true; do DOCKER_STATS=$(docker stats --no-stream --format "{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}") clear if [[ ! -z "$DOCKER_STATS" ]]; then - echo "+----------------------------------------------------+------------+-----------------+-----------------+" - printf "| %-50s | %-10s | %-15s | %-15s |\n" "Name" "CPU %" "Memory Usage" "Memory Limit" - echo "+----------------------------------------------------+------------+-----------------+-----------------+" + print_header while IFS= read -r line; do - line=$(echo "$line" | tr '/' ' ') - - container_info=($line) - container_name=${container_info[0]} - container_stats=(${container_info[@]:1}) - - printf "| %-50s | %-10s | %-15s | %-15s |\n" "$container_name" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" + print_container_info "$(echo "$line" | awk '{gsub(/\//, " "); print}')" done <<< "$DOCKER_STATS" echo "+----------------------------------------------------+------------+-----------------+-----------------+" @@ -34,4 +40,3 @@ while true; do sleep $INTERVAL done - From b7418753bebbe7aeaf70b35bffc025480733b435 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Thu, 7 Dec 2023 13:12:28 +0200 Subject: [PATCH 006/115] Simplify script --- compose/bin/container-monitoring | 46 +++++--------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/compose/bin/container-monitoring b/compose/bin/container-monitoring index cbcdd2b2b..a74a62afe 100755 --- a/compose/bin/container-monitoring +++ b/compose/bin/container-monitoring @@ -1,42 +1,10 @@ -#!/bin/bash +#!/usr/bin/env bash -stty -echo +container_ids=$(bin/docker-compose ps -q) -INTERVAL=3 +if [ -z "$container_ids" ]; then + echo "No active containers found" + exit 1 +fi -trap 'stty echo; exit' INT EXIT - -print_header() { - echo "+----------------------------------------------------+------------+-----------------+-----------------+" - printf "| %-50s | %-10s | %-15s | %-15s |\n" "Name" "CPU %" "Memory Usage" "Memory Limit" - echo "+----------------------------------------------------+------------+-----------------+-----------------+" -} - -print_container_info() { - local container_info=($1) - local container_name=${container_info[0]} - local container_stats=(${container_info[@]:1}) - - printf "| %-50s | %-10s | %-15s | %-15s |\n" "$container_name" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" -} - -while true; do - DOCKER_STATS=$(docker stats --no-stream --format "{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}") - - clear - - if [[ ! -z "$DOCKER_STATS" ]]; then - print_header - - while IFS= read -r line; do - print_container_info "$(echo "$line" | awk '{gsub(/\//, " "); print}')" - done <<< "$DOCKER_STATS" - - echo "+----------------------------------------------------+------------+-----------------+-----------------+" - else - echo "No active containers found" - break - fi - - sleep $INTERVAL -done +docker stats $container_ids From 8d80775a0101289146ba8825afcab7b5cd5a3cc6 Mon Sep 17 00:00:00 2001 From: Piotr Kwiecinski Date: Sun, 31 Dec 2023 17:38:26 +0100 Subject: [PATCH 007/115] add dependabot to update github actions --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..253bcb76b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily From 51f8bf0914fffd0988e1295a4c58181876d298d9 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Mon, 1 Jan 2024 21:29:10 +0200 Subject: [PATCH 008/115] Show a message to the user that they have a failed install --- compose/bin/download | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compose/bin/download b/compose/bin/download index c8a2c5bf7..d40c84717 100755 --- a/compose/bin/download +++ b/compose/bin/download @@ -3,6 +3,11 @@ VERSION=${1:-2.4.6-p3} EDITION=${2:-community} +# Define ANSI escape codes for colors +YELLOW='\033[0;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + bin/stop bin/start --no-dev @@ -24,5 +29,8 @@ 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 - +if [ $? != 0 ]; then + echo -e "${BLUE}Please check the installation guide at ${YELLOW}https://github.com/markshust/docker-magento#install-fails-because-project-directory-is-not-empty${BLUE} for troubleshooting.${NC}" +else + 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 +fi From 07a7a92b3ca5a5ef39ae90dbae6ce9d6fd672273 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Wed, 3 Jan 2024 00:51:49 -0500 Subject: [PATCH 009/115] Update version constraints to match current Magento system requirements #994 --- ...-7.17.yml => build-elasticsearch-7-17.yml} | 4 +- ...ch-8.4.yml => build-elasticsearch-8-4.yml} | 5 +- .github/workflows/build-elasticsearch-8-5.yml | 34 ++++++++++ .github/workflows/build-elasticsearch.yml | 62 ------------------ .../{build-nginx.yml => build-nginx-1-18.yml} | 2 +- .github/workflows/build-opensearch-1-2.yml | 34 ++++++++++ ...pensearch.yml => build-opensearch-2-5.yml} | 7 ++- .../{build-php-8.1.yml => build-php-8-1.yml} | 2 +- .../{build-php-8.2.yml => build-php-8-2.yml} | 2 +- .github/workflows/build-php.yml | 63 ------------------- .github/workflows/build-rabbitmq-3-11.yml | 34 ++++++++++ .github/workflows/build-rabbitmq-3-9.yml | 34 ++++++++++ .github/workflows/build-rabbitmq.yml | 63 ------------------- .github/workflows/build-ssh.yml | 2 +- README.md | 11 ++-- compose/compose.yaml | 6 +- images/elasticsearch/7.17/Dockerfile | 2 +- images/elasticsearch/{7.16 => 8.5}/Dockerfile | 2 +- images/elasticsearch/8.7/Dockerfile | 5 ++ images/opensearch/2.4/Dockerfile | 5 -- 20 files changed, 166 insertions(+), 213 deletions(-) rename .github/workflows/{build-elasticsearch-7.17.yml => build-elasticsearch-7-17.yml} (90%) rename .github/workflows/{build-elasticsearch-8.4.yml => build-elasticsearch-8-4.yml} (85%) create mode 100644 .github/workflows/build-elasticsearch-8-5.yml delete mode 100644 .github/workflows/build-elasticsearch.yml rename .github/workflows/{build-nginx.yml => build-nginx-1-18.yml} (97%) create mode 100644 .github/workflows/build-opensearch-1-2.yml rename .github/workflows/{build-opensearch.yml => build-opensearch-2-5.yml} (81%) rename .github/workflows/{build-php-8.1.yml => build-php-8-1.yml} (97%) rename .github/workflows/{build-php-8.2.yml => build-php-8-2.yml} (97%) delete mode 100644 .github/workflows/build-php.yml create mode 100644 .github/workflows/build-rabbitmq-3-11.yml create mode 100644 .github/workflows/build-rabbitmq-3-9.yml delete mode 100644 .github/workflows/build-rabbitmq.yml rename images/elasticsearch/{7.16 => 8.5}/Dockerfile (79%) create mode 100644 images/elasticsearch/8.7/Dockerfile delete mode 100644 images/opensearch/2.4/Dockerfile diff --git a/.github/workflows/build-elasticsearch-7.17.yml b/.github/workflows/build-elasticsearch-7-17.yml similarity index 90% rename from .github/workflows/build-elasticsearch-7.17.yml rename to .github/workflows/build-elasticsearch-7-17.yml index e7147f49a..a75e6d08a 100644 --- a/.github/workflows/build-elasticsearch-7.17.yml +++ b/.github/workflows/build-elasticsearch-7-17.yml @@ -1,4 +1,4 @@ -name: build-elasticsearch-7.17 +name: build-elasticsearch-7-17 on: workflow_dispatch @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-elasticsearch:7.17 - markoshust/magento-elasticsearch:7.17-0 + markoshust/magento-elasticsearch:7.17-1 diff --git a/.github/workflows/build-elasticsearch-8.4.yml b/.github/workflows/build-elasticsearch-8-4.yml similarity index 85% rename from .github/workflows/build-elasticsearch-8.4.yml rename to .github/workflows/build-elasticsearch-8-4.yml index 9c00b7e9f..c32df797c 100644 --- a/.github/workflows/build-elasticsearch-8.4.yml +++ b/.github/workflows/build-elasticsearch-8-4.yml @@ -1,4 +1,4 @@ -name: build-elasticsearch-8.4 +name: build-elasticsearch-8-4 on: workflow_dispatch @@ -30,4 +30,5 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - markoshust/magento-elasticsearch:8.4-develop + markoshust/magento-elasticsearch:8.4 + markoshust/magento-elasticsearch:8.4-0 diff --git a/.github/workflows/build-elasticsearch-8-5.yml b/.github/workflows/build-elasticsearch-8-5.yml new file mode 100644 index 000000000..a8b3b52d2 --- /dev/null +++ b/.github/workflows/build-elasticsearch-8-5.yml @@ -0,0 +1,34 @@ +name: build-elasticsearch-8-5 + +on: workflow_dispatch + +jobs: + elasticsearch-8-5: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: images/elasticsearch/8.5 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-elasticsearch:8.5 + markoshust/magento-elasticsearch:8.5-0 diff --git a/.github/workflows/build-elasticsearch.yml b/.github/workflows/build-elasticsearch.yml deleted file mode 100644 index 3c9e5684c..000000000 --- a/.github/workflows/build-elasticsearch.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: build-elasticsearch - -on: workflow_dispatch - -jobs: - elasticsearch-7-17: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: images/elasticsearch/7.17 - platforms: linux/amd64,linux/arm64 - push: true - tags: | - markoshust/magento-elasticsearch:7.17 - markoshust/magento-elasticsearch:7.17-0 - elasticsearch-8-4: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: images/elasticsearch/8.4 - platforms: linux/amd64,linux/arm64 - push: true - tags: | - markoshust/magento-elasticsearch:8.4-develop diff --git a/.github/workflows/build-nginx.yml b/.github/workflows/build-nginx-1-18.yml similarity index 97% rename from .github/workflows/build-nginx.yml rename to .github/workflows/build-nginx-1-18.yml index 4fbb17cf7..583f0ec1b 100644 --- a/.github/workflows/build-nginx.yml +++ b/.github/workflows/build-nginx-1-18.yml @@ -1,4 +1,4 @@ -name: build-nginx +name: build-nginx-1-18 on: workflow_dispatch diff --git a/.github/workflows/build-opensearch-1-2.yml b/.github/workflows/build-opensearch-1-2.yml new file mode 100644 index 000000000..fb0bcc3e6 --- /dev/null +++ b/.github/workflows/build-opensearch-1-2.yml @@ -0,0 +1,34 @@ +name: build-opensearch-1-2 + +on: workflow_dispatch + +jobs: + opensearch-1-2: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: images/opensearch/1.2 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-opensearch:1.2 + markoshust/magento-opensearch:1.2-0 diff --git a/.github/workflows/build-opensearch.yml b/.github/workflows/build-opensearch-2-5.yml similarity index 81% rename from .github/workflows/build-opensearch.yml rename to .github/workflows/build-opensearch-2-5.yml index a9b888c45..cc210c92f 100644 --- a/.github/workflows/build-opensearch.yml +++ b/.github/workflows/build-opensearch-2-5.yml @@ -1,4 +1,4 @@ -name: build-opensearch +name: build-opensearch-2-5 on: workflow_dispatch @@ -26,8 +26,9 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - context: images/opensearch/2.4 + context: images/opensearch/2.5 platforms: linux/amd64,linux/arm64 push: true tags: | - markoshust/magento-opensearch:2.5-0 + markoshust/magento-opensearch:2.5 + markoshust/magento-opensearch:2.5-1 diff --git a/.github/workflows/build-php-8.1.yml b/.github/workflows/build-php-8-1.yml similarity index 97% rename from .github/workflows/build-php-8.1.yml rename to .github/workflows/build-php-8-1.yml index 1976dc71e..38abe3032 100644 --- a/.github/workflows/build-php-8.1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -1,4 +1,4 @@ -name: build-php-8.1 +name: build-php-8-1 on: workflow_dispatch diff --git a/.github/workflows/build-php-8.2.yml b/.github/workflows/build-php-8-2.yml similarity index 97% rename from .github/workflows/build-php-8.2.yml rename to .github/workflows/build-php-8-2.yml index b012d9f77..751592a09 100644 --- a/.github/workflows/build-php-8.2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -1,4 +1,4 @@ -name: build-php-8.2 +name: build-php-8-2 on: workflow_dispatch diff --git a/.github/workflows/build-php.yml b/.github/workflows/build-php.yml deleted file mode 100644 index 9c0e1420c..000000000 --- a/.github/workflows/build-php.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: build-php - -on: workflow_dispatch - -jobs: - php-8-1: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: images/php/8.1 - platforms: linux/amd64,linux/arm64 - push: true - tags: | - markoshust/magento-php:8.1-fpm - markoshust/magento-php:8.1-fpm-1 - php-8-2: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: images/php/8.2 - platforms: linux/amd64,linux/arm64 - push: true - tags: | - markoshust/magento-php:8.2-fpm - markoshust/magento-php:8.2-fpm-0 diff --git a/.github/workflows/build-rabbitmq-3-11.yml b/.github/workflows/build-rabbitmq-3-11.yml new file mode 100644 index 000000000..2a7134952 --- /dev/null +++ b/.github/workflows/build-rabbitmq-3-11.yml @@ -0,0 +1,34 @@ +name: build-rabbitmq-3-11 + +on: workflow_dispatch + +jobs: + rabbitmq-3-11: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: images/rabbitmq/3.11 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-rabbitmq:3.11 + markoshust/magento-rabbitmq:3.11-1 diff --git a/.github/workflows/build-rabbitmq-3-9.yml b/.github/workflows/build-rabbitmq-3-9.yml new file mode 100644 index 000000000..577d5b478 --- /dev/null +++ b/.github/workflows/build-rabbitmq-3-9.yml @@ -0,0 +1,34 @@ +name: build-rabbitmq-3-9 + +on: workflow_dispatch + +jobs: + rabbitmq-3-9: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: images/rabbitmq/3.9 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-rabbitmq:3.9 + markoshust/magento-rabbitmq:3.9-0 diff --git a/.github/workflows/build-rabbitmq.yml b/.github/workflows/build-rabbitmq.yml deleted file mode 100644 index 4989f0c98..000000000 --- a/.github/workflows/build-rabbitmq.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: build-rabbitmq - -on: workflow_dispatch - -jobs: - rabbitmq-3-9: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: images/rabbitmq/3.9 - platforms: linux/amd64,linux/arm64 - push: true - tags: | - markoshust/magento-rabbitmq:3.9 - markoshust/magento-rabbitmq:3.9-0 - rabbitmq-3-11: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - context: images/rabbitmq/3.9 - platforms: linux/amd64,linux/arm64 - push: true - tags: | - markoshust/magento-rabbitmq:3.11 - markoshust/magento-rabbitmq:3.11-0 diff --git a/.github/workflows/build-ssh.yml b/.github/workflows/build-ssh.yml index 70d4d3968..03ab70063 100644 --- a/.github/workflows/build-ssh.yml +++ b/.github/workflows/build-ssh.yml @@ -26,7 +26,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - context: images/php/7.3 + context: images/php/8.2 platforms: linux/amd64,linux/arm64 push: true tags: markoshust/ssh diff --git a/README.md b/README.md index 485884b80..e3d22bad9 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,18 @@ View Dockerfiles for the latest tags: - [`1.18`, `1.18-8`](images/nginx/1.18) - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/) - [`8.1-fpm`, `8.1-fpm-1`](images/php/8.1) - - [`8.2-fpm-develop`](images/php/8.2) + - [`8.2-fpm`, `8.2-fpm-0`](images/php/8.2) - [markoshust/magento-opensearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-opensearch/) - [`1.2`, `1.2-0`](images/opensearch/1.2) - - [`2.4-develop`](images/opensearch/2.4) + - [`2.5`, `2.5-1`](images/opensearch/2.5) - [markoshust/magento-elasticsearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-elasticsearch/) - - [`7.17`, `7.17-0`](images/elasticsearch/7.17) - - [`8.4-develop`](images/elasticsearch/8.4) + - [`7.17`, `7.17-1`](images/elasticsearch/7.17) + - [`8.4`, `8.4-0`](images/elasticsearch/8.4) + - [`8.5`, `8.5-0`](images/elasticsearch/8.5) + - [`8.7`, `8.7-0`](images/elasticsearch/8.7) - [markoshust/magento-rabbitmq (Docker Hub)](https://hub.docker.com/r/markoshust/magento-rabbitmq/) - [`3.9`, `3.9-0`](images/rabbitmq/3.9) + - [`3.11`, `3.11-1`](images/rabbitmq/3.11) - [markoshust/ssh (Docker Hub)](https://hub.docker.com/r/markoshust/magento-ssh/) - [`latest`](images/ssh) diff --git a/compose/compose.yaml b/compose/compose.yaml index c7366302e..2ed3528ad 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -55,7 +55,7 @@ services: - "6379:6379" opensearch: - image: markoshust/magento-opensearch:2.5-0 + image: markoshust/magento-opensearch:2.5-1 ports: - "9200:9200" - "9300:9300" @@ -73,7 +73,7 @@ services: # update the bin/setup command to use the $ES_HOST variable as the value for # the --elasticsearch-host argument passed to bin/magento setup:install. #elasticsearch: - # image: markoshust/magento-elasticsearch:7.17-0 + # image: markoshust/magento-elasticsearch:7.17-1 # ports: # - "9200:9200" # - "9300:9300" @@ -86,7 +86,7 @@ services: # - "index.blocks.read_only_allow_delete" rabbitmq: - image: markoshust/magento-rabbitmq:3.11-0 + image: markoshust/magento-rabbitmq:3.11-1 ports: - "15672:15672" - "5672:5672" diff --git a/images/elasticsearch/7.17/Dockerfile b/images/elasticsearch/7.17/Dockerfile index 7471feae8..244405d63 100644 --- a/images/elasticsearch/7.17/Dockerfile +++ b/images/elasticsearch/7.17/Dockerfile @@ -1,4 +1,4 @@ -FROM elasticsearch:7.17.7 +FROM elasticsearch:7.17.16 RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install \ analysis-icu \ diff --git a/images/elasticsearch/7.16/Dockerfile b/images/elasticsearch/8.5/Dockerfile similarity index 79% rename from images/elasticsearch/7.16/Dockerfile rename to images/elasticsearch/8.5/Dockerfile index 0a9f2b736..ff00b9bd8 100644 --- a/images/elasticsearch/7.16/Dockerfile +++ b/images/elasticsearch/8.5/Dockerfile @@ -1,4 +1,4 @@ -FROM elasticsearch:7.16.3 +FROM elasticsearch:8.5.3 RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install \ analysis-icu \ diff --git a/images/elasticsearch/8.7/Dockerfile b/images/elasticsearch/8.7/Dockerfile new file mode 100644 index 000000000..dd4031b2c --- /dev/null +++ b/images/elasticsearch/8.7/Dockerfile @@ -0,0 +1,5 @@ +FROM elasticsearch:8.7.1 + +RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install \ + analysis-icu \ + analysis-phonetic diff --git a/images/opensearch/2.4/Dockerfile b/images/opensearch/2.4/Dockerfile deleted file mode 100644 index cfac13d8d..000000000 --- a/images/opensearch/2.4/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM opensearchproject/opensearch:2.4.1 - -RUN /usr/share/opensearch/bin/opensearch-plugin install --batch \ - analysis-icu \ - analysis-phonetic From 21e79bd8d724a1b15fecd860d90300bf09d805a9 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Tue, 9 Jan 2024 21:38:49 +0200 Subject: [PATCH 010/115] Fix execution rights in scripts --- compose/bin/deploy | 0 compose/bin/phpcbf | 0 compose/bin/phpcs | 0 compose/bin/phpcs-json-report | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 compose/bin/deploy mode change 100644 => 100755 compose/bin/phpcbf mode change 100644 => 100755 compose/bin/phpcs mode change 100644 => 100755 compose/bin/phpcs-json-report diff --git a/compose/bin/deploy b/compose/bin/deploy old mode 100644 new mode 100755 diff --git a/compose/bin/phpcbf b/compose/bin/phpcbf old mode 100644 new mode 100755 diff --git a/compose/bin/phpcs b/compose/bin/phpcs old mode 100644 new mode 100755 diff --git a/compose/bin/phpcs-json-report b/compose/bin/phpcs-json-report old mode 100644 new mode 100755 From 15c485fea4537f2f19ccf50817236b69e6b80f2a Mon Sep 17 00:00:00 2001 From: evgeniy Date: Thu, 11 Jan 2024 19:10:57 +0200 Subject: [PATCH 011/115] Added script for creating Magento admin --- compose/bin/admin-user-create | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 compose/bin/admin-user-create diff --git a/compose/bin/admin-user-create b/compose/bin/admin-user-create new file mode 100755 index 000000000..e391b3e6d --- /dev/null +++ b/compose/bin/admin-user-create @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +USERNAME="admin" +EMAIL="admin@example.com" +FIRSTNAME="Admin" +LASTNAME="Admin" +PASSWORD="Admin123" + +bin/magento admin:user:create \ + --admin-user=${USERNAME} \ + --admin-password=${PASSWORD} \ + --admin-email=${EMAIL} \ + --admin-firstname=${FIRSTNAME} \ + --admin-lastname=${LASTNAME} + +if [ $? -eq 0 ]; then + echo "Username: ${USERNAME}" + echo "Email: ${EMAIL}" + echo "Firstname: ${FIRSTNAME}" + echo "Lastname: ${LASTNAME}" + echo "Password: ${PASSWORD}" +else + echo "Error creating admin user." +fi From 64c7c55f98e4f5f4780e401c0f760c3832c0f8d2 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Mon, 1 Jan 2024 19:14:49 +0200 Subject: [PATCH 012/115] Add strace support --- images/php/8.1/Dockerfile | 1 + images/php/8.2/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index 5cce619c7..4e24486f7 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -11,6 +11,7 @@ RUN mkdir -p /etc/nginx/html /var/www/html /sock \ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - RUN apt-get update && apt-get install -y \ + strace \ cron \ default-mysql-client \ git \ diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index f87faac79..0125bbf52 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -11,6 +11,7 @@ RUN mkdir -p /etc/nginx/html /var/www/html /sock \ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - RUN apt-get update && apt-get install -y \ + strace \ cron \ default-mysql-client \ git \ From 0c503f6c083a82b492064a82107f1147ccfcf2f1 Mon Sep 17 00:00:00 2001 From: evgeniy Date: Tue, 16 Jan 2024 20:26:17 +0200 Subject: [PATCH 013/115] Added a script that deploys the sample data for PWA --- compose/bin/setup-pwa-studio-sampledata | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 compose/bin/setup-pwa-studio-sampledata diff --git a/compose/bin/setup-pwa-studio-sampledata b/compose/bin/setup-pwa-studio-sampledata new file mode 100755 index 000000000..4d5665b17 --- /dev/null +++ b/compose/bin/setup-pwa-studio-sampledata @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set +e + +RED='\033[0;31m' +GREEN='\033[0;32m' +NC='\033[0m' + +BASE_URL=${1:-master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud} + +install_sampledata() { + echo -e "${GREEN}Setting up composer repository for Venia sample data.${NC}" + bin/composer config --no-interaction --ansi repositories.venia-sample-data composer https://repo.magento.com + + echo -e "${GREEN}Requiring Venia sample data metapackage.${NC}" + bin/composer require --no-interaction --ansi magento/venia-sample-data:* + + echo -e "${GREEN}Installing Venia sample data modules.${NC}" + bin/magento setup:upgrade + + echo -e "${GREEN}Reindexing the data from the modules.${NC}" + bin/magento indexer:reindex +} + +install_sampledata + +ENV_DIST_FILE="packages/venia-concept/.env.dist" +if [ -f "$ENV_DIST_FILE" ]; then + cp "$ENV_DIST_FILE" packages/venia-concept/.env +else + echo -e "${RED}.env.dist file not found. Continuing without copying.${NC}" +fi + +echo -e "${GREEN}Script completed successfully.${NC}" From 5fc7cd095659ad8e5eb10c76a47e247433569d2c Mon Sep 17 00:00:00 2001 From: evgeniy Date: Mon, 22 Jan 2024 22:11:00 +0200 Subject: [PATCH 014/115] Add script message for accessing Magento PWA Studio instance --- compose/bin/setup-pwa-studio-sampledata | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/bin/setup-pwa-studio-sampledata b/compose/bin/setup-pwa-studio-sampledata index 4d5665b17..ead888e42 100755 --- a/compose/bin/setup-pwa-studio-sampledata +++ b/compose/bin/setup-pwa-studio-sampledata @@ -31,3 +31,4 @@ else fi echo -e "${GREEN}Script completed successfully.${NC}" +echo "You may now access your Magento PWA Studio instance at https://${BASE_URL}/" From 81386f35d3033d53b8b7c7f2b433959e2127a35a Mon Sep 17 00:00:00 2001 From: evgeniy Date: Mon, 22 Jan 2024 22:31:43 +0200 Subject: [PATCH 015/115] Add description for script in README file --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e3d22bad9..f5ae0df1c 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,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-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`: (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` - `bin/setup-ssl-ca`: Generate a certificate authority and copy it to the host. - `bin/start`: Start all containers, good practice to use this instead of `docker-compose up -d`, as it may contain additional helpers. From fea10809548f2ec29747a31a8ae893f97ba53d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kmilo=20Denis=20Gonz=C3=A1lez?= Date: Thu, 25 Jan 2024 19:38:54 -0500 Subject: [PATCH 016/115] Update README.md added some dependencies that were needed to be able to run magento-docker successfully on a VPS with Debian GNU/Linux 12 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index e3d22bad9..903d8305d 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,13 @@ This setup assumes you are running Docker on a computer with at least 6GB of RAM This configuration has been tested on Mac & Linux. Windows is supported through the use of Docker on WSL. +### Ubuntu, Debian + +1. Install dependencies + + # Ubuntu or Debian + sudo apt install curl libnss3-tools unzip rsync + ## Setup ### Automated Setup (New Project) From a599944170ca5958b67165ae63d0b07d0bd483a9 Mon Sep 17 00:00:00 2001 From: bdn Date: Fri, 9 Feb 2024 12:29:44 +0100 Subject: [PATCH 017/115] bin/log command added --- compose/bin/log | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 compose/bin/log diff --git a/compose/bin/log b/compose/bin/log new file mode 100755 index 000000000..557b04fbe --- /dev/null +++ b/compose/bin/log @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit +bin/docker-compose exec phpfpm "$@" + +#!/bin/bash + +source bin/vars/color-vars + +CONTAINER_LOG_PATH="/var/www/html/var/log/"; + +display_help() { + echo -e "Description: + Tail logs from the Magento var/log folder all and specific logs + +Usage: + bin/log + +Arguments: + specific_log_files If specific_log_files NOT provided, show all logs. Ex: bin/log system.log cache.log + +Options: + -h, --help Display help message" +} + +generate_logs_file_path() { + CONTAINER_LOG_PATH="$1" + LOG_FILES="$2" + + log_file_paths="" + + for file in $LOG_FILES; do + log_file_paths+="$CONTAINER_LOG_PATH$file " + done + + echo "$log_file_paths" +} + +get_all_logs_file_path() { + LOGS_LOCATION="$1" + + echo $(bin/docker-compose exec phpfpm ls -p "$LOGS_LOCATION" | grep -v '/$' | sed "s|^|$LOGS_LOCATION|"); +} + +if [[ $1 == "-h" || $1 == "--help" ]]; then + display_help +elif [[ -z $1 ]]; then + All_LOGS_FILE_PATH=$(get_all_logs_file_path "$CONTAINER_LOG_PATH") + bin/docker-compose exec phpfpm tail -f $All_LOGS_FILE_PATH +else + LOGS_FILE_PATH=$(generate_logs_file_path "$CONTAINER_LOG_PATH" "$1") + bin/docker-compose exec phpfpm tail -f $LOGS_FILE_PATH +fi From 730e953554df571f04430a50ff3b3dd183a34f68 Mon Sep 17 00:00:00 2001 From: bdn Date: Fri, 9 Feb 2024 12:32:36 +0100 Subject: [PATCH 018/115] bin/log command typo --- compose/bin/log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/bin/log b/compose/bin/log index 557b04fbe..c41fd3a94 100755 --- a/compose/bin/log +++ b/compose/bin/log @@ -16,7 +16,7 @@ Usage: bin/log Arguments: - specific_log_files If specific_log_files NOT provided, show all logs. Ex: bin/log system.log cache.log + specific_log_files If specific_log_files are NOT provided, show all logs. Ex: bin/log system.log cache.log Options: -h, --help Display help message" From 382c7fcfee3b1771fff75408cf384c492fe051aa Mon Sep 17 00:00:00 2001 From: bdn Date: Fri, 9 Feb 2024 12:39:50 +0100 Subject: [PATCH 019/115] bin/log removed not necessary code --- compose/bin/log | 6 ------ 1 file changed, 6 deletions(-) diff --git a/compose/bin/log b/compose/bin/log index c41fd3a94..574912f2c 100755 --- a/compose/bin/log +++ b/compose/bin/log @@ -1,10 +1,4 @@ #!/usr/bin/env bash -[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit -bin/docker-compose exec phpfpm "$@" - -#!/bin/bash - -source bin/vars/color-vars CONTAINER_LOG_PATH="/var/www/html/var/log/"; From b44ac20caf0e22122d1c322ccdb9995dfd43a013 Mon Sep 17 00:00:00 2001 From: Michael Lehmkuhl Date: Tue, 13 Feb 2024 10:15:04 -0600 Subject: [PATCH 020/115] Update default Magento version to 2.4.6-p4 --- README.md | 12 ++++++------ compose/bin/download | 2 +- lib/onelinesetup | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e3d22bad9..5c69c49d8 100644 --- a/README.md +++ b/README.md @@ -134,10 +134,10 @@ 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.6-p3 community +curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test 2.4.6-p4 community ``` -The `magento.test` above defines the hostname to use, and the `2.4.6-p3` 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 `magento.test` above defines the hostname to use, and the `2.4.6-p4` 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://magento.test`. @@ -165,10 +165,10 @@ 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.6-p3 community +bin/download 2.4.6-p4 community # You can specify the version and type (community, enterprise, mageos, mageos-nightly, mageos-mirror, mageos-hypernode-mirror, or mageos-maxcluster-mirror). # The mageos type is an alias for mageos-mirror. -# If no arguments are passed, "2.4.6-p3" and "community" are the default values used. +# If no arguments are passed, "2.4.6-p4" and "community" are the default values used. # or for Magento core development: # bin/start --no-dev @@ -282,7 +282,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 `compose.yml` and `compose.dev.yml` -- `bin/download`: Download specific Magento version from Composer to the container, with optional arguments of the version (2.4.6-p3 [default]) and type ("community" [default], "enterprise", or "mageos"). Ex. `bin/download 2.4.6-p3 enterprise` +- `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/fixowns`: This will fix filesystem ownerships within the container. @@ -598,7 +598,7 @@ To use it: In Cloudflare Tunnel configuration, configure the service URL to use type `HTTPS` and a URL of `{name of app container}:{HTTPS port of app container}`. For examplem, `demo-app-1:8443`. Enable the `No TLS Verify` option, since our local certificates are self-signed. You should now be able to access your app via the public hostname defined in Cloudflare Tunnel. -NOTE: Do not leave instances with Cloudflare Tunnel enabled running long-term, as your instance is publicly available to the world. You should ideally turn off tunnel container once testing is finished. +NOTE: Do not leave instances with Cloudflare Tunnel enabled running long-term, as your instance is publicly available to the world. You should ideally turn off tunnel container once testing is finished. ### MFTF diff --git a/compose/bin/download b/compose/bin/download index c8a2c5bf7..4daf08019 100755 --- a/compose/bin/download +++ b/compose/bin/download @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERSION=${1:-2.4.6-p3} +VERSION=${1:-2.4.6-p4} EDITION=${2:-community} bin/stop diff --git a/lib/onelinesetup b/lib/onelinesetup index 1d76ba343..d802f4593 100755 --- a/lib/onelinesetup +++ b/lib/onelinesetup @@ -2,7 +2,7 @@ set -o errexit DOMAIN=${1:-magento.test} -VERSION=${2:-2.4.6-p3} +VERSION=${2:-2.4.6-p4} EDITION=${3:-community} curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash From 7f1cf8a59ba3a00c7bd9217915efd4e49113e26a Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 24 Sep 2021 13:15:12 +0200 Subject: [PATCH 021/115] add php-spx profiler --- README.md | 14 ++++++++++++++ images/php/8.1/conf/php-fpm.conf | 3 +++ images/php/8.1/conf/php.ini | 9 ++++++++- images/php/8.2/conf/php-fpm.conf | 3 +++ images/php/8.2/conf/php.ini | 9 ++++++++- 5 files changed, 36 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e3d22bad9..f00c15508 100644 --- a/README.md +++ b/README.md @@ -586,6 +586,7 @@ Next, open up the `bin/start` helper script and uncomment the line: Finally, restart the containers with `bin/restart`. After doing so, everything is now configured and you can use a browser extension to profile your Magento store with Blackfire. +<<<<<<< HEAD ### Cloudflare Tunnel These docker images have built-in support for Cloudflare Tunnel. It can be useful for testing implementations that require some third-party integrations involving allow-listing domains. Since your local app cannot be allow-listed by other services, you can use Cloudflare Tunnel to get a public hostname that can be allow-listed on the other service. @@ -692,6 +693,19 @@ body { Upon saving this file, we will see the Grunt watcher detect the changes, and your browser should automatically load the new style without you needing to refresh the page, and without a full browser refresh. +### PHP-SPX + +The images also have additional profiler-tracers built-in to the Web UI. + +To access the control panel, just open the following URL: `https://magento.test/?SPX_KEY=dev&SPX_UI_URI=/` + +Profiling is also possible via command line and curl: + +``` +SPX_ENABLED=1 SPX_REPORT=full bin/magento {command_name} +curl --cookie "SPX_ENABLED=1; SPX_KEY=dev" https://magento.test/ +``` + ## Credits ### M.academy diff --git a/images/php/8.1/conf/php-fpm.conf b/images/php/8.1/conf/php-fpm.conf index 5e875011b..b4ee7d2eb 100644 --- a/images/php/8.1/conf/php-fpm.conf +++ b/images/php/8.1/conf/php-fpm.conf @@ -29,3 +29,6 @@ clear_env = no ; Ensure worker stdout and stderr are sent to the main error log. catch_workers_output = yes + +; This needed to make PHP-SPX work in fpm mode +process.dumpable = yes \ No newline at end of file diff --git a/images/php/8.1/conf/php.ini b/images/php/8.1/conf/php.ini index abede9e1c..f4e2761df 100644 --- a/images/php/8.1/conf/php.ini +++ b/images/php/8.1/conf/php.ini @@ -1,6 +1,6 @@ memory_limit = 4G max_execution_time = 1800 -zlib.output_compression = On +zlib.output_compression = 0 cgi.fix_pathinfo = 0 date.timezone = UTC @@ -13,3 +13,10 @@ post_max_size = 100M max_input_vars = 10000 sendmail_path = "/usr/bin/msmtp -t" + +#SPX profiler +extension = /usr/lib/php-spx/modules/spx.so +spx.http_enabled = 1 +spx.http_key = "dev" +spx.http_ip_whitelist = "*" +spx.data_dir = /var/www/spx_dumps diff --git a/images/php/8.2/conf/php-fpm.conf b/images/php/8.2/conf/php-fpm.conf index 5e875011b..b4ee7d2eb 100644 --- a/images/php/8.2/conf/php-fpm.conf +++ b/images/php/8.2/conf/php-fpm.conf @@ -29,3 +29,6 @@ clear_env = no ; Ensure worker stdout and stderr are sent to the main error log. catch_workers_output = yes + +; This needed to make PHP-SPX work in fpm mode +process.dumpable = yes \ No newline at end of file diff --git a/images/php/8.2/conf/php.ini b/images/php/8.2/conf/php.ini index abede9e1c..f4e2761df 100644 --- a/images/php/8.2/conf/php.ini +++ b/images/php/8.2/conf/php.ini @@ -1,6 +1,6 @@ memory_limit = 4G max_execution_time = 1800 -zlib.output_compression = On +zlib.output_compression = 0 cgi.fix_pathinfo = 0 date.timezone = UTC @@ -13,3 +13,10 @@ post_max_size = 100M max_input_vars = 10000 sendmail_path = "/usr/bin/msmtp -t" + +#SPX profiler +extension = /usr/lib/php-spx/modules/spx.so +spx.http_enabled = 1 +spx.http_key = "dev" +spx.http_ip_whitelist = "*" +spx.data_dir = /var/www/spx_dumps From e1d271c049d0e4b7ab5a1371466e5bffdfa08468 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 24 Sep 2021 13:23:44 +0200 Subject: [PATCH 022/115] cr --- images/php/8.1/conf/php-fpm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/php/8.1/conf/php-fpm.conf b/images/php/8.1/conf/php-fpm.conf index b4ee7d2eb..721f29b7c 100644 --- a/images/php/8.1/conf/php-fpm.conf +++ b/images/php/8.1/conf/php-fpm.conf @@ -31,4 +31,4 @@ clear_env = no catch_workers_output = yes ; This needed to make PHP-SPX work in fpm mode -process.dumpable = yes \ No newline at end of file +process.dumpable = yes From 404ff359750e7deab47373dddde17f76b2a5ce52 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 24 Sep 2021 13:24:35 +0200 Subject: [PATCH 023/115] cr --- images/php/8.2/conf/php-fpm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/php/8.2/conf/php-fpm.conf b/images/php/8.2/conf/php-fpm.conf index b4ee7d2eb..721f29b7c 100644 --- a/images/php/8.2/conf/php-fpm.conf +++ b/images/php/8.2/conf/php-fpm.conf @@ -31,4 +31,4 @@ clear_env = no catch_workers_output = yes ; This needed to make PHP-SPX work in fpm mode -process.dumpable = yes \ No newline at end of file +process.dumpable = yes From 6ff4f2e65fba1f18f597cf07009cabf4260553a2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 20 Sep 2022 16:46:55 +0200 Subject: [PATCH 024/115] sync PR --- README.md | 18 ++++++++++++++++++ images/php/8.1/Dockerfile | 5 +++++ images/php/8.1/conf/spx.ini | 7 +++++++ images/php/8.2/Dockerfile | 7 ++++++- images/php/8.2/conf/spx.ini | 7 +++++++ 5 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 images/php/8.1/conf/spx.ini create mode 100644 images/php/8.2/conf/spx.ini diff --git a/README.md b/README.md index f00c15508..ec20437e6 100644 --- a/README.md +++ b/README.md @@ -520,6 +520,24 @@ Otherwise, this project now automatically sets up Xdebug support with VS Code. I * Ensure the Chrome Xdebug helper is enabled by clicking on it and selecting Debug. The icon should turn bright green. * Navigate to your Magento store URL, and Xdebug should now trigger the debugger within PhpStorm at the toggled breakpoint. +### PHP-SPX + +The images also have additional profiler-tracer with built-in web UI. + +To access the control panel just open the following URL. + +``` +https://magento.test/?SPX_KEY=dev&SPX_UI_URI=/ +``` +Profiling is also possible via command line and curl: + +``` +SPX_ENABLED=1 SPX_REPORT=full bin/magento {command_name} +``` +``` +curl --cookie "SPX_ENABLED=1; SPX_KEY=dev" https://magento.test/ +``` + ### 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`. diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index 5cce619c7..c7ab37d72 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y \ nodejs \ procps \ vim \ + zlib1g-dev \ zip \ && rm -rf /var/lib/apt/lists/* @@ -83,10 +84,14 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz +RUN cd /usr/lib && git clone https://github.com/NoiseByNorthwest/php-spx.git +RUN cd /usr/lib/php-spx && phpize && ./configure && make && make install + RUN curl -sS https://getcomposer.org/installer | \ php -- --install-dir=/usr/local/bin --filename=composer COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini +COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini COPY conf/msmtprc /etc/msmtprc COPY conf/php.ini $PHP_INI_DIR COPY conf/php-fpm.conf /usr/local/etc/ diff --git a/images/php/8.1/conf/spx.ini b/images/php/8.1/conf/spx.ini new file mode 100644 index 000000000..9746d5f0f --- /dev/null +++ b/images/php/8.1/conf/spx.ini @@ -0,0 +1,7 @@ +zlib.output_compression = 0 + +extension = /usr/lib/php-spx/modules/spx.so +spx.http_enabled = 1 +spx.http_key = "dev" +spx.http_ip_whitelist = "*" +spx.data_dir = /var/www/spx_dumps diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index f87faac79..e9775d03b 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y \ nodejs \ procps \ vim \ + zlib1g-dev \ zip \ && rm -rf /var/lib/apt/lists/* @@ -81,12 +82,16 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && mkdir -p /tmp/blackfire \ && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz + && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ + +RUN cd /usr/lib && git clone https://github.com/NoiseByNorthwest/php-spx.git +RUN cd /usr/lib/php-spx && phpize && ./configure && make && make install RUN curl -sS https://getcomposer.org/installer | \ php -- --install-dir=/usr/local/bin --filename=composer COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini +COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini COPY conf/msmtprc /etc/msmtprc COPY conf/php.ini $PHP_INI_DIR COPY conf/php-fpm.conf /usr/local/etc/ diff --git a/images/php/8.2/conf/spx.ini b/images/php/8.2/conf/spx.ini new file mode 100644 index 000000000..9746d5f0f --- /dev/null +++ b/images/php/8.2/conf/spx.ini @@ -0,0 +1,7 @@ +zlib.output_compression = 0 + +extension = /usr/lib/php-spx/modules/spx.so +spx.http_enabled = 1 +spx.http_key = "dev" +spx.http_ip_whitelist = "*" +spx.data_dir = /var/www/spx_dumps From df446185660d1bc46e797cf89a4fd6c0c08241c4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 20 Sep 2022 16:54:22 +0200 Subject: [PATCH 025/115] typo --- images/php/8.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index e9775d03b..0114711f4 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -82,7 +82,7 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && mkdir -p /tmp/blackfire \ && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ - && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ + && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz RUN cd /usr/lib && git clone https://github.com/NoiseByNorthwest/php-spx.git RUN cd /usr/lib/php-spx && phpize && ./configure && make && make install From ae782910e1221e144eee186d3a28c11bec0476c5 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Fri, 23 Feb 2024 14:57:17 -0500 Subject: [PATCH 026/115] Put apt package in alphabetical order --- images/php/8.1/Dockerfile | 2 +- images/php/8.2/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index c7ab37d72..82e03385e 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -35,8 +35,8 @@ RUN apt-get update && apt-get install -y \ nodejs \ procps \ vim \ - zlib1g-dev \ zip \ + zlib1g-dev \ && rm -rf /var/lib/apt/lists/* RUN pecl channel-update pecl.php.net && pecl install \ diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index 0114711f4..b8b1c9707 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -35,8 +35,8 @@ RUN apt-get update && apt-get install -y \ nodejs \ procps \ vim \ - zlib1g-dev \ zip \ + zlib1g-dev \ && rm -rf /var/lib/apt/lists/* RUN pecl channel-update pecl.php.net && pecl install \ From 9cd78e3cf956a90263b7279ec4b7a7b928df2e1a Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Fri, 23 Feb 2024 15:18:48 -0500 Subject: [PATCH 027/115] Standarize config 0's and 1's, comments --- images/php/8.1/Dockerfile | 9 +++++++-- images/php/8.1/conf/php-fpm.conf | 2 +- images/php/8.1/conf/php.ini | 9 +-------- images/php/8.2/Dockerfile | 9 +++++++-- images/php/8.2/conf/php-fpm.conf | 2 +- images/php/8.2/conf/php.ini | 9 +-------- 6 files changed, 18 insertions(+), 22 deletions(-) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index 82e03385e..b5818381c 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -84,8 +84,13 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz -RUN cd /usr/lib && git clone https://github.com/NoiseByNorthwest/php-spx.git -RUN cd /usr/lib/php-spx && phpize && ./configure && make && make install +RUN cd /usr/lib \ + && git clone --depth=1 https://github.com/NoiseByNorthwest/php-spx.git \ + && /usr/lib/php-spx \ + && phpize \ + && ./configure \ + && make \ + && make install RUN curl -sS https://getcomposer.org/installer | \ php -- --install-dir=/usr/local/bin --filename=composer diff --git a/images/php/8.1/conf/php-fpm.conf b/images/php/8.1/conf/php-fpm.conf index 721f29b7c..e69b8fee3 100644 --- a/images/php/8.1/conf/php-fpm.conf +++ b/images/php/8.1/conf/php-fpm.conf @@ -30,5 +30,5 @@ clear_env = no ; Ensure worker stdout and stderr are sent to the main error log. catch_workers_output = yes -; This needed to make PHP-SPX work in fpm mode +; This needed to make PHP-SPX work in fpm mode. process.dumpable = yes diff --git a/images/php/8.1/conf/php.ini b/images/php/8.1/conf/php.ini index f4e2761df..608c5ff8e 100644 --- a/images/php/8.1/conf/php.ini +++ b/images/php/8.1/conf/php.ini @@ -1,6 +1,6 @@ memory_limit = 4G max_execution_time = 1800 -zlib.output_compression = 0 +zlib.output_compression = 1 cgi.fix_pathinfo = 0 date.timezone = UTC @@ -13,10 +13,3 @@ post_max_size = 100M max_input_vars = 10000 sendmail_path = "/usr/bin/msmtp -t" - -#SPX profiler -extension = /usr/lib/php-spx/modules/spx.so -spx.http_enabled = 1 -spx.http_key = "dev" -spx.http_ip_whitelist = "*" -spx.data_dir = /var/www/spx_dumps diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index b8b1c9707..34df878c5 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -84,8 +84,13 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz -RUN cd /usr/lib && git clone https://github.com/NoiseByNorthwest/php-spx.git -RUN cd /usr/lib/php-spx && phpize && ./configure && make && make install +RUN cd /usr/lib \ + && git clone --depth=1 https://github.com/NoiseByNorthwest/php-spx.git \ + && /usr/lib/php-spx \ + && phpize \ + && ./configure \ + && make \ + && make install RUN curl -sS https://getcomposer.org/installer | \ php -- --install-dir=/usr/local/bin --filename=composer diff --git a/images/php/8.2/conf/php-fpm.conf b/images/php/8.2/conf/php-fpm.conf index 721f29b7c..e69b8fee3 100644 --- a/images/php/8.2/conf/php-fpm.conf +++ b/images/php/8.2/conf/php-fpm.conf @@ -30,5 +30,5 @@ clear_env = no ; Ensure worker stdout and stderr are sent to the main error log. catch_workers_output = yes -; This needed to make PHP-SPX work in fpm mode +; This needed to make PHP-SPX work in fpm mode. process.dumpable = yes diff --git a/images/php/8.2/conf/php.ini b/images/php/8.2/conf/php.ini index f4e2761df..608c5ff8e 100644 --- a/images/php/8.2/conf/php.ini +++ b/images/php/8.2/conf/php.ini @@ -1,6 +1,6 @@ memory_limit = 4G max_execution_time = 1800 -zlib.output_compression = 0 +zlib.output_compression = 1 cgi.fix_pathinfo = 0 date.timezone = UTC @@ -13,10 +13,3 @@ post_max_size = 100M max_input_vars = 10000 sendmail_path = "/usr/bin/msmtp -t" - -#SPX profiler -extension = /usr/lib/php-spx/modules/spx.so -spx.http_enabled = 1 -spx.http_key = "dev" -spx.http_ip_whitelist = "*" -spx.data_dir = /var/www/spx_dumps From 2a17542249554fe31347f23589090f693d953fc9 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 09:32:55 -0500 Subject: [PATCH 028/115] Tidy up readme --- README.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/README.md b/README.md index ec20437e6..ca7fda9b7 100644 --- a/README.md +++ b/README.md @@ -520,24 +520,6 @@ Otherwise, this project now automatically sets up Xdebug support with VS Code. I * Ensure the Chrome Xdebug helper is enabled by clicking on it and selecting Debug. The icon should turn bright green. * Navigate to your Magento store URL, and Xdebug should now trigger the debugger within PhpStorm at the toggled breakpoint. -### PHP-SPX - -The images also have additional profiler-tracer with built-in web UI. - -To access the control panel just open the following URL. - -``` -https://magento.test/?SPX_KEY=dev&SPX_UI_URI=/ -``` -Profiling is also possible via command line and curl: - -``` -SPX_ENABLED=1 SPX_REPORT=full bin/magento {command_name} -``` -``` -curl --cookie "SPX_ENABLED=1; SPX_KEY=dev" https://magento.test/ -``` - ### 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`. @@ -604,7 +586,6 @@ Next, open up the `bin/start` helper script and uncomment the line: Finally, restart the containers with `bin/restart`. After doing so, everything is now configured and you can use a browser extension to profile your Magento store with Blackfire. -<<<<<<< HEAD ### Cloudflare Tunnel These docker images have built-in support for Cloudflare Tunnel. It can be useful for testing implementations that require some third-party integrations involving allow-listing domains. Since your local app cannot be allow-listed by other services, you can use Cloudflare Tunnel to get a public hostname that can be allow-listed on the other service. From ab37bf649cb6b9c5ef55ce974d656a7ff0d2a924 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 09:45:05 -0500 Subject: [PATCH 029/115] Fix & simplify checkoout of php-spx repo, peg to specific version to avoid updates to the project breaking the build --- images/php/8.1/Dockerfile | 5 ++--- images/php/8.2/Dockerfile | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index b5818381c..af3e488ae 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -84,9 +84,8 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz -RUN cd /usr/lib \ - && git clone --depth=1 https://github.com/NoiseByNorthwest/php-spx.git \ - && /usr/lib/php-spx \ +RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php-spx.git /usr/lib/php-spx \ + && cd /usr/lib/php-spx \ && phpize \ && ./configure \ && make \ diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index 34df878c5..ef84f943d 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -84,9 +84,8 @@ RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz -RUN cd /usr/lib \ - && git clone --depth=1 https://github.com/NoiseByNorthwest/php-spx.git \ - && /usr/lib/php-spx \ +RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php-spx.git /usr/lib/php-spx \ + && cd /usr/lib/php-spx \ && phpize \ && ./configure \ && make \ From 59a8d33e9011085ec87ca7c420eff25d74bf85b9 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 14:26:16 -0500 Subject: [PATCH 030/115] Renamed script to bin/docker-stats, added README --- README.md | 1 + compose/bin/{container-monitoring => docker-stats} | 0 2 files changed, 1 insertion(+) rename compose/bin/{container-monitoring => docker-stats} (100%) diff --git a/README.md b/README.md index 485884b80..13d38677f 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,7 @@ It is recommended to keep your root docker config files in one repository, and y - `bin/download`: Download specific Magento version from Composer to the container, with optional arguments of the version (2.4.6-p3 [default]) and type ("community" [default], "enterprise", or "mageos"). Ex. `bin/download 2.4.6-p3 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` diff --git a/compose/bin/container-monitoring b/compose/bin/docker-stats similarity index 100% rename from compose/bin/container-monitoring rename to compose/bin/docker-stats From 39eae489328c2c181e68c51142a77bf5f936bb05 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 14:27:38 -0500 Subject: [PATCH 031/115] Fix failing shellcheck SC2086 --- compose/bin/docker-stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/bin/docker-stats b/compose/bin/docker-stats index a74a62afe..83cac7a78 100755 --- a/compose/bin/docker-stats +++ b/compose/bin/docker-stats @@ -7,4 +7,4 @@ if [ -z "$container_ids" ]; then exit 1 fi -docker stats $container_ids +docker stats "$container_ids" From 82ffbaf7475feaae58c50b9c67349f3f0352ac2a Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 14:31:32 -0500 Subject: [PATCH 032/115] Added documentation to make command --- compose/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/Makefile b/compose/Makefile index c02b05f22..a564af9cb 100644 --- a/compose/Makefile +++ b/compose/Makefile @@ -31,6 +31,7 @@ help: @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-stats,'Display status for CPU, memory usage, 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.')" From 7b984b995746f82453a9aecd5075e1893261cefa Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 14:57:05 -0500 Subject: [PATCH 033/115] Re-ordered strace for OCD purposes --- images/php/8.1/Dockerfile | 2 +- images/php/8.2/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index 4e24486f7..9d63ba33a 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -11,7 +11,6 @@ RUN mkdir -p /etc/nginx/html /var/www/html /sock \ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - RUN apt-get update && apt-get install -y \ - strace \ cron \ default-mysql-client \ git \ @@ -35,6 +34,7 @@ RUN apt-get update && apt-get install -y \ msmtp \ nodejs \ procps \ + strace \ vim \ zip \ && rm -rf /var/lib/apt/lists/* diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index 0125bbf52..3584bef8c 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -11,7 +11,6 @@ RUN mkdir -p /etc/nginx/html /var/www/html /sock \ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - RUN apt-get update && apt-get install -y \ - strace \ cron \ default-mysql-client \ git \ @@ -35,6 +34,7 @@ RUN apt-get update && apt-get install -y \ msmtp \ nodejs \ procps \ + strace \ vim \ zip \ && rm -rf /var/lib/apt/lists/* From 041f5545687628a501b6d602f217a05d15bd89b3 Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sat, 24 Feb 2024 22:36:57 +0200 Subject: [PATCH 034/115] Modified script --- compose/bin/{extra-settings => configure-linux} | 0 compose/compose.yaml | 4 ++++ 2 files changed, 4 insertions(+) rename compose/bin/{extra-settings => configure-linux} (100%) diff --git a/compose/bin/extra-settings b/compose/bin/configure-linux similarity index 100% rename from compose/bin/extra-settings rename to compose/bin/configure-linux diff --git a/compose/compose.yaml b/compose/compose.yaml index c7366302e..3a0545199 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -66,6 +66,8 @@ services: ## More info at https://github.com/markshust/docker-magento/issues/488 - "cluster.routing.allocation.disk.threshold_enabled=false" - "index.blocks.read_only_allow_delete" + ## Uncomment the following line to increase the virtual memory map count for OpenSearch + # - "max_map_count=262144" ## If you wish to use Elasticsearch, comment out opensearch image above and ## uncomment this block. Do the same in the composer.healthcheck.yaml file. @@ -84,6 +86,8 @@ services: # ## More info at https://github.com/markshust/docker-magento/issues/488 # - "cluster.routing.allocation.disk.threshold_enabled=false" # - "index.blocks.read_only_allow_delete" + # ## Uncomment the following line to increase the virtual memory map count for ElasticSearch + # - "max_map_count=262144" rabbitmq: image: markoshust/magento-rabbitmq:3.11-0 From 4859c1b8a70d47b0d24f9bd748b106b60a70b66e Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 15:40:44 -0500 Subject: [PATCH 035/115] Updates to pass shellcheck (thanks ChatGPT) --- compose/bin/log | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/compose/bin/log b/compose/bin/log index 574912f2c..53ff9198d 100755 --- a/compose/bin/log +++ b/compose/bin/log @@ -17,30 +17,30 @@ Options: } generate_logs_file_path() { - CONTAINER_LOG_PATH="$1" - LOG_FILES="$2" + local container_log_path="$1" + shift # This shifts the positional parameters to the left, so $2 becomes $1, $3 becomes $2, etc. + local log_files=("$@") + local log_file_paths=() - log_file_paths="" - - for file in $LOG_FILES; do - log_file_paths+="$CONTAINER_LOG_PATH$file " + for file in "${log_files[@]}"; do + log_file_paths+=("$container_log_path$file") done - echo "$log_file_paths" + echo "${log_file_paths[@]}" } get_all_logs_file_path() { - LOGS_LOCATION="$1" + local logs_location="$1" - echo $(bin/docker-compose exec phpfpm ls -p "$LOGS_LOCATION" | grep -v '/$' | sed "s|^|$LOGS_LOCATION|"); + bin/docker-compose exec phpfpm ls -p "$logs_location" | grep -v '/$' | sed "s|^|$logs_location|" } if [[ $1 == "-h" || $1 == "--help" ]]; then display_help elif [[ -z $1 ]]; then - All_LOGS_FILE_PATH=$(get_all_logs_file_path "$CONTAINER_LOG_PATH") - bin/docker-compose exec phpfpm tail -f $All_LOGS_FILE_PATH + mapfile -t all_logs_file_path < <(get_all_logs_file_path "$CONTAINER_LOG_PATH") + bin/docker-compose exec phpfpm tail -f "${all_logs_file_path[@]}" else - LOGS_FILE_PATH=$(generate_logs_file_path "$CONTAINER_LOG_PATH" "$1") - bin/docker-compose exec phpfpm tail -f $LOGS_FILE_PATH + mapfile -t logs_file_path < <(generate_logs_file_path "$CONTAINER_LOG_PATH" "$@") + bin/docker-compose exec phpfpm tail -f "${logs_file_path[@]}" fi From c3e761e3f8ad4ed005e688478488f01620ac2874 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 15:42:40 -0500 Subject: [PATCH 036/115] Added bin/log to readme --- README.md | 1 + compose/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index e3d22bad9..272fe0a59 100644 --- a/README.md +++ b/README.md @@ -289,6 +289,7 @@ It is recommended to keep your root docker config files in one repository, and y - `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/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` diff --git a/compose/Makefile b/compose/Makefile index c02b05f22..80e3bfbd0 100644 --- a/compose/Makefile +++ b/compose/Makefile @@ -35,6 +35,7 @@ help: @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,log,'Monitor the Magento log files. Pass no params to tail all files.')" @echo "$(call format,magento,'Run the Magento CLI.')" @echo "$(call format,mftf,'Run the Magento MFTF.')" @echo "$(call format,mysql,'Run the MySQL CLI with database config from env/db.env.')" From 6516adfe1307eadc8956611fb9fe351fe3b9df3d Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sat, 24 Feb 2024 22:45:24 +0200 Subject: [PATCH 037/115] changed script name --- compose/bin/configure-linux | 49 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/compose/bin/configure-linux b/compose/bin/configure-linux index c9998a246..7573cef02 100755 --- a/compose/bin/configure-linux +++ b/compose/bin/configure-linux @@ -1,35 +1,30 @@ #!/bin/bash -# Get the IP address from the Docker container -docker_ip=$(docker run --rm alpine ip route | awk 'NR==1 {print $3}') +# Check if the script is running on Linux +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + # Get the IP address from the Docker container + docker_ip=$(docker run --rm alpine ip route | awk 'NR==1 {print $3}') -# Check if the IP address already exists in /etc/hosts -if grep -q "$docker_ip host.docker.internal" /etc/hosts; then - echo "The entry already exists in /etc/hosts. No action needed." -else - # Add a new entry to /etc/hosts - echo "$docker_ip host.docker.internal" | sudo tee -a /etc/hosts - echo "A new entry in the /etc/hosts file has been created" -fi - -# Ask the user whether to execute the iptables command -read -p "Do you want to open port 9003 for xdebug? (y/n): " choice -if [ "$choice" == "y" ]; then - sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT - echo "Port 9003 has been opened for xdebug." -fi - -# Ask the user whether to increase the virtual memory map count for Elasticsearch -read -p "Do you need to increase the virtual memory map count for Elasticsearch? (y/n): " vm_choice -if [ "$vm_choice" == "y" ]; then - # Check if the setting already exists in /etc/sysctl.conf - if ! grep -q "vm.max_map_count=262144" /etc/sysctl.conf; then - echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf - sudo sysctl -p - echo "The virtual memory map count has been increased for Elasticsearch." + # Check if the IP address already exists in /etc/hosts + if grep -q "$docker_ip host.docker.internal" /etc/hosts; then + echo "The entry already exists in /etc/hosts. No action needed." else - echo "The setting vm.max_map_count=262144 already exists in /etc/sysctl.conf." + # Add a new entry to /etc/hosts + echo "$docker_ip host.docker.internal" | sudo tee -a /etc/hosts + echo "A new entry in the /etc/hosts file has been created" fi + + # Ask the user whether to execute the iptables command + read -p "Do you want to open port 9003 for xdebug? (y/n): " choice + if [ "$choice" == "y" ]; then + sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT + echo "Port 9003 has been opened for xdebug." + fi +elif [[ "$OSTYPE" == "darwin"* ]]; then + echo "This script is designed for Linux and may not work properly on macOS." +else + echo "Unsupported operating system." fi echo "Tasks completed successfully" + From 17aaf5db41721f7a66897c76da772e9277f86f77 Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sat, 24 Feb 2024 22:50:56 +0200 Subject: [PATCH 038/115] fix ShellCheck --- compose/bin/configure-linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/bin/configure-linux b/compose/bin/configure-linux index 7573cef02..a2ff668e1 100755 --- a/compose/bin/configure-linux +++ b/compose/bin/configure-linux @@ -15,7 +15,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then fi # Ask the user whether to execute the iptables command - read -p "Do you want to open port 9003 for xdebug? (y/n): " choice + read -r -p "Do you want to open port 9003 for xdebug? (y/n): " choice if [ "$choice" == "y" ]; then sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT echo "Port 9003 has been opened for xdebug." From 5f063a3e88bfcaf56de07d44ba317558624a4199 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 17:04:39 -0500 Subject: [PATCH 039/115] Added additional documentation about SPX --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b154e59e..c771ec92c 100644 --- a/README.md +++ b/README.md @@ -698,15 +698,28 @@ Upon saving this file, we will see the Grunt watcher detect the changes, and you The images also have additional profiler-tracers built-in to the Web UI. -To access the control panel, just open the following URL: `https://magento.test/?SPX_KEY=dev&SPX_UI_URI=/` +To access the control panel, just open the following URL: `https://magento.test/?SPX_UI_URI=/` -Profiling is also possible via command line and curl: +**Suggested Configuration** + +- Enabled: Checked +- Automatic start: Checked +- Profile internal functions: Unchecked +- Sampling: 5ms +- Max profiling depth: Unlimited +- Additional metrics: Unselected + +Changing any options on this page set cookies for the domain for these settings. After then visiting a page on the frontend, you can navigate back to the GUI and scroll to the bottom of the page, and click the related request to view the trace of the request & response. + +Profiling is also possible via command line, or curl: ``` -SPX_ENABLED=1 SPX_REPORT=full bin/magento {command_name} -curl --cookie "SPX_ENABLED=1; SPX_KEY=dev" https://magento.test/ +SPX_REPORT=full SPX_ENABLED=1 SPX_SAMPLING_PERIOD=5000 bin/magento {command_name} +curl --cookie "SPX_REPORT=full; SPX_ENABLED=1; SPX_SAMPLING_PERIOD=5000" https://magento.test/ ``` +Additional information of how to work with SPX is available at https://www.youtube.com/watch?v=xk-JiBLsKfA + ## Credits ### M.academy From 6d1118b0de811e7a14704302e7443a9ea820fff8 Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sun, 25 Feb 2024 00:36:53 +0200 Subject: [PATCH 040/115] Added the ability to create a customer --- compose/bin/admin-user-create | 24 ---------- compose/bin/create-user | 85 +++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 24 deletions(-) delete mode 100755 compose/bin/admin-user-create create mode 100755 compose/bin/create-user diff --git a/compose/bin/admin-user-create b/compose/bin/admin-user-create deleted file mode 100755 index e391b3e6d..000000000 --- a/compose/bin/admin-user-create +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -USERNAME="admin" -EMAIL="admin@example.com" -FIRSTNAME="Admin" -LASTNAME="Admin" -PASSWORD="Admin123" - -bin/magento admin:user:create \ - --admin-user=${USERNAME} \ - --admin-password=${PASSWORD} \ - --admin-email=${EMAIL} \ - --admin-firstname=${FIRSTNAME} \ - --admin-lastname=${LASTNAME} - -if [ $? -eq 0 ]; then - echo "Username: ${USERNAME}" - echo "Email: ${EMAIL}" - echo "Firstname: ${FIRSTNAME}" - echo "Lastname: ${LASTNAME}" - echo "Password: ${PASSWORD}" -else - echo "Error creating admin user." -fi diff --git a/compose/bin/create-user b/compose/bin/create-user new file mode 100755 index 000000000..b48ca52dd --- /dev/null +++ b/compose/bin/create-user @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +# Function to create admin user +create_admin_user() { + USERNAME="admin" + EMAIL="admin@example.com" + FIRSTNAME="Admin" + LASTNAME="Admin" + PASSWORD="Admin123" + + bin/magento admin:user:create \ + --admin-user=${USERNAME} \ + --admin-password=${PASSWORD} \ + --admin-email=${EMAIL} \ + --admin-firstname=${FIRSTNAME} \ + --admin-lastname=${LASTNAME} + + if [ $? -eq 0 ]; then + echo "Admin account created successfully." + echo "Username: ${USERNAME}" + echo "Email: ${EMAIL}" + echo "Firstname: ${FIRSTNAME}" + echo "Lastname: ${LASTNAME}" + echo "Password: ${PASSWORD}" + else + echo "Error creating admin user." + fi +} + +# Function to create customer account +create_customer_account() { + EMAIL=${EMAIL:-"customer@example.com"} + PASSWORD=${PASSWORD:-"customer123QWERTY"} + FIRSTNAME=${FIRSTNAME:-"Customer"} + LASTNAME=${LASTNAME:-"Customer"} + + bin/n98-magerun2 customer:create ${EMAIL} ${PASSWORD} ${FIRSTNAME} ${LASTNAME} ${WEBSITE} + + if [ $? -eq 0 ]; then + echo "Customer account created successfully." + echo "Email: ${EMAIL}" + echo "Firstname: ${FIRSTNAME}" + echo "Lastname: ${LASTNAME}" + echo "Password: ${PASSWORD}" + else + echo "Error creating customer account." + fi +} + +# Check if n98-magerun2.phar exists, if not download and install +if ! bin/cliq ls bin/n98-magerun2; then + echo "Checking if n98-magerun2.phar exists, just a moment..." + bin/clinotty curl -sS -O https://files.magerun.net/n98-magerun2.phar + bin/clinotty curl -sS -o n98-magerun2.phar.sha256 https://files.magerun.net/sha256.php?file=n98-magerun2.phar + bin/clinotty shasum -a 256 -c n98-magerun2.phar.sha256 + [ $? != 0 ] && echo "sha256 checksum do not match!" && exit + + bin/cliq chmod +x n98-magerun2.phar + bin/cliq mkdir -p bin + bin/cliq mv n98-magerun2.phar bin +fi + +# Prompt user for type of account to create +read -p "Do you want to create an admin (A) or a customer (C) account? [A/C]: " account_type + +if [[ "$account_type" == "A" || "$account_type" == "a" ]]; then + create_admin_user +elif [[ "$account_type" == "C" || "$account_type" == "c" ]]; then + read -p "Do you want to use default values for customer account? (Y/N): " use_defaults + if [[ "$use_defaults" == "Y" || "$use_defaults" == "y" ]]; then + create_customer_account + elif [[ "$use_defaults" == "N" || "$use_defaults" == "n" ]]; then + read -p "Enter customer email: " EMAIL + read -p "Enter customer password: " PASSWORD + read -p "Enter customer firstname: " FIRSTNAME + read -p "Enter customer lastname: " LASTNAME + read -p "Enter customer website: " WEBSITE + create_customer_account + else + echo "Invalid option. Please choose either Y or N." + fi +else + echo "Invalid option. Please choose either A or C." +fi + From c3537935cff1ec7f8313f8526fa71f2e1584a7e8 Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sun, 25 Feb 2024 00:41:56 +0200 Subject: [PATCH 041/115] Fix ShellCheck --- compose/bin/create-user | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/compose/bin/create-user b/compose/bin/create-user index b48ca52dd..840a39cde 100755 --- a/compose/bin/create-user +++ b/compose/bin/create-user @@ -8,12 +8,12 @@ create_admin_user() { LASTNAME="Admin" PASSWORD="Admin123" - bin/magento admin:user:create \ - --admin-user=${USERNAME} \ - --admin-password=${PASSWORD} \ - --admin-email=${EMAIL} \ - --admin-firstname=${FIRSTNAME} \ - --admin-lastname=${LASTNAME} + bin/magento admin:user:create \ + --admin-user="${USERNAME}" \ + --admin-password="${PASSWORD}" \ + --admin-email="${EMAIL}" \ + --admin-firstname="${FIRSTNAME}" \ + --admin-lastname="${LASTNAME}" if [ $? -eq 0 ]; then echo "Admin account created successfully." @@ -34,7 +34,7 @@ create_customer_account() { FIRSTNAME=${FIRSTNAME:-"Customer"} LASTNAME=${LASTNAME:-"Customer"} - bin/n98-magerun2 customer:create ${EMAIL} ${PASSWORD} ${FIRSTNAME} ${LASTNAME} ${WEBSITE} + bin/n98-magerun2 customer:create "${EMAIL}" "${PASSWORD}" ${FIRSTNAME} ${LASTNAME} "${WEBSITE}" if [ $? -eq 0 ]; then echo "Customer account created successfully." @@ -61,20 +61,20 @@ if ! bin/cliq ls bin/n98-magerun2; then fi # Prompt user for type of account to create -read -p "Do you want to create an admin (A) or a customer (C) account? [A/C]: " account_type +read -r -p "Do you want to create an admin (A) or a customer (C) account? [A/C]: " account_type if [[ "$account_type" == "A" || "$account_type" == "a" ]]; then create_admin_user elif [[ "$account_type" == "C" || "$account_type" == "c" ]]; then - read -p "Do you want to use default values for customer account? (Y/N): " use_defaults + read -r -p "Do you want to use default values for customer account? (Y/N): " use_defaults if [[ "$use_defaults" == "Y" || "$use_defaults" == "y" ]]; then create_customer_account elif [[ "$use_defaults" == "N" || "$use_defaults" == "n" ]]; then - read -p "Enter customer email: " EMAIL - read -p "Enter customer password: " PASSWORD - read -p "Enter customer firstname: " FIRSTNAME - read -p "Enter customer lastname: " LASTNAME - read -p "Enter customer website: " WEBSITE + read -r -p "Enter customer email: " EMAIL + read -r -p "Enter customer password: " PASSWORD + read -r -p "Enter customer firstname: " FIRSTNAME + read -r -p "Enter customer lastname: " LASTNAME + read -r -p "Enter customer website: " WEBSITE create_customer_account else echo "Invalid option. Please choose either Y or N." From dd0a47b7af9f2f09abe55aebffc01adc19779263 Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sun, 25 Feb 2024 00:58:08 +0200 Subject: [PATCH 042/115] Fix ShellCheck --- compose/bin/create-user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/bin/create-user b/compose/bin/create-user index 840a39cde..d3576560b 100755 --- a/compose/bin/create-user +++ b/compose/bin/create-user @@ -34,7 +34,7 @@ create_customer_account() { FIRSTNAME=${FIRSTNAME:-"Customer"} LASTNAME=${LASTNAME:-"Customer"} - bin/n98-magerun2 customer:create "${EMAIL}" "${PASSWORD}" ${FIRSTNAME} ${LASTNAME} "${WEBSITE}" + bin/n98-magerun2 customer:create ${EMAIL} ${PASSWORD} ${FIRSTNAME} ${LASTNAME} ${WEBSITE} if [ $? -eq 0 ]; then echo "Customer account created successfully." From 210758b5cf378b880b3b354a88342f5100a9c88d Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sun, 25 Feb 2024 01:13:43 +0200 Subject: [PATCH 043/115] Fix ShellCheck --- compose/bin/create-user | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/compose/bin/create-user b/compose/bin/create-user index d3576560b..ee72dcf4a 100755 --- a/compose/bin/create-user +++ b/compose/bin/create-user @@ -29,12 +29,13 @@ create_admin_user() { # Function to create customer account create_customer_account() { - EMAIL=${EMAIL:-"customer@example.com"} - PASSWORD=${PASSWORD:-"customer123QWERTY"} - FIRSTNAME=${FIRSTNAME:-"Customer"} - LASTNAME=${LASTNAME:-"Customer"} + EMAIL="${EMAIL:-customer@example.com}" + PASSWORD="${PASSWORD:-customer123QWERTY}" + FIRSTNAME="${FIRSTNAME:-Customer}" + LASTNAME="${LASTNAME:-Customer}" + WEBSITE="${WEBSITE:-1}" - bin/n98-magerun2 customer:create ${EMAIL} ${PASSWORD} ${FIRSTNAME} ${LASTNAME} ${WEBSITE} +bin/n98-magerun2 customer:create ${EMAIL} ${PASSWORD} ${FIRSTNAME} ${LASTNAME} "${WEBSITE}" if [ $? -eq 0 ]; then echo "Customer account created successfully." From 9d1940da4e2e1c6cedf944c8f95c33141d3e724d Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sun, 25 Feb 2024 01:20:40 +0200 Subject: [PATCH 044/115] Fix ShellCheck --- compose/bin/create-user | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/bin/create-user b/compose/bin/create-user index ee72dcf4a..a556f44e0 100755 --- a/compose/bin/create-user +++ b/compose/bin/create-user @@ -8,7 +8,7 @@ create_admin_user() { LASTNAME="Admin" PASSWORD="Admin123" - bin/magento admin:user:create \ + bin/magento admin:user:create \ --admin-user="${USERNAME}" \ --admin-password="${PASSWORD}" \ --admin-email="${EMAIL}" \ @@ -35,7 +35,7 @@ create_customer_account() { LASTNAME="${LASTNAME:-Customer}" WEBSITE="${WEBSITE:-1}" -bin/n98-magerun2 customer:create ${EMAIL} ${PASSWORD} ${FIRSTNAME} ${LASTNAME} "${WEBSITE}" + bin/n98-magerun2 customer:create "${EMAIL}" "${PASSWORD}" "${FIRSTNAME}" "${LASTNAME}" "${WEBSITE}" if [ $? -eq 0 ]; then echo "Customer account created successfully." From 0bee21f019925be6781797873e6c5dfbc8d02ab5 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 24 Feb 2024 19:26:21 -0500 Subject: [PATCH 045/115] New PHP images based on bookworm (including PHP 8.3) and pegged pecl libs --- .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- .github/workflows/build-php-8-3.yml | 34 +++ README.md | 5 +- images/php/8.1/Dockerfile | 8 +- images/php/8.2/Dockerfile | 10 +- images/php/8.3/Dockerfile | 118 ++++++++ images/php/8.3/conf/blackfire.ini | 2 + images/php/8.3/conf/msmtprc | 4 + images/php/8.3/conf/php-fpm.conf | 34 +++ images/php/8.3/conf/php.ini | 15 + images/php/8.3/conf/spx.ini | 7 + images/php/8.3/conf/www.conf | 413 ++++++++++++++++++++++++++++ 13 files changed, 641 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/build-php-8-3.yml create mode 100644 images/php/8.3/Dockerfile create mode 100644 images/php/8.3/conf/blackfire.ini create mode 100644 images/php/8.3/conf/msmtprc create mode 100644 images/php/8.3/conf/php-fpm.conf create mode 100644 images/php/8.3/conf/php.ini create mode 100644 images/php/8.3/conf/spx.ini create mode 100644 images/php/8.3/conf/www.conf diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index 38abe3032..497ff61f4 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.1-fpm - markoshust/magento-php:8.1-fpm-1 + markoshust/magento-php:8.1-fpm-2 diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 751592a09..4a11e3236 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.2-fpm - markoshust/magento-php:8.2-fpm-0 + markoshust/magento-php:8.2-fpm-1 diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml new file mode 100644 index 000000000..65cd03d46 --- /dev/null +++ b/.github/workflows/build-php-8-3.yml @@ -0,0 +1,34 @@ +name: build-php-8-3 + +on: workflow_dispatch + +jobs: + php-8-3: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: images/php/8.3 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-php:8.3-fpm + markoshust/magento-php:8.3-fpm-develop diff --git a/README.md b/README.md index 0e47fad45..94c6d97c6 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,9 @@ View Dockerfiles for the latest tags: - [markoshust/magento-nginx (Docker Hub)](https://hub.docker.com/r/markoshust/magento-nginx/) - [`1.18`, `1.18-8`](images/nginx/1.18) - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/) - - [`8.1-fpm`, `8.1-fpm-1`](images/php/8.1) - - [`8.2-fpm`, `8.2-fpm-0`](images/php/8.2) + - [`8.1-fpm`, `8.1-fpm-2`](images/php/8.1) + - [`8.2-fpm`, `8.2-fpm-1`](images/php/8.2) + - [`8.3-fpm`, `8.3-fpm-develop`](images/php/8.3) - [markoshust/magento-opensearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-opensearch/) - [`1.2`, `1.2-0`](images/opensearch/1.2) - [`2.5`, `2.5-1`](images/opensearch/2.5) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index 6ecb4ca94..7baee223e 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1-fpm-bullseye +FROM php:8.1-fpm-bookworm MAINTAINER Mark Shust ARG APP_ID=1000 @@ -41,10 +41,10 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* RUN pecl channel-update pecl.php.net && pecl install \ - imagick \ - redis \ + imagick-3.7.0 \ + redis-6.0.2 \ ssh2-1.3.1 \ - xdebug \ + xdebug-3.3.1 \ && pecl clear-cache \ && rm -rf /tmp/pear diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index 229071475..f991fd500 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-fpm-bullseye +FROM php:8.2-fpm-bookworm MAINTAINER Mark Shust ARG APP_ID=1000 @@ -8,7 +8,7 @@ RUN groupadd -g "$APP_ID" app \ RUN mkdir -p /etc/nginx/html /var/www/html /sock \ && chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - RUN apt-get update && apt-get install -y \ cron \ @@ -41,10 +41,10 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* RUN pecl channel-update pecl.php.net && pecl install \ - imagick \ - redis \ + imagick-3.7.0 \ + redis-6.0.2 \ ssh2-1.3.1 \ - xdebug \ + xdebug-3.3.1 \ && pecl clear-cache \ && rm -rf /tmp/pear diff --git a/images/php/8.3/Dockerfile b/images/php/8.3/Dockerfile new file mode 100644 index 000000000..4982163d9 --- /dev/null +++ b/images/php/8.3/Dockerfile @@ -0,0 +1,118 @@ +FROM php:8.3-fpm-bookworm +MAINTAINER Mark Shust + +ARG APP_ID=1000 +RUN groupadd -g "$APP_ID" app \ + && useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app + +RUN mkdir -p /etc/nginx/html /var/www/html /sock \ + && chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock + +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - + +RUN apt-get update && apt-get install -y \ + cron \ + default-mysql-client \ + git \ + gnupg \ + gzip \ + libbz2-dev \ + libfreetype6-dev \ + libicu-dev \ + libjpeg62-turbo-dev \ + libmagickwand-dev \ + libmcrypt-dev \ + libonig-dev \ + libpng-dev \ + libsodium-dev \ + libssh2-1-dev \ + libwebp-dev \ + libxslt1-dev \ + libzip-dev \ + lsof \ + mailutils \ + msmtp \ + nodejs \ + procps \ + strace \ + vim \ + zip \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN pecl channel-update pecl.php.net && pecl install \ + redis-6.0.2 \ + ssh2-1.3.1 \ + xdebug-3.3.1 \ + && pecl clear-cache \ + && rm -rf /tmp/pear + +RUN curl -L https://github.com/Imagick/imagick/archive/28f27044e435a2b203e32675e942eb8de620ee58.zip -o imagick.zip \ + && unzip imagick.zip \ + && rm imagick.zip \ + && cd imagick-28f27044e435a2b203e32675e942eb8de620ee58 \ + && phpize \ + && ./configure --with-php-config=/usr/local/bin/php-config \ + && make \ + && make install \ + && echo "extension=imagick.so" >> $PHP_INI_DIR/conf.d/imagick.ini \ + && cd .. \ + && rm -rf imagick-master + +RUN docker-php-ext-configure \ + gd --with-freetype --with-jpeg --with-webp \ + && docker-php-ext-install \ + bcmath \ + bz2 \ + calendar \ + exif \ + gd \ + gettext \ + intl \ + mbstring \ + mysqli \ + opcache \ + pcntl \ + pdo_mysql \ + soap \ + sockets \ + sodium \ + sysvmsg \ + sysvsem \ + sysvshm \ + xsl \ + zip \ + && docker-php-ext-enable \ + imagick \ + redis \ + ssh2 \ + xdebug + +RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ + && architecture=$(uname -m) \ + && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \ + && mkdir -p /tmp/blackfire \ + && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ + && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \ + && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz + +RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php-spx.git /usr/lib/php-spx \ + && cd /usr/lib/php-spx \ + && phpize \ + && ./configure \ + && make \ + && make install + +RUN curl -sS https://getcomposer.org/installer | \ + php -- --install-dir=/usr/local/bin --filename=composer + +COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini +COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini +COPY conf/msmtprc /etc/msmtprc +COPY conf/php.ini $PHP_INI_DIR +COPY conf/php-fpm.conf /usr/local/etc/ +COPY conf/www.conf /usr/local/etc/php-fpm.d/ + +USER app:app +VOLUME /var/www +WORKDIR /var/www/html diff --git a/images/php/8.3/conf/blackfire.ini b/images/php/8.3/conf/blackfire.ini new file mode 100644 index 000000000..86b377f66 --- /dev/null +++ b/images/php/8.3/conf/blackfire.ini @@ -0,0 +1,2 @@ +extension=blackfire.so +blackfire.agent_socket=tcp://blackfire:8307 diff --git a/images/php/8.3/conf/msmtprc b/images/php/8.3/conf/msmtprc new file mode 100644 index 000000000..84837e17c --- /dev/null +++ b/images/php/8.3/conf/msmtprc @@ -0,0 +1,4 @@ +account default +host mailcatcher +port 1025 +from "user@domain.com" diff --git a/images/php/8.3/conf/php-fpm.conf b/images/php/8.3/conf/php-fpm.conf new file mode 100644 index 000000000..e69b8fee3 --- /dev/null +++ b/images/php/8.3/conf/php-fpm.conf @@ -0,0 +1,34 @@ +; This file was initially adapated from the output of: (on PHP 5.6) +; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default + +[global] + +error_log = /proc/self/fd/2 +daemonize = no + +[www] + +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + +;user = app +;group = app + +listen = /sock/docker.sock +listen.owner = app +listen.group = app +listen.mode = 0660 + +pm = dynamic +pm.max_children = 10 +pm.start_servers = 4 +pm.min_spare_servers = 2 +pm.max_spare_servers = 6 + +clear_env = no + +; Ensure worker stdout and stderr are sent to the main error log. +catch_workers_output = yes + +; This needed to make PHP-SPX work in fpm mode. +process.dumpable = yes diff --git a/images/php/8.3/conf/php.ini b/images/php/8.3/conf/php.ini new file mode 100644 index 000000000..608c5ff8e --- /dev/null +++ b/images/php/8.3/conf/php.ini @@ -0,0 +1,15 @@ +memory_limit = 4G +max_execution_time = 1800 +zlib.output_compression = 1 +cgi.fix_pathinfo = 0 +date.timezone = UTC + +xdebug.mode = off +xdebug.client_host = host.docker.internal +xdebug.idekey = PHPSTORM + +upload_max_filesize = 100M +post_max_size = 100M +max_input_vars = 10000 + +sendmail_path = "/usr/bin/msmtp -t" diff --git a/images/php/8.3/conf/spx.ini b/images/php/8.3/conf/spx.ini new file mode 100644 index 000000000..9746d5f0f --- /dev/null +++ b/images/php/8.3/conf/spx.ini @@ -0,0 +1,7 @@ +zlib.output_compression = 0 + +extension = /usr/lib/php-spx/modules/spx.so +spx.http_enabled = 1 +spx.http_key = "dev" +spx.http_ip_whitelist = "*" +spx.data_dir = /var/www/spx_dumps diff --git a/images/php/8.3/conf/www.conf b/images/php/8.3/conf/www.conf new file mode 100644 index 000000000..af0053704 --- /dev/null +++ b/images/php/8.3/conf/www.conf @@ -0,0 +1,413 @@ +; Start a new pool named 'www'. +; the variable $pool can we used in any directive and will be replaced by the +; pool name ('www' here) +[www] + +; Per pool prefix +; It only applies on the following directives: +; - 'access.log' +; - 'slowlog' +; - 'listen' (unixsocket) +; - 'chroot' +; - 'chdir' +; - 'php_values' +; - 'php_admin_values' +; When not set, the global prefix (or NONE) applies instead. +; Note: This directive can also be relative to the global prefix. +; Default Value: none +;prefix = /path/to/pools/$pool + +; Unix user/group of processes +; Note: The user is mandatory. If the group is not set, the default user's group +; will be used. +user = app +group = app + +; The address on which to accept FastCGI requests. +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on +; a specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses +; (IPv6 and IPv4-mapped) on a specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Note: This value is mandatory. +listen = 127.0.0.1:9000 + +; Set listen(2) backlog. +; Default Value: 511 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 511 + +; Set permissions for unix socket, if one is used. In Linux, read/write +; permissions must be set in order to allow connections from a web server. Many +; BSD-derived systems allow connections regardless of permissions. +; Default Values: user and group are set as the running user +; mode is set to 0660 +;listen.owner = www-data +;listen.group = www-data +;listen.mode = 0660 +; When POSIX Access Control Lists are supported you can set them using +; these options, value is a comma separated list of user/group names. +; When set, listen.owner and listen.group are ignored +;listen.acl_users = +;listen.acl_groups = + +; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. +; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original +; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address +; must be separated by a comma. If this value is left blank, connections will be +; accepted from any ip address. +; Default Value: any +;listen.allowed_clients = 127.0.0.1 + +; Specify the nice(2) priority to apply to the pool processes (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool processes will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; process.priority = -19 + +; Choose how the process manager will control the number of child processes. +; Possible Values: +; static - a fixed number (pm.max_children) of child processes; +; dynamic - the number of child processes are set dynamically based on the +; following directives. With this process management, there will be +; always at least 1 children. +; pm.max_children - the maximum number of children that can +; be alive at the same time. +; pm.start_servers - the number of children created on startup. +; pm.min_spare_servers - the minimum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is less than this +; number then some children will be created. +; pm.max_spare_servers - the maximum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is greater than this +; number then some children will be killed. +; ondemand - no children are created at startup. Children will be forked when +; new requests will connect. The following parameter are used: +; pm.max_children - the maximum number of children that +; can be alive at the same time. +; pm.process_idle_timeout - The number of seconds after which +; an idle process will be killed. +; Note: This value is mandatory. +pm = dynamic + +; The number of child processes to be created when pm is set to 'static' and the +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. +; This value sets the limit on the number of simultaneous requests that will be +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP +; CGI. The below defaults are based on a server without much resources. Don't +; forget to tweak pm.* to fit your needs. +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' +; Note: This value is mandatory. +pm.max_children = 5 + +; The number of child processes created on startup. +; Note: Used only when pm is set to 'dynamic' +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 +pm.start_servers = 2 + +; The desired minimum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.min_spare_servers = 1 + +; The desired maximum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.max_spare_servers = 3 + +; The number of seconds after which an idle process will be killed. +; Note: Used only when pm is set to 'ondemand' +; Default Value: 10s +;pm.process_idle_timeout = 10s; + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. For +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default Value: 0 +;pm.max_requests = 500 + +; The URI to view the FPM status page. If this value is not set, no URI will be +; recognized as a status page. It shows the following informations: +; pool - the name of the pool; +; process manager - static, dynamic or ondemand; +; start time - the date and time FPM has started; +; start since - number of seconds since FPM has started; +; accepted conn - the number of request accepted by the pool; +; listen queue - the number of request in the queue of pending +; connections (see backlog in listen(2)); +; max listen queue - the maximum number of requests in the queue +; of pending connections since FPM has started; +; listen queue len - the size of the socket queue of pending connections; +; idle processes - the number of idle processes; +; active processes - the number of active processes; +; total processes - the number of idle + active processes; +; max active processes - the maximum number of active processes since FPM +; has started; +; max children reached - number of times, the process limit has been reached, +; when pm tries to start more children (works only for +; pm 'dynamic' and 'ondemand'); +; Value are updated in real time. +; Example output: +; pool: www +; process manager: static +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 62636 +; accepted conn: 190460 +; listen queue: 0 +; max listen queue: 1 +; listen queue len: 42 +; idle processes: 4 +; active processes: 11 +; total processes: 15 +; max active processes: 12 +; max children reached: 0 +; +; By default the status page output is formatted as text/plain. Passing either +; 'html', 'xml' or 'json' in the query string will return the corresponding +; output syntax. Example: +; http://www.foo.bar/status +; http://www.foo.bar/status?json +; http://www.foo.bar/status?html +; http://www.foo.bar/status?xml +; +; By default the status page only outputs short status. Passing 'full' in the +; query string will also return status for each pool process. +; Example: +; http://www.foo.bar/status?full +; http://www.foo.bar/status?json&full +; http://www.foo.bar/status?html&full +; http://www.foo.bar/status?xml&full +; The Full status returns for each process: +; pid - the PID of the process; +; state - the state of the process (Idle, Running, ...); +; start time - the date and time the process has started; +; start since - the number of seconds since the process has started; +; requests - the number of requests the process has served; +; request duration - the duration in µs of the requests; +; request method - the request method (GET, POST, ...); +; request URI - the request URI with the query string; +; content length - the content length of the request (only with POST); +; user - the user (PHP_AUTH_USER) (or '-' if not set); +; script - the main script called (or '-' if not set); +; last request cpu - the %cpu the last request consumed +; it's always 0 if the process is not in Idle state +; because CPU calculation is done when the request +; processing has terminated; +; last request memory - the max amount of memory the last request consumed +; it's always 0 if the process is not in Idle state +; because memory calculation is done when the request +; processing has terminated; +; If the process is in Idle state, then informations are related to the +; last request the process has served. Otherwise informations are related to +; the current request being served. +; Example output: +; ************************ +; pid: 31330 +; state: Running +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 63087 +; requests: 12808 +; request duration: 1250261 +; request method: GET +; request URI: /test_mem.php?N=10000 +; content length: 0 +; user: - +; script: /home/fat/web/docs/php/test_mem.php +; last request cpu: 0.00 +; last request memory: 0 +; +; Note: There is a real-time FPM status monitoring sample web page available +; It's available in: /usr/local/share/php/fpm/status.html +; +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;pm.status_path = /status + +; The ping URI to call the monitoring page of FPM. If this value is not set, no +; URI will be recognized as a ping page. This could be used to test from outside +; that FPM is alive and responding, or to +; - create a graph of FPM availability (rrd or such); +; - remove a server from a group if it is not responding (load balancing); +; - trigger alerts for the operating team (24/7). +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;ping.path = /ping + +; This directive may be used to customize the response of a ping request. The +; response is formatted as text/plain with a 200 response code. +; Default Value: pong +;ping.response = pong + +; The access log file +; Default: not set +;access.log = log/$pool.access.log + +; The access log format. +; The following syntax is allowed +; %%: the '%' character +; %C: %CPU used by the request +; it can accept the following format: +; - %{user}C for user CPU only +; - %{system}C for system CPU only +; - %{total}C for user + system CPU (default) +; %d: time taken to serve the request +; it can accept the following format: +; - %{seconds}d (default) +; - %{miliseconds}d +; - %{mili}d +; - %{microseconds}d +; - %{micro}d +; %e: an environment variable (same as $_ENV or $_SERVER) +; it must be associated with embraces to specify the name of the env +; variable. Some exemples: +; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e +; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e +; %f: script filename +; %l: content-length of the request (for POST request only) +; %m: request method +; %M: peak of memory allocated by PHP +; it can accept the following format: +; - %{bytes}M (default) +; - %{kilobytes}M +; - %{kilo}M +; - %{megabytes}M +; - %{mega}M +; %n: pool name +; %o: output header +; it must be associated with embraces to specify the name of the header: +; - %{Content-Type}o +; - %{X-Powered-By}o +; - %{Transfert-Encoding}o +; - .... +; %p: PID of the child that serviced the request +; %P: PID of the parent of the child that serviced the request +; %q: the query string +; %Q: the '?' character if query string exists +; %r: the request URI (without the query string, see %q and %Q) +; %R: remote IP address +; %s: status (response code) +; %t: server time the request was received +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t +; %T: time the log has been written (the request has finished) +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t +; %u: remote user +; +; Default: "%R - %u %t \"%m %r\" %s" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" + +; The log file for slow requests +; Default Value: not set +; Note: slowlog is mandatory if request_slowlog_timeout is set +;slowlog = log/$pool.log.slow + +; The timeout for serving a single request after which a PHP backtrace will be +; dumped to the 'slowlog' file. A value of '0s' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_slowlog_timeout = 0 + +; The timeout for serving a single request after which the worker process will +; be killed. This option should be used when the 'max_execution_time' ini option +; does not stop script execution for some reason. A value of '0' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_terminate_timeout = 0 + +; Set open file descriptor rlimit. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Chroot to this directory at the start. This value must be defined as an +; absolute path. When this value is not set, chroot is not used. +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one +; of its subdirectories. If the pool prefix is not set, the global prefix +; will be used instead. +; Note: chrooting is a great security feature and should be used whenever +; possible. However, all PHP paths will be relative to the chroot +; (error_log, sessions.save_path, ...). +; Default Value: not set +;chroot = + +; Chdir to this directory at the start. +; Note: relative path can be used. +; Default Value: current directory or / when chroot +;chdir = /var/www + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +;catch_workers_output = yes + +; Clear environment in FPM workers +; Prevents arbitrary environment variables from reaching FPM worker processes +; by clearing the environment in workers before env vars specified in this +; pool configuration are added. +; Setting to "no" will make all environment variables available to PHP code +; via getenv(), $_ENV and $_SERVER. +; Default Value: yes +;clear_env = no + +; Limits the extensions of the main script FPM will allow to parse. This can +; prevent configuration mistakes on the web server side. You should only limit +; FPM to .php extensions to prevent malicious users to use other extensions to +; exectute php code. +; Note: set an empty value to allow all extensions. +; Default Value: .php +;security.limit_extensions = .php .php3 .php4 .php5 .php7 + +; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from +; the current environment. +; Default Value: clean env +;env[HOSTNAME] = $HOSTNAME +;env[PATH] = /usr/local/bin:/usr/bin:/bin +;env[TMP] = /tmp +;env[TMPDIR] = /tmp +;env[TEMP] = /tmp + +; Additional php.ini defines, specific to this pool of workers. These settings +; overwrite the values previously defined in the php.ini. The directives are the +; same as the PHP SAPI: +; php_value/php_flag - you can set classic ini defines which can +; be overwritten from PHP call 'ini_set'. +; php_admin_value/php_admin_flag - these directives won't be overwritten by +; PHP call 'ini_set' +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. + +; Defining 'extension' will load the corresponding shared extension from +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not +; overwrite previously defined php.ini values, but will append the new value +; instead. + +; Note: path INI options can be relative and will be expanded with the prefix +; (pool, global or /usr/local) + +; Default Value: nothing is defined by default except the values in php.ini and +; specified at startup with the -d argument +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com +;php_flag[display_errors] = off +;php_admin_value[error_log] = /var/log/fpm-php.www.log +;php_admin_flag[log_errors] = on +;php_admin_value[memory_limit] = 32M From 57df5caeac1eacbba6cd3a72cf8a217e642cf372 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 Feb 2024 00:28:28 +0000 Subject: [PATCH 046/115] Bump docker/setup-qemu-action from 1 to 3 Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 3. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v3) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-elasticsearch-7-17.yml | 2 +- .github/workflows/build-elasticsearch-8-4.yml | 2 +- .github/workflows/build-elasticsearch-8-5.yml | 2 +- .github/workflows/build-nginx-1-18.yml | 2 +- .github/workflows/build-opensearch-1-2.yml | 2 +- .github/workflows/build-opensearch-2-5.yml | 2 +- .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- .github/workflows/build-php-8-3.yml | 2 +- .github/workflows/build-rabbitmq-3-11.yml | 2 +- .github/workflows/build-rabbitmq-3-9.yml | 2 +- .github/workflows/build-ssh.yml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-elasticsearch-7-17.yml b/.github/workflows/build-elasticsearch-7-17.yml index a75e6d08a..0c69a21de 100644 --- a/.github/workflows/build-elasticsearch-7-17.yml +++ b/.github/workflows/build-elasticsearch-7-17.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-elasticsearch-8-4.yml b/.github/workflows/build-elasticsearch-8-4.yml index c32df797c..92159e92d 100644 --- a/.github/workflows/build-elasticsearch-8-4.yml +++ b/.github/workflows/build-elasticsearch-8-4.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-elasticsearch-8-5.yml b/.github/workflows/build-elasticsearch-8-5.yml index a8b3b52d2..40cc090ff 100644 --- a/.github/workflows/build-elasticsearch-8-5.yml +++ b/.github/workflows/build-elasticsearch-8-5.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-nginx-1-18.yml b/.github/workflows/build-nginx-1-18.yml index 583f0ec1b..f6e2d5bdb 100644 --- a/.github/workflows/build-nginx-1-18.yml +++ b/.github/workflows/build-nginx-1-18.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-opensearch-1-2.yml b/.github/workflows/build-opensearch-1-2.yml index fb0bcc3e6..47d78d589 100644 --- a/.github/workflows/build-opensearch-1-2.yml +++ b/.github/workflows/build-opensearch-1-2.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-opensearch-2-5.yml b/.github/workflows/build-opensearch-2-5.yml index cc210c92f..50c624c52 100644 --- a/.github/workflows/build-opensearch-2-5.yml +++ b/.github/workflows/build-opensearch-2-5.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index 497ff61f4..5e745c087 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 4a11e3236..99db44134 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml index 65cd03d46..a41cf6c6f 100644 --- a/.github/workflows/build-php-8-3.yml +++ b/.github/workflows/build-php-8-3.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-rabbitmq-3-11.yml b/.github/workflows/build-rabbitmq-3-11.yml index 2a7134952..5b8b5a270 100644 --- a/.github/workflows/build-rabbitmq-3-11.yml +++ b/.github/workflows/build-rabbitmq-3-11.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-rabbitmq-3-9.yml b/.github/workflows/build-rabbitmq-3-9.yml index 577d5b478..e37c27c2d 100644 --- a/.github/workflows/build-rabbitmq-3-9.yml +++ b/.github/workflows/build-rabbitmq-3-9.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 diff --git a/.github/workflows/build-ssh.yml b/.github/workflows/build-ssh.yml index 03ab70063..6b7fa5583 100644 --- a/.github/workflows/build-ssh.yml +++ b/.github/workflows/build-ssh.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 From c6e115a12f89df31ccd054a0416697b4034c7607 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 Feb 2024 00:28:37 +0000 Subject: [PATCH 047/115] Bump docker/login-action from 1 to 3 Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 3. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1...v3) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-elasticsearch-7-17.yml | 2 +- .github/workflows/build-elasticsearch-8-4.yml | 2 +- .github/workflows/build-elasticsearch-8-5.yml | 2 +- .github/workflows/build-nginx-1-18.yml | 2 +- .github/workflows/build-opensearch-1-2.yml | 2 +- .github/workflows/build-opensearch-2-5.yml | 2 +- .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- .github/workflows/build-php-8-3.yml | 2 +- .github/workflows/build-rabbitmq-3-11.yml | 2 +- .github/workflows/build-rabbitmq-3-9.yml | 2 +- .github/workflows/build-ssh.yml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-elasticsearch-7-17.yml b/.github/workflows/build-elasticsearch-7-17.yml index a75e6d08a..51feccf7d 100644 --- a/.github/workflows/build-elasticsearch-7-17.yml +++ b/.github/workflows/build-elasticsearch-7-17.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-elasticsearch-8-4.yml b/.github/workflows/build-elasticsearch-8-4.yml index c32df797c..22c0fd51c 100644 --- a/.github/workflows/build-elasticsearch-8-4.yml +++ b/.github/workflows/build-elasticsearch-8-4.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-elasticsearch-8-5.yml b/.github/workflows/build-elasticsearch-8-5.yml index a8b3b52d2..302470b55 100644 --- a/.github/workflows/build-elasticsearch-8-5.yml +++ b/.github/workflows/build-elasticsearch-8-5.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-nginx-1-18.yml b/.github/workflows/build-nginx-1-18.yml index 583f0ec1b..52a598c59 100644 --- a/.github/workflows/build-nginx-1-18.yml +++ b/.github/workflows/build-nginx-1-18.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-opensearch-1-2.yml b/.github/workflows/build-opensearch-1-2.yml index fb0bcc3e6..a042b95a6 100644 --- a/.github/workflows/build-opensearch-1-2.yml +++ b/.github/workflows/build-opensearch-1-2.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-opensearch-2-5.yml b/.github/workflows/build-opensearch-2-5.yml index cc210c92f..946637275 100644 --- a/.github/workflows/build-opensearch-2-5.yml +++ b/.github/workflows/build-opensearch-2-5.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index 497ff61f4..e998e93da 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 4a11e3236..1d9e9d4a0 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml index 65cd03d46..8743dce15 100644 --- a/.github/workflows/build-php-8-3.yml +++ b/.github/workflows/build-php-8-3.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-rabbitmq-3-11.yml b/.github/workflows/build-rabbitmq-3-11.yml index 2a7134952..7ccb7a816 100644 --- a/.github/workflows/build-rabbitmq-3-11.yml +++ b/.github/workflows/build-rabbitmq-3-11.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-rabbitmq-3-9.yml b/.github/workflows/build-rabbitmq-3-9.yml index 577d5b478..dfab13fef 100644 --- a/.github/workflows/build-rabbitmq-3-9.yml +++ b/.github/workflows/build-rabbitmq-3-9.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/build-ssh.yml b/.github/workflows/build-ssh.yml index 03ab70063..55e9bd22e 100644 --- a/.github/workflows/build-ssh.yml +++ b/.github/workflows/build-ssh.yml @@ -17,7 +17,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} From fdedc8966bd2517fb9e7769e3890407c8b18daa4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 Feb 2024 00:28:39 +0000 Subject: [PATCH 048/115] Bump actions/checkout from 2 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-elasticsearch-7-17.yml | 2 +- .github/workflows/build-elasticsearch-8-4.yml | 2 +- .github/workflows/build-elasticsearch-8-5.yml | 2 +- .github/workflows/build-nginx-1-18.yml | 2 +- .github/workflows/build-opensearch-1-2.yml | 2 +- .github/workflows/build-opensearch-2-5.yml | 2 +- .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- .github/workflows/build-php-8-3.yml | 2 +- .github/workflows/build-rabbitmq-3-11.yml | 2 +- .github/workflows/build-rabbitmq-3-9.yml | 2 +- .github/workflows/build-ssh.yml | 2 +- .github/workflows/shellcheck.yml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-elasticsearch-7-17.yml b/.github/workflows/build-elasticsearch-7-17.yml index a75e6d08a..e99597076 100644 --- a/.github/workflows/build-elasticsearch-7-17.yml +++ b/.github/workflows/build-elasticsearch-7-17.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-elasticsearch-8-4.yml b/.github/workflows/build-elasticsearch-8-4.yml index c32df797c..8f9cc52ca 100644 --- a/.github/workflows/build-elasticsearch-8-4.yml +++ b/.github/workflows/build-elasticsearch-8-4.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-elasticsearch-8-5.yml b/.github/workflows/build-elasticsearch-8-5.yml index a8b3b52d2..7d8c42964 100644 --- a/.github/workflows/build-elasticsearch-8-5.yml +++ b/.github/workflows/build-elasticsearch-8-5.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-nginx-1-18.yml b/.github/workflows/build-nginx-1-18.yml index 583f0ec1b..ce6ff53ce 100644 --- a/.github/workflows/build-nginx-1-18.yml +++ b/.github/workflows/build-nginx-1-18.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-opensearch-1-2.yml b/.github/workflows/build-opensearch-1-2.yml index fb0bcc3e6..9d2a33902 100644 --- a/.github/workflows/build-opensearch-1-2.yml +++ b/.github/workflows/build-opensearch-1-2.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-opensearch-2-5.yml b/.github/workflows/build-opensearch-2-5.yml index cc210c92f..237a5bb1b 100644 --- a/.github/workflows/build-opensearch-2-5.yml +++ b/.github/workflows/build-opensearch-2-5.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index 497ff61f4..d9608ae6d 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 4a11e3236..b9480f255 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml index 65cd03d46..9d98916c0 100644 --- a/.github/workflows/build-php-8-3.yml +++ b/.github/workflows/build-php-8-3.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-rabbitmq-3-11.yml b/.github/workflows/build-rabbitmq-3-11.yml index 2a7134952..db92b1a5f 100644 --- a/.github/workflows/build-rabbitmq-3-11.yml +++ b/.github/workflows/build-rabbitmq-3-11.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-rabbitmq-3-9.yml b/.github/workflows/build-rabbitmq-3-9.yml index 577d5b478..82e59cfc1 100644 --- a/.github/workflows/build-rabbitmq-3-9.yml +++ b/.github/workflows/build-rabbitmq-3-9.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/build-ssh.yml b/.github/workflows/build-ssh.yml index 03ab70063..2b6651eec 100644 --- a/.github/workflows/build-ssh.yml +++ b/.github/workflows/build-ssh.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 73b071ae7..a05421995 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master From 81dc68a55e3c5bb3bc7beea090ee6910c800e766 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 Feb 2024 00:28:56 +0000 Subject: [PATCH 049/115] Bump docker/setup-buildx-action from 1 to 3 Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-elasticsearch-7-17.yml | 2 +- .github/workflows/build-elasticsearch-8-4.yml | 2 +- .github/workflows/build-elasticsearch-8-5.yml | 2 +- .github/workflows/build-nginx-1-18.yml | 2 +- .github/workflows/build-opensearch-1-2.yml | 2 +- .github/workflows/build-opensearch-2-5.yml | 2 +- .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- .github/workflows/build-php-8-3.yml | 2 +- .github/workflows/build-rabbitmq-3-11.yml | 2 +- .github/workflows/build-rabbitmq-3-9.yml | 2 +- .github/workflows/build-ssh.yml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-elasticsearch-7-17.yml b/.github/workflows/build-elasticsearch-7-17.yml index a75e6d08a..d9258ffcb 100644 --- a/.github/workflows/build-elasticsearch-7-17.yml +++ b/.github/workflows/build-elasticsearch-7-17.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-elasticsearch-8-4.yml b/.github/workflows/build-elasticsearch-8-4.yml index c32df797c..3c63bac50 100644 --- a/.github/workflows/build-elasticsearch-8-4.yml +++ b/.github/workflows/build-elasticsearch-8-4.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-elasticsearch-8-5.yml b/.github/workflows/build-elasticsearch-8-5.yml index a8b3b52d2..7f458c663 100644 --- a/.github/workflows/build-elasticsearch-8-5.yml +++ b/.github/workflows/build-elasticsearch-8-5.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-nginx-1-18.yml b/.github/workflows/build-nginx-1-18.yml index 583f0ec1b..a73a5a1bc 100644 --- a/.github/workflows/build-nginx-1-18.yml +++ b/.github/workflows/build-nginx-1-18.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-opensearch-1-2.yml b/.github/workflows/build-opensearch-1-2.yml index fb0bcc3e6..790d4dddf 100644 --- a/.github/workflows/build-opensearch-1-2.yml +++ b/.github/workflows/build-opensearch-1-2.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-opensearch-2-5.yml b/.github/workflows/build-opensearch-2-5.yml index cc210c92f..fa624bcd2 100644 --- a/.github/workflows/build-opensearch-2-5.yml +++ b/.github/workflows/build-opensearch-2-5.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index 497ff61f4..82200e0e2 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 4a11e3236..a6d977985 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml index 65cd03d46..7090ae015 100644 --- a/.github/workflows/build-php-8-3.yml +++ b/.github/workflows/build-php-8-3.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-rabbitmq-3-11.yml b/.github/workflows/build-rabbitmq-3-11.yml index 2a7134952..b72aa8b6f 100644 --- a/.github/workflows/build-rabbitmq-3-11.yml +++ b/.github/workflows/build-rabbitmq-3-11.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-rabbitmq-3-9.yml b/.github/workflows/build-rabbitmq-3-9.yml index 577d5b478..a12eacdc0 100644 --- a/.github/workflows/build-rabbitmq-3-9.yml +++ b/.github/workflows/build-rabbitmq-3-9.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/build-ssh.yml b/.github/workflows/build-ssh.yml index 03ab70063..9b0714fc8 100644 --- a/.github/workflows/build-ssh.yml +++ b/.github/workflows/build-ssh.yml @@ -14,7 +14,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub uses: docker/login-action@v1 From c83a73538d67f169a3ef3c449976f8bf10a67902 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 Feb 2024 00:29:01 +0000 Subject: [PATCH 050/115] Bump docker/build-push-action from 2 to 5 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 5. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2...v5) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-elasticsearch-7-17.yml | 2 +- .github/workflows/build-elasticsearch-8-4.yml | 2 +- .github/workflows/build-elasticsearch-8-5.yml | 2 +- .github/workflows/build-nginx-1-18.yml | 2 +- .github/workflows/build-opensearch-1-2.yml | 2 +- .github/workflows/build-opensearch-2-5.yml | 2 +- .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- .github/workflows/build-php-8-3.yml | 2 +- .github/workflows/build-rabbitmq-3-11.yml | 2 +- .github/workflows/build-rabbitmq-3-9.yml | 2 +- .github/workflows/build-ssh.yml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-elasticsearch-7-17.yml b/.github/workflows/build-elasticsearch-7-17.yml index a75e6d08a..760172b5f 100644 --- a/.github/workflows/build-elasticsearch-7-17.yml +++ b/.github/workflows/build-elasticsearch-7-17.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/elasticsearch/7.17 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-elasticsearch-8-4.yml b/.github/workflows/build-elasticsearch-8-4.yml index c32df797c..0d090604a 100644 --- a/.github/workflows/build-elasticsearch-8-4.yml +++ b/.github/workflows/build-elasticsearch-8-4.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/elasticsearch/8.4 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-elasticsearch-8-5.yml b/.github/workflows/build-elasticsearch-8-5.yml index a8b3b52d2..c34b8a717 100644 --- a/.github/workflows/build-elasticsearch-8-5.yml +++ b/.github/workflows/build-elasticsearch-8-5.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/elasticsearch/8.5 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-nginx-1-18.yml b/.github/workflows/build-nginx-1-18.yml index 583f0ec1b..fba6d2a5c 100644 --- a/.github/workflows/build-nginx-1-18.yml +++ b/.github/workflows/build-nginx-1-18.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/nginx/1.18 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-opensearch-1-2.yml b/.github/workflows/build-opensearch-1-2.yml index fb0bcc3e6..1ec390812 100644 --- a/.github/workflows/build-opensearch-1-2.yml +++ b/.github/workflows/build-opensearch-1-2.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/opensearch/1.2 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-opensearch-2-5.yml b/.github/workflows/build-opensearch-2-5.yml index cc210c92f..e897d76a0 100644 --- a/.github/workflows/build-opensearch-2-5.yml +++ b/.github/workflows/build-opensearch-2-5.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/opensearch/2.5 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index 497ff61f4..ad51e74c7 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/php/8.1 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 4a11e3236..8623e1149 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/php/8.2 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml index 65cd03d46..1554e4e2d 100644 --- a/.github/workflows/build-php-8-3.yml +++ b/.github/workflows/build-php-8-3.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/php/8.3 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-rabbitmq-3-11.yml b/.github/workflows/build-rabbitmq-3-11.yml index 2a7134952..8314865a4 100644 --- a/.github/workflows/build-rabbitmq-3-11.yml +++ b/.github/workflows/build-rabbitmq-3-11.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/rabbitmq/3.11 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-rabbitmq-3-9.yml b/.github/workflows/build-rabbitmq-3-9.yml index 577d5b478..462d1674d 100644 --- a/.github/workflows/build-rabbitmq-3-9.yml +++ b/.github/workflows/build-rabbitmq-3-9.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/rabbitmq/3.9 platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/build-ssh.yml b/.github/workflows/build-ssh.yml index 03ab70063..b76ae0b1c 100644 --- a/.github/workflows/build-ssh.yml +++ b/.github/workflows/build-ssh.yml @@ -24,7 +24,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: images/php/8.2 platforms: linux/amd64,linux/arm64 From 55fcae2e3837a0695d66dfc8363db9754a8b509f Mon Sep 17 00:00:00 2001 From: Evgeniy Zverev Date: Sun, 25 Feb 2024 20:10:53 +0200 Subject: [PATCH 051/115] Fixed error --- compose/bin/docker-stats | 46 ++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/compose/bin/docker-stats b/compose/bin/docker-stats index 83cac7a78..cbcdd2b2b 100755 --- a/compose/bin/docker-stats +++ b/compose/bin/docker-stats @@ -1,10 +1,42 @@ -#!/usr/bin/env bash +#!/bin/bash -container_ids=$(bin/docker-compose ps -q) +stty -echo -if [ -z "$container_ids" ]; then - echo "No active containers found" - exit 1 -fi +INTERVAL=3 -docker stats "$container_ids" +trap 'stty echo; exit' INT EXIT + +print_header() { + echo "+----------------------------------------------------+------------+-----------------+-----------------+" + printf "| %-50s | %-10s | %-15s | %-15s |\n" "Name" "CPU %" "Memory Usage" "Memory Limit" + echo "+----------------------------------------------------+------------+-----------------+-----------------+" +} + +print_container_info() { + local container_info=($1) + local container_name=${container_info[0]} + local container_stats=(${container_info[@]:1}) + + printf "| %-50s | %-10s | %-15s | %-15s |\n" "$container_name" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" +} + +while true; do + DOCKER_STATS=$(docker stats --no-stream --format "{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}") + + clear + + if [[ ! -z "$DOCKER_STATS" ]]; then + print_header + + while IFS= read -r line; do + print_container_info "$(echo "$line" | awk '{gsub(/\//, " "); print}')" + done <<< "$DOCKER_STATS" + + echo "+----------------------------------------------------+------------+-----------------+-----------------+" + else + echo "No active containers found" + break + fi + + sleep $INTERVAL +done From de647948e9d9f5a8a5bac3b406531f2399c4f31f Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sun, 25 Feb 2024 15:11:04 -0500 Subject: [PATCH 052/115] Tag and release 45.0.0 --- CHANGELOG.md | 33 +++++++++++++++++++++++++++++++++ compose/compose.yaml | 4 ++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff1b4b81a..21822cb54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,39 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [45.0.0] - 2024-02-25 + +### Added +- New PHP images based on bookworm, pegging pecl libraries for more predictability [PR #1071](https://github.com/markshust/docker-magento/pull/1071). +- New PHP 8.3 image [PR #1071](https://github.com/markshust/docker-magento/pull/1071). +- PHP SPX profiler to enhance performance monitoring capabilities [PR #533](https://github.com/markshust/docker-magento/pull/533). +- Support for the `strace` command, providing developers with powerful tools for diagnosing and troubleshooting [PR #1033](https://github.com/markshust/docker-magento/pull/1033). +- Ability for xdebug to listen to Magento CLI commands [PR #846](https://github.com/markshust/docker-magento/pull/846). +- Abstraction of setup script into two scripts [PR #874](https://github.com/markshust/docker-magento/pull/874). +- New Docker image for OpenSearch 2.4 [PR #858](https://github.com/markshust/docker-magento/pull/858). +- Mage-OS mirror support [PR #835](https://github.com/markshust/docker-magento/pull/835). +- New `bin/log` command to view Magento logs in real-time [PR #1060](https://github.com/markshust/docker-magento/pull/1060). +- New `bin/docker-stats` command for container monitoring [PR #533](https://github.com/markshust/docker-magento/pull/533). +- New `bin/setup-pwa-studio-sampledata` command to install Magento PWA Studio sample data, facilitating easier PWA development setups [#1045](https://github.com/markshust/docker-magento/pull/1045). +- New `bin/deploy` script to deply Magento in pipeline [PR #926](https://github.com/markshust/docker-magento/pull/926). +- New `bin/magento-version` script which outputs current Magento version [PR #931](https://github.com/markshust/docker-magento/pull/931). + +### Updated +- Node.js to version 20.x LTS [PR #1071](https://github.com/markshust/docker-magento/pull/1071). +- Support for Magento 2.4.6-p4, updating the default Magento version in the Docker setup to align with the latest Magento release [PR #1063](https://github.com/markshust/docker-magento/pull/1063). +- Continuous integration and deployment processes were refined to include updates and to maintain dependencies through GitHub Actions and Dependabot, ensuring that the project's dependencies remain up to date and secure [PR #1032](https://github.com/markshust/docker-magento/pull/1032). +- Rework docker compose script to allow future extensibility [PR #1002](https://github.com/markshust/docker-magento/pull/1002). +- Replaced phpmyadmin Docker image with amd64-compatible image [PR #939](https://github.com/markshust/docker-magento/pull/939). +- Set default Magento 2.4.6 search engine to OpenSearch [PR #937](https://github.com/markshust/docker-magento/pull/937). +- Use `/usr/bin/env` to discover bash location [PR #879](https://github.com/markshust/docker-magento/pull/879). + +### Fixed +- Execution rights in scripts [PR #1039](https://github.com/markshust/docker-magento/pull/1039). +- Bug with Elasticsearch documentation [PR #1014](https://github.com/markshust/docker-magento/pull/1014). +- Elasticsearch JAVA OPTS issue with containers not starting at startup [PR #938](https://github.com/markshust/docker-magento/pull/938). +- Unexpected Ubuntu 18.04 startup failure [PR #310](https://github.com/markshust/docker-magento/pull/310). +- Failing `npm install` of puppeteer due to missing Chromium [PR #848](https://github.com/markshust/docker-magento/pull/848). + ## [44.0.0] - 2022-12-05 ### Added diff --git a/compose/compose.yaml b/compose/compose.yaml index 2ed3528ad..809ba93d3 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 44.0.0 +## Version 45.0.0 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux @@ -32,7 +32,7 @@ services: #- "host.docker.internal:host-gateway" phpfpm: - image: markoshust/magento-php:8.2-fpm-0 + image: markoshust/magento-php:8.2-fpm-1 volumes: *appvolumes env_file: env/phpfpm.env #extra_hosts: *appextrahosts From ea290cfb85ceab0ca378779809a286d307834f6e Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sun, 25 Feb 2024 15:38:30 -0500 Subject: [PATCH 053/115] New `bin/spx` script to enable or disable output compression to disable/enable SPX #1073 --- compose/bin/spx | 55 +++++++++++++++++++++++++++++++++++++ images/php/8.1/conf/spx.ini | 2 -- images/php/8.2/conf/spx.ini | 2 -- images/php/8.3/conf/spx.ini | 2 -- 4 files changed, 55 insertions(+), 6 deletions(-) create mode 100755 compose/bin/spx diff --git a/compose/bin/spx b/compose/bin/spx new file mode 100755 index 000000000..df63ca610 --- /dev/null +++ b/compose/bin/spx @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +S=$(bin/clinotty cat /usr/local/etc/php/php.ini | grep -iGc 'zlib.output_compression = 1'); + +spx_status() { + if [[ $S == 1 ]]; then + echo "Output compression is enabled, so you cannot currently debug with SPX." + else + echo "Output compression is disabled, so you can currently debug with SPX." + fi +} + +spx_toggle() { + if [[ $S == 1 ]]; then + spx_enable + else + spx_disable + fi +} + +spx_enable() { + if [[ $S == 1 ]]; then + bin/root sed -i -e 's/^zlib.output_compression = 1/zlib.output_compression = 0/g' /usr/local/etc/php/php.ini + sleep 1 + bin/restart phpfpm + echo "Output compression is now disabled, so you can start debugging with SPX." + else + echo "Output compression is already disabled, so you can start debugging with SPX." + fi +} + +spx_disable() { + if [[ $S == 0 ]]; then + bin/root sed -i -e 's/^zlib.output_compression = 0/zlib.output_compression = 1/g' /usr/local/etc/php/php.ini + sleep 1 + bin/restart phpfpm + echo "Output compression is now enabled, so you can no longer debug with SPX." + else + echo "Output compression is already enabled, so you can no longer debug with SPX." + fi +} + +firstArgLetter="$(echo "$1" | head -c 1)" + +if [[ $firstArgLetter == "d" ]]; then + spx_disable +elif [[ $firstArgLetter == "e" ]]; then + spx_enable +elif [[ $firstArgLetter == "t" ]]; then + spx_toggle +elif [[ $firstArgLetter == "s" ]]; then + spx_status +else + printf "Please specify either 'disable', 'enable', 'status' or 'toggle' as an argument.\nEx: bin/spx status\n" +fi diff --git a/images/php/8.1/conf/spx.ini b/images/php/8.1/conf/spx.ini index 9746d5f0f..7422bfa9e 100644 --- a/images/php/8.1/conf/spx.ini +++ b/images/php/8.1/conf/spx.ini @@ -1,5 +1,3 @@ -zlib.output_compression = 0 - extension = /usr/lib/php-spx/modules/spx.so spx.http_enabled = 1 spx.http_key = "dev" diff --git a/images/php/8.2/conf/spx.ini b/images/php/8.2/conf/spx.ini index 9746d5f0f..7422bfa9e 100644 --- a/images/php/8.2/conf/spx.ini +++ b/images/php/8.2/conf/spx.ini @@ -1,5 +1,3 @@ -zlib.output_compression = 0 - extension = /usr/lib/php-spx/modules/spx.so spx.http_enabled = 1 spx.http_key = "dev" diff --git a/images/php/8.3/conf/spx.ini b/images/php/8.3/conf/spx.ini index 9746d5f0f..7422bfa9e 100644 --- a/images/php/8.3/conf/spx.ini +++ b/images/php/8.3/conf/spx.ini @@ -1,5 +1,3 @@ -zlib.output_compression = 0 - extension = /usr/lib/php-spx/modules/spx.so spx.http_enabled = 1 spx.http_key = "dev" From 2bf4edad6ad8f0beee07b32d53d57f194dd9628b Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sun, 25 Feb 2024 15:54:06 -0500 Subject: [PATCH 054/115] Added bin/spx to readme --- README.md | 1 + compose/Makefile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 94c6d97c6..98810fa05 100644 --- a/README.md +++ b/README.md @@ -318,6 +318,7 @@ It is recommended to keep your root docker config files in one repository, and y - `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` - `bin/setup-ssl-ca`: Generate a certificate authority and copy it to the host. +- `bin/spx`: Disable or enable output compression to enable or disbale SPX. Accepts params `disable` (default) or `enable`. Ex. `bin/spx enable` - `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 project containers. diff --git a/compose/Makefile b/compose/Makefile index 6545368e1..fe8aa0be8 100644 --- a/compose/Makefile +++ b/compose/Makefile @@ -31,7 +31,7 @@ help: @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-stats,'Display status for CPU, memory usage, and memory limit of currently-running Docker containers.')" + @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.')" @@ -59,6 +59,7 @@ help: @echo "$(call format,setup-pwa-studio,'(BETA) Install PWA Studio.')" @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.')" From 2820aed84349ffbf37d880080799975b4eeb0281 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sun, 25 Feb 2024 15:56:01 -0500 Subject: [PATCH 055/115] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21822cb54..6a2a69daa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - New `bin/setup-pwa-studio-sampledata` command to install Magento PWA Studio sample data, facilitating easier PWA development setups [#1045](https://github.com/markshust/docker-magento/pull/1045). - New `bin/deploy` script to deply Magento in pipeline [PR #926](https://github.com/markshust/docker-magento/pull/926). - New `bin/magento-version` script which outputs current Magento version [PR #931](https://github.com/markshust/docker-magento/pull/931). +- New `bin/spx` script to enable or disable SPX [PR #1074](https://github.com/markshust/docker-magento/pull/1074). ### Updated - Node.js to version 20.x LTS [PR #1071](https://github.com/markshust/docker-magento/pull/1071). From 41b6870447fffaab8bffcf481ab9dd920ee7ee9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kmilo=20Denis=20Gonz=C3=A1lez?= Date: Tue, 27 Feb 2024 23:56:29 -0500 Subject: [PATCH 056/115] Update README.md moved the "install dependencies step" to the Linux section --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 903d8305d..17105cea6 100644 --- a/README.md +++ b/README.md @@ -124,13 +124,6 @@ This setup assumes you are running Docker on a computer with at least 6GB of RAM This configuration has been tested on Mac & Linux. Windows is supported through the use of Docker on WSL. -### Ubuntu, Debian - -1. Install dependencies - - # Ubuntu or Debian - sudo apt install curl libnss3-tools unzip rsync - ## Setup ### Automated Setup (New Project) @@ -541,6 +534,11 @@ bin/copyfromcontainer --all ### Linux +#### Install necessary dependencies +``` +sudo apt install curl libnss3-tools unzip rsync +``` + 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 `compose.dev-linux.yaml` to `compose.dev.yaml` before installing Magento to take advantage of this setup. From ec8b0e23235c20600afb98b2978d4b79942a3ca4 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 29 Feb 2024 19:39:11 -0300 Subject: [PATCH 057/115] Fix imagick directory name --- images/php/8.3/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/php/8.3/Dockerfile b/images/php/8.3/Dockerfile index 4982163d9..6295e7d61 100644 --- a/images/php/8.3/Dockerfile +++ b/images/php/8.3/Dockerfile @@ -57,7 +57,7 @@ RUN curl -L https://github.com/Imagick/imagick/archive/28f27044e435a2b203e32675e && make install \ && echo "extension=imagick.so" >> $PHP_INI_DIR/conf.d/imagick.ini \ && cd .. \ - && rm -rf imagick-master + && rm -rf imagick-28f27044e435a2b203e32675e942eb8de620ee58 RUN docker-php-ext-configure \ gd --with-freetype --with-jpeg --with-webp \ From b79e8510267f220fc6d5b311578df00a8107bab0 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Wed, 6 Mar 2024 10:41:40 -0500 Subject: [PATCH 058/115] Fix bin/docker-stats not working properly #1075 --- compose/bin/docker-stats | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compose/bin/docker-stats b/compose/bin/docker-stats index 83cac7a78..4f48ff51d 100755 --- a/compose/bin/docker-stats +++ b/compose/bin/docker-stats @@ -1,10 +1,10 @@ #!/usr/bin/env bash -container_ids=$(bin/docker-compose ps -q) +IFS=$'\n' read -d '' -r -a container_ids < <(bin/docker-compose ps -q) -if [ -z "$container_ids" ]; then +if [ ${#container_ids[@]} -eq 0 ]; then echo "No active containers found" exit 1 fi -docker stats "$container_ids" +docker stats "${container_ids[@]}" From 8b424447bde22ff8515b8b4c99f428a8f378633f Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Wed, 6 Mar 2024 22:09:24 +0200 Subject: [PATCH 059/115] Change output of the script --- compose/bin/docker-stats | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/compose/bin/docker-stats b/compose/bin/docker-stats index cbcdd2b2b..4bce914d7 100755 --- a/compose/bin/docker-stats +++ b/compose/bin/docker-stats @@ -7,21 +7,22 @@ INTERVAL=3 trap 'stty echo; exit' INT EXIT print_header() { - echo "+----------------------------------------------------+------------+-----------------+-----------------+" - printf "| %-50s | %-10s | %-15s | %-15s |\n" "Name" "CPU %" "Memory Usage" "Memory Limit" - echo "+----------------------------------------------------+------------+-----------------+-----------------+" + echo "+----------------------------------------------------+--------------+------------+-----------------+-----------------+" + printf "| %-50s | %-12s | %-10s | %-15s | %-15s |\n" "NAME" "CONTAINER ID" "CPU %" "Memory %" "Memory Usage" + echo "+----------------------------------------------------+--------------+------------+-----------------+-----------------+" } print_container_info() { local container_info=($1) local container_name=${container_info[0]} - local container_stats=(${container_info[@]:1}) + local container_id=${container_info[1]} + local container_stats=(${container_info[@]:2}) - printf "| %-50s | %-10s | %-15s | %-15s |\n" "$container_name" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" + printf "| %-50s | %-12s | %-10s | %-15s | %-15s |\n" "$container_name" "$container_id" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" } while true; do - DOCKER_STATS=$(docker stats --no-stream --format "{{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}") + DOCKER_STATS=$(docker stats --no-stream --format "{{.Name}}\t{{.ID}}\t{{.CPUPerc}}\t{{.MemPerc}}\t{{.MemUsage}}") clear @@ -32,7 +33,7 @@ while true; do print_container_info "$(echo "$line" | awk '{gsub(/\//, " "); print}')" done <<< "$DOCKER_STATS" - echo "+----------------------------------------------------+------------+-----------------+-----------------+" + echo "+----------------------------------------------------+--------------+------------+-----------------+-----------------+" else echo "No active containers found" break @@ -40,3 +41,4 @@ while true; do sleep $INTERVAL done + From 39fcbfcf02e66f7b0ce66d62c6aa6f2047a0c8c9 Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Wed, 6 Mar 2024 22:17:09 +0200 Subject: [PATCH 060/115] Change formatted of the table --- compose/bin/docker-stats | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compose/bin/docker-stats b/compose/bin/docker-stats index 4bce914d7..7e12b5bd4 100755 --- a/compose/bin/docker-stats +++ b/compose/bin/docker-stats @@ -7,9 +7,9 @@ INTERVAL=3 trap 'stty echo; exit' INT EXIT print_header() { - echo "+----------------------------------------------------+--------------+------------+-----------------+-----------------+" - printf "| %-50s | %-12s | %-10s | %-15s | %-15s |\n" "NAME" "CONTAINER ID" "CPU %" "Memory %" "Memory Usage" - echo "+----------------------------------------------------+--------------+------------+-----------------+-----------------+" + echo "+----------------------------------------------------+--------------+----------+-----------+----------------+" + printf "| %-50s | %-12s | %-8s | %-8s | %-15s |\n" "NAME" "CONTAINER ID" "CPU %" "Memory %" "Memory Usage" + echo "+----------------------------------------------------+--------------+----------+-----------+----------------+" } print_container_info() { @@ -18,7 +18,7 @@ print_container_info() { local container_id=${container_info[1]} local container_stats=(${container_info[@]:2}) - printf "| %-50s | %-12s | %-10s | %-15s | %-15s |\n" "$container_name" "$container_id" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" + printf "| %-50s | %-12s | %-8s | %-8s | %-15s |\n" "$container_name" "$container_id" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" } while true; do @@ -33,7 +33,7 @@ while true; do print_container_info "$(echo "$line" | awk '{gsub(/\//, " "); print}')" done <<< "$DOCKER_STATS" - echo "+----------------------------------------------------+--------------+------------+-----------------+-----------------+" + echo "+----------------------------------------------------+--------------+-----------+----------+----------------+" else echo "No active containers found" break From be32d82784ac2c5d8eeda2f858dbdc19d5048897 Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Wed, 6 Mar 2024 22:21:10 +0200 Subject: [PATCH 061/115] Change formatted of the table --- compose/bin/docker-stats | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compose/bin/docker-stats b/compose/bin/docker-stats index 7e12b5bd4..5e1ff5ba4 100755 --- a/compose/bin/docker-stats +++ b/compose/bin/docker-stats @@ -7,9 +7,9 @@ INTERVAL=3 trap 'stty echo; exit' INT EXIT print_header() { - echo "+----------------------------------------------------+--------------+----------+-----------+----------------+" - printf "| %-50s | %-12s | %-8s | %-8s | %-15s |\n" "NAME" "CONTAINER ID" "CPU %" "Memory %" "Memory Usage" - echo "+----------------------------------------------------+--------------+----------+-----------+----------------+" + echo "+----------------------------------------------------+--------------+----------+----------+----------------+" + printf "| %-50s | %-12s | %-8s | %-8s | %-14s |\n" "NAME" "CONTAINER ID" "CPU %" "Memory %" "Memory Usage" + echo "+----------------------------------------------------+--------------+----------+----------+----------------+" } print_container_info() { @@ -18,7 +18,7 @@ print_container_info() { local container_id=${container_info[1]} local container_stats=(${container_info[@]:2}) - printf "| %-50s | %-12s | %-8s | %-8s | %-15s |\n" "$container_name" "$container_id" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" + printf "| %-50s | %-12s | %-8s | %-8s | %-14s |\n" "$container_name" "$container_id" "${container_stats[0]}" "${container_stats[1]}" "${container_stats[2]}" } while true; do @@ -33,7 +33,7 @@ while true; do print_container_info "$(echo "$line" | awk '{gsub(/\//, " "); print}')" done <<< "$DOCKER_STATS" - echo "+----------------------------------------------------+--------------+-----------+----------+----------------+" + echo "+----------------------------------------------------+--------------+----------+----------+----------------+" else echo "No active containers found" break From 854dc9c6df363f014975a2b1bf2bebd106d37b6b Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Wed, 6 Mar 2024 22:41:30 +0200 Subject: [PATCH 062/115] Change letters to uppercase --- compose/bin/docker-stats | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compose/bin/docker-stats b/compose/bin/docker-stats index 5e1ff5ba4..8370d8641 100755 --- a/compose/bin/docker-stats +++ b/compose/bin/docker-stats @@ -8,7 +8,7 @@ trap 'stty echo; exit' INT EXIT print_header() { echo "+----------------------------------------------------+--------------+----------+----------+----------------+" - printf "| %-50s | %-12s | %-8s | %-8s | %-14s |\n" "NAME" "CONTAINER ID" "CPU %" "Memory %" "Memory Usage" + printf "| %-50s | %-12s | %-8s | %-8s | %-14s |\n" "NAME" "CONTAINER ID" "CPU %" "MEM %" "MEM USAGE" echo "+----------------------------------------------------+--------------+----------+----------+----------------+" } @@ -41,4 +41,3 @@ while true; do sleep $INTERVAL done - From f447afc910b3ae593c9959c9e775c4e735b32397 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Wed, 6 Mar 2024 20:05:56 -0500 Subject: [PATCH 063/115] Updated shebang for additional portable and consistency with other scripts --- compose/bin/docker-stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/bin/docker-stats b/compose/bin/docker-stats index 73ec9a91b..06c60c2de 100755 --- a/compose/bin/docker-stats +++ b/compose/bin/docker-stats @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash stty -echo From 7bec7e0c888dfafb2f4dd46144e1f6f8b6d13cb5 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 7 Mar 2024 11:56:03 -0500 Subject: [PATCH 064/115] Removed redundant mention of ES/OS --- compose/compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/compose.yaml b/compose/compose.yaml index 3a0545199..eb4a2e9bb 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -66,7 +66,7 @@ services: ## More info at https://github.com/markshust/docker-magento/issues/488 - "cluster.routing.allocation.disk.threshold_enabled=false" - "index.blocks.read_only_allow_delete" - ## Uncomment the following line to increase the virtual memory map count for OpenSearch + ## Uncomment the following line to increase the virtual memory map count # - "max_map_count=262144" ## If you wish to use Elasticsearch, comment out opensearch image above and @@ -86,7 +86,7 @@ services: # ## More info at https://github.com/markshust/docker-magento/issues/488 # - "cluster.routing.allocation.disk.threshold_enabled=false" # - "index.blocks.read_only_allow_delete" - # ## Uncomment the following line to increase the virtual memory map count for ElasticSearch + # ## Uncomment the following line to increase the virtual memory map count # - "max_map_count=262144" rabbitmq: From 3313f67d7e79c5a0401ce4804c6fffff82d2247a Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 7 Mar 2024 11:57:47 -0500 Subject: [PATCH 065/115] Update configure-linux Make shebang more portable, capitalized X in Xdebug. --- compose/bin/configure-linux | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/bin/configure-linux b/compose/bin/configure-linux index a2ff668e1..a34756bc1 100755 --- a/compose/bin/configure-linux +++ b/compose/bin/configure-linux @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Check if the script is running on Linux if [[ "$OSTYPE" == "linux-gnu"* ]]; then @@ -15,7 +15,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then fi # Ask the user whether to execute the iptables command - read -r -p "Do you want to open port 9003 for xdebug? (y/n): " choice + read -r -p "Do you want to open port 9003 for Xdebug? (y/n): " choice if [ "$choice" == "y" ]; then sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT echo "Port 9003 has been opened for xdebug." From 94f9b9901b07cea6e5fa46c2253770c48ad6f19f Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 7 Mar 2024 11:58:44 -0500 Subject: [PATCH 066/115] Update configure-linux Standardized OS check --- compose/bin/configure-linux | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/compose/bin/configure-linux b/compose/bin/configure-linux index a34756bc1..63162af39 100755 --- a/compose/bin/configure-linux +++ b/compose/bin/configure-linux @@ -1,7 +1,8 @@ #!/usr/bin/env bash -# Check if the script is running on Linux -if [[ "$OSTYPE" == "linux-gnu"* ]]; then +if [ "$(uname)" == "Darwin" ]; then + echo "This script is designed for Linux and may not work properly on macOS." +else # Get the IP address from the Docker container docker_ip=$(docker run --rm alpine ip route | awk 'NR==1 {print $3}') @@ -20,11 +21,6 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT echo "Port 9003 has been opened for xdebug." fi -elif [[ "$OSTYPE" == "darwin"* ]]; then - echo "This script is designed for Linux and may not work properly on macOS." -else - echo "Unsupported operating system." fi echo "Tasks completed successfully" - From d96a4d1fe34b8b6759984955a2a5a6193c56e41f Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 7 Mar 2024 11:59:38 -0500 Subject: [PATCH 067/115] Update configure-linux Switched response logic around --- compose/bin/configure-linux | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compose/bin/configure-linux b/compose/bin/configure-linux index 63162af39..80d0182ec 100755 --- a/compose/bin/configure-linux +++ b/compose/bin/configure-linux @@ -1,7 +1,7 @@ #!/usr/bin/env bash if [ "$(uname)" == "Darwin" ]; then - echo "This script is designed for Linux and may not work properly on macOS." + echo "This script is designed for Linux and will not work properly on macOS." else # Get the IP address from the Docker container docker_ip=$(docker run --rm alpine ip route | awk 'NR==1 {print $3}') @@ -21,6 +21,6 @@ else sudo iptables -A INPUT -p tcp --dport 9003 -j ACCEPT echo "Port 9003 has been opened for xdebug." fi -fi -echo "Tasks completed successfully" + echo "Tasks completed successfully" +fi From d6ab26542a76976d529c77cd3f566df5048c7399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kmilo=20Denis=20Gonz=C3=A1lez?= Date: Thu, 7 Mar 2024 17:56:25 -0500 Subject: [PATCH 068/115] Update README.md update Readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cba7b7a72..ce388455d 100644 --- a/README.md +++ b/README.md @@ -539,11 +539,6 @@ bin/copyfromcontainer --all ### Linux -#### Install necessary dependencies -``` -sudo apt install curl libnss3-tools unzip rsync -``` - 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 `compose.dev-linux.yaml` to `compose.dev.yaml` before installing Magento to take advantage of this setup. @@ -563,7 +558,12 @@ You must also create a new entry in your `/etc/hosts` file using the same IP: ``` 172.17.0.1 host.docker.internal ``` +#### Install necessary dependencies +To ensure proper functionality, the docker-magento setup requires a few system dependencies to be installed on Linux. To install these dependencies, please execute the following command from the terminal: +```bash +sudo apt install curl libnss3-tools unzip rsync +``` #### Extra settings To enable Xdebug on Linux, you may also need to open port 9003 on the firewall by running: From 7c7df045a30add0fc46e372bc606fd762885ca01 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 7 Mar 2024 23:48:51 -0500 Subject: [PATCH 069/115] Update README.md Placement update --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ce388455d..9f25eb523 100644 --- a/README.md +++ b/README.md @@ -543,6 +543,14 @@ Running Docker on Linux should be pretty straight-forward. Note that you need to Copy `compose.dev-linux.yaml` to `compose.dev.yaml` before installing Magento to take advantage of this setup. +#### Install necessary dependencies + +To ensure proper functionality, the docker-magento setup requires a few system dependencies to be installed on Linux. To install these dependencies, please execute the following command from the terminal: + +``` +sudo apt install curl libnss3-tools unzip rsync +``` + #### The host.docker.internal hostname The `host.docker.internal` hostname is used on Docker for Mac/Windows to reference the Docker daemon. On Linux, this hostname does not exist. @@ -558,12 +566,7 @@ You must also create a new entry in your `/etc/hosts` file using the same IP: ``` 172.17.0.1 host.docker.internal ``` -#### Install necessary dependencies -To ensure proper functionality, the docker-magento setup requires a few system dependencies to be installed on Linux. To install these dependencies, please execute the following command from the terminal: -```bash -sudo apt install curl libnss3-tools unzip rsync -``` #### Extra settings To enable Xdebug on Linux, you may also need to open port 9003 on the firewall by running: From d5c204ef87a917e3fce675a2350e3778ee86324a Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Sat, 9 Mar 2024 11:56:09 +0200 Subject: [PATCH 070/115] Refactor code --- compose/bin/create-user | 75 ++++------------------------------------- 1 file changed, 6 insertions(+), 69 deletions(-) diff --git a/compose/bin/create-user b/compose/bin/create-user index a556f44e0..f8826b873 100755 --- a/compose/bin/create-user +++ b/compose/bin/create-user @@ -2,84 +2,21 @@ # Function to create admin user create_admin_user() { - USERNAME="admin" - EMAIL="admin@example.com" - FIRSTNAME="Admin" - LASTNAME="Admin" - PASSWORD="Admin123" - - bin/magento admin:user:create \ - --admin-user="${USERNAME}" \ - --admin-password="${PASSWORD}" \ - --admin-email="${EMAIL}" \ - --admin-firstname="${FIRSTNAME}" \ - --admin-lastname="${LASTNAME}" - - if [ $? -eq 0 ]; then - echo "Admin account created successfully." - echo "Username: ${USERNAME}" - echo "Email: ${EMAIL}" - echo "Firstname: ${FIRSTNAME}" - echo "Lastname: ${LASTNAME}" - echo "Password: ${PASSWORD}" - else - echo "Error creating admin user." - fi + bin/magento admin:user:create } - # Function to create customer account create_customer_account() { - EMAIL="${EMAIL:-customer@example.com}" - PASSWORD="${PASSWORD:-customer123QWERTY}" - FIRSTNAME="${FIRSTNAME:-Customer}" - LASTNAME="${LASTNAME:-Customer}" - WEBSITE="${WEBSITE:-1}" - - bin/n98-magerun2 customer:create "${EMAIL}" "${PASSWORD}" "${FIRSTNAME}" "${LASTNAME}" "${WEBSITE}" - - if [ $? -eq 0 ]; then - echo "Customer account created successfully." - echo "Email: ${EMAIL}" - echo "Firstname: ${FIRSTNAME}" - echo "Lastname: ${LASTNAME}" - echo "Password: ${PASSWORD}" - else - echo "Error creating customer account." - fi + bin/n98-magerun2 customer:create } - -# Check if n98-magerun2.phar exists, if not download and install -if ! bin/cliq ls bin/n98-magerun2; then - echo "Checking if n98-magerun2.phar exists, just a moment..." - bin/clinotty curl -sS -O https://files.magerun.net/n98-magerun2.phar - bin/clinotty curl -sS -o n98-magerun2.phar.sha256 https://files.magerun.net/sha256.php?file=n98-magerun2.phar - bin/clinotty shasum -a 256 -c n98-magerun2.phar.sha256 - [ $? != 0 ] && echo "sha256 checksum do not match!" && exit - bin/cliq chmod +x n98-magerun2.phar bin/cliq mkdir -p bin bin/cliq mv n98-magerun2.phar bin -fi - # Prompt user for type of account to create read -r -p "Do you want to create an admin (A) or a customer (C) account? [A/C]: " account_type - -if [[ "$account_type" == "A" || "$account_type" == "a" ]]; then - create_admin_user -elif [[ "$account_type" == "C" || "$account_type" == "c" ]]; then - read -r -p "Do you want to use default values for customer account? (Y/N): " use_defaults - if [[ "$use_defaults" == "Y" || "$use_defaults" == "y" ]]; then - create_customer_account - elif [[ "$use_defaults" == "N" || "$use_defaults" == "n" ]]; then - read -r -p "Enter customer email: " EMAIL - read -r -p "Enter customer password: " PASSWORD - read -r -p "Enter customer firstname: " FIRSTNAME - read -r -p "Enter customer lastname: " LASTNAME - read -r -p "Enter customer website: " WEBSITE - create_customer_account - else - echo "Invalid option. Please choose either Y or N." - fi +if [[ "$account_type" == [Aa] ]]; then + create_admin_user +elif [[ "$account_type" == [Cc] ]]; then + create_customer_account else echo "Invalid option. Please choose either A or C." fi From 1a23d2482086f1ee64d122f5532b2ad3d0061829 Mon Sep 17 00:00:00 2001 From: Stoyvo Date: Wed, 13 Mar 2024 01:12:08 -0400 Subject: [PATCH 071/115] Pin Docker Compose v2.6.6 Magento's composer plugin hasn't been updated in over a year, they merged a composer 7 fix but haven't released it... So we'll pin the version for now. --- images/php/8.2/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index f991fd500..133779b4f 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -93,7 +93,8 @@ RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php && make install RUN curl -sS https://getcomposer.org/installer | \ - php -- --install-dir=/usr/local/bin --filename=composer + php -- --version=2.6.6 --install-dir=/usr/local/bin --filename=composer + COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini From e39ab99322c649dbddf456c70cdca44e806fd343 Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Sat, 16 Mar 2024 17:10:11 +0200 Subject: [PATCH 072/115] Add description for scripts in the README.md file --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 98810fa05..62e1f4129 100644 --- a/README.md +++ b/README.md @@ -277,22 +277,25 @@ 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/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` @@ -306,6 +309,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` @@ -314,6 +318,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 setup 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` From e8d312963e6a7ade77115ea60760ad09ed739b4c Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Sat, 16 Mar 2024 17:38:30 +0200 Subject: [PATCH 073/115] Fix typo README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62e1f4129..b51be5c41 100644 --- a/README.md +++ b/README.md @@ -319,7 +319,7 @@ It is recommended to keep your root docker config files in one repository, and y - `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 setup integration tests. +- `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` From c71591344856acbbaa44a619a85145c11baea094 Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Sat, 16 Mar 2024 18:03:32 +0200 Subject: [PATCH 074/115] Modified Makefile --- compose/Makefile | 80 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/compose/Makefile b/compose/Makefile index fe8aa0be8..9640223f8 100644 --- a/compose/Makefile +++ b/compose/Makefile @@ -19,35 +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. Ex. `bin/analyse app/code`')" @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,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.')" @@ -56,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 @@ -84,6 +104,9 @@ cliq: composer: @./bin/composer $(call args) +configure-linux: + @./bin/configure-linux + copyfromcontainer: @./bin/copyfromcontainer $(call args) @@ -93,6 +116,15 @@ 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 @@ -102,6 +134,12 @@ devconsole: devtools-cli-check: @./bin/devtools-cli-check +docker-compose: + @./bin/docker-compose + +docker-stats: + @./bin/docker-stats + download: @./bin/download $(call args) @@ -110,12 +148,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) @@ -134,6 +181,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 @@ -147,6 +203,9 @@ remove: removeall: @./bin/removeall +removenetwork: + @./bin/removenetwork + removevolumes: @./bin/removevolumes @@ -167,19 +226,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) @@ -189,6 +260,9 @@ status: stop: @./bin/stop $(call args) +stopall: + @./bin/stopall $(call args) + update: @./bin/update From 1c5d7ca5d465b41a4c6f7b2cebdcbdc1b36a5d66 Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Sat, 16 Mar 2024 18:06:47 +0200 Subject: [PATCH 075/115] Update Makefile --- compose/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/Makefile b/compose/Makefile index 9640223f8..9ba8841fa 100644 --- a/compose/Makefile +++ b/compose/Makefile @@ -19,7 +19,7 @@ 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. Ex. `bin/analyse app/code`')" + @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.')" From 55e2e7da278d51ca441ba026be3f3c1874883b68 Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Sat, 16 Mar 2024 18:14:00 +0200 Subject: [PATCH 076/115] Removed the devtools-cli-check script from the Makefile --- compose/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/compose/Makefile b/compose/Makefile index 9ba8841fa..8b25240d0 100644 --- a/compose/Makefile +++ b/compose/Makefile @@ -35,7 +35,6 @@ help: @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.')" @@ -131,9 +130,6 @@ dev-urn-catalog-generate: devconsole: @./bin/devconsole -devtools-cli-check: - @./bin/devtools-cli-check - docker-compose: @./bin/docker-compose From 151bb88ffc2123d3fea14dd0e5fa4c44e91f74b0 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 19 Mar 2024 07:48:28 -0400 Subject: [PATCH 077/115] Update create-user Standardized bash input prompt for the creation of either account and removed unneeded functions --- compose/bin/create-user | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/compose/bin/create-user b/compose/bin/create-user index f8826b873..c99f38421 100755 --- a/compose/bin/create-user +++ b/compose/bin/create-user @@ -1,23 +1,21 @@ #!/usr/bin/env bash -# Function to create admin user -create_admin_user() { - bin/magento admin:user:create -} -# Function to create customer account -create_customer_account() { - bin/n98-magerun2 customer:create -} - bin/cliq chmod +x n98-magerun2.phar - bin/cliq mkdir -p bin - bin/cliq mv n98-magerun2.phar bin -# Prompt user for type of account to create -read -r -p "Do you want to create an admin (A) or a customer (C) account? [A/C]: " account_type +read -r -p "Create an admin (a) or a customer (c)? [a/c]: " account_type +[[ "$account_type" == [Aa] ]] && read -r -p "Username: " USERNAME +read -r -p "Email: " EMAIL +read -r -p "Password (at least 8 characters): " PASSWORD +read -r -p "First Name: " FIRSTNAME +read -r -p "Last Name: " LASTNAME + if [[ "$account_type" == [Aa] ]]; then - create_admin_user + bin/magento admin:user:create \ + --admin-user=${USERNAME} \ + --admin-password=${PASSWORD} \ + --admin-email=${EMAIL} \ + --admin-firstname=${FIRSTNAME} \ + --admin-lastname=${LASTNAME} elif [[ "$account_type" == [Cc] ]]; then - create_customer_account + bin/n98-magerun2 customer:create "${EMAIL}" "${PASSWORD}" "${FIRSTNAME}" "${LASTNAME}" else - echo "Invalid option. Please choose either A or C." + echo "Invalid option. Please choose either a or c." fi - From b6521c303b449bbacbf5e4319af9de8d7220a4cd Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 19 Mar 2024 07:55:11 -0400 Subject: [PATCH 078/115] Update create-user Fixed shellcheck to prevent globbing and splitting. --- compose/bin/create-user | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compose/bin/create-user b/compose/bin/create-user index c99f38421..d92b3c86e 100755 --- a/compose/bin/create-user +++ b/compose/bin/create-user @@ -9,11 +9,11 @@ read -r -p "Last Name: " LASTNAME if [[ "$account_type" == [Aa] ]]; then bin/magento admin:user:create \ - --admin-user=${USERNAME} \ - --admin-password=${PASSWORD} \ - --admin-email=${EMAIL} \ - --admin-firstname=${FIRSTNAME} \ - --admin-lastname=${LASTNAME} + --admin-user="${USERNAME}" \ + --admin-password="${PASSWORD}" \ + --admin-email="${EMAIL}" \ + --admin-firstname="${FIRSTNAME}" \ + --admin-lastname="${LASTNAME}" elif [[ "$account_type" == [Cc] ]]; then bin/n98-magerun2 customer:create "${EMAIL}" "${PASSWORD}" "${FIRSTNAME}" "${LASTNAME}" else From 8cad6b6aea106d4d750c5ba25ec9dc314d246995 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 19 Mar 2024 08:00:14 -0400 Subject: [PATCH 079/115] Add helper script to readme --- README.md | 1 + compose/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 485884b80..3a81779d9 100644 --- a/README.md +++ b/README.md @@ -275,6 +275,7 @@ It is recommended to keep your root docker config files in one repository, and y - `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/create-user`: Create either an admin user or customer account. - `bin/cron`: Start or stop the cron service. Ex. `bin/cron start` - `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` diff --git a/compose/Makefile b/compose/Makefile index c02b05f22..272300a1b 100644 --- a/compose/Makefile +++ b/compose/Makefile @@ -27,6 +27,7 @@ help: @echo "$(call format,composer,'Run the composer binary.')" @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,dev-urn-catalog-generate,'Generate URNs for PHPStorm and remap paths to local host.')" @echo "$(call format,devconsole,'Alias for n98-magerun2 dev:console.')" From 31bec4c4f786523aa7fb4902144e6fd5353337d6 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 19 Mar 2024 08:10:23 -0400 Subject: [PATCH 080/115] Update Dockerfile Removed extra line break --- images/php/8.2/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index 133779b4f..5e0c98618 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -95,7 +95,6 @@ RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php RUN curl -sS https://getcomposer.org/installer | \ php -- --version=2.6.6 --install-dir=/usr/local/bin --filename=composer - COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini COPY conf/msmtprc /etc/msmtprc From 4063e05808a6f092ae3b337549de6c8fb7fbc323 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 19 Mar 2024 08:12:08 -0400 Subject: [PATCH 081/115] Pinned Composer version in all PHP docker images --- images/php/8.1/Dockerfile | 2 +- images/php/8.3/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index 7baee223e..c1d06d4e2 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -93,7 +93,7 @@ RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php && make install RUN curl -sS https://getcomposer.org/installer | \ - php -- --install-dir=/usr/local/bin --filename=composer + php -- --version=2.6.6 --install-dir=/usr/local/bin --filename=composer COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini diff --git a/images/php/8.3/Dockerfile b/images/php/8.3/Dockerfile index 6295e7d61..dde116865 100644 --- a/images/php/8.3/Dockerfile +++ b/images/php/8.3/Dockerfile @@ -104,7 +104,7 @@ RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php && make install RUN curl -sS https://getcomposer.org/installer | \ - php -- --install-dir=/usr/local/bin --filename=composer + php -- --version=2.6.6 --install-dir=/usr/local/bin --filename=composer COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini From 058d5cefd2b56e31300fb3ddf9b4c2ce190ea0fd Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 19 Mar 2024 09:33:20 -0400 Subject: [PATCH 082/115] Bump versions for new PHP image builds --- .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index 88fcbc0c4..dbe7daf5b 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.1-fpm - markoshust/magento-php:8.1-fpm-2 + markoshust/magento-php:8.1-fpm-3 diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 8f09f8825..8312628a0 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.2-fpm - markoshust/magento-php:8.2-fpm-1 + markoshust/magento-php:8.2-fpm-2 diff --git a/README.md b/README.md index 313741a6f..3c47192fb 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ View Dockerfiles for the latest tags: - [markoshust/magento-nginx (Docker Hub)](https://hub.docker.com/r/markoshust/magento-nginx/) - [`1.18`, `1.18-8`](images/nginx/1.18) - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/) - - [`8.1-fpm`, `8.1-fpm-2`](images/php/8.1) - - [`8.2-fpm`, `8.2-fpm-1`](images/php/8.2) + - [`8.1-fpm`, `8.1-fpm-3`](images/php/8.1) + - [`8.2-fpm`, `8.2-fpm-2`](images/php/8.2) - [`8.3-fpm`, `8.3-fpm-develop`](images/php/8.3) - [markoshust/magento-opensearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-opensearch/) - [`1.2`, `1.2-0`](images/opensearch/1.2) From fdd8a079acf5aa0a55cc4947b7df16f418f21966 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 19 Mar 2024 11:30:41 -0400 Subject: [PATCH 083/115] Tagged version 45.1.0 --- CHANGELOG.md | 12 ++++++++++++ compose/compose.yaml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a2a69daa..9382944f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [45.1.0] - 2024-03-19 + +### Added +- New `bin/configure-linux` helper script to assist with easier Linux setup [PR #1016](https://github.com/markshust/docker-magento/pull/1016). +- Linux ependencies to README [PR #1050](https://github.com/markshust/docker-magento/pull/1050). +- Added `bin/create-user` script to allow for easy creation of Magento admin user & customer [PR #1040](https://github.com/markshust/docker-magento/pull/1040). +- Descriptions for all missing helper scripts to README and Makefile [PR #1096](https://github.com/markshust/docker-magento/pull/1096). + +### Updated +- `bin/docker-stats` to simplified output [PR #1083](https://github.com/markshust/docker-magento/pull/1083). +- Pinned Composer version for increased compatibility with latest Magento versions [PR #1090](https://github.com/markshust/docker-magento/pull/1090). + ## [45.0.0] - 2024-02-25 ### Added diff --git a/compose/compose.yaml b/compose/compose.yaml index 3ca1e7d1e..7cd956668 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 45.0.0 +## Version 45.1.0 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux From 41b1d3e2a2c9bdab6c8a71c4f0484c481d51d5d1 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 19 Mar 2024 11:32:54 -0400 Subject: [PATCH 084/115] Bump PHP version --- compose/compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/compose.yaml b/compose/compose.yaml index 7cd956668..da679726c 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -32,7 +32,7 @@ services: #- "host.docker.internal:host-gateway" phpfpm: - image: markoshust/magento-php:8.2-fpm-1 + image: markoshust/magento-php:8.2-fpm-2 volumes: *appvolumes env_file: env/phpfpm.env #extra_hosts: *appextrahosts From 8bfb9469ed70671f0b5b115ff3c74b0b15700018 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 23 Mar 2024 12:01:35 -0400 Subject: [PATCH 085/115] Updated video lesson links to include new Code Quality Tools --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9d26e8e3e..3913832ce 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,12 @@ Set Up a Magento 2 Development Environment with Docker - Set up a docker-magento project in PhpStorm - Set up the Magento PhpStorm plugin +#### Code Quality Tools + +- Configure PHPCS (PHP CodeSniffer) for Magento +- Configure PHPCSF (PHP CodeSniffer Fixer) for Magento +- + #### Xdebug - Install the Xdebug helper browser plugin for Chrome & PhpStorm From 2a38bb6cb5b9de83ca9fa2a04ddc2b13c6f0547a Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Sun, 24 Mar 2024 21:01:54 +0200 Subject: [PATCH 086/115] Fix video lesson links to include new Code Quality Tools --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3913832ce..f33eff514 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Set Up a Magento 2 Development Environment with Docker - Configure PHPCS (PHP CodeSniffer) for Magento - Configure PHPCSF (PHP CodeSniffer Fixer) for Magento -- +- Configure PHPMD (PHP Mess Detector) for Magento #### Xdebug From 88c67ed283089b4470bdc70a270edacad7ed464b Mon Sep 17 00:00:00 2001 From: evgeniy Date: Thu, 4 Apr 2024 00:27:18 +0300 Subject: [PATCH 087/115] Fix typo in the CHANGELOG.md file --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9382944f7..8f3aa08c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - New `bin/configure-linux` helper script to assist with easier Linux setup [PR #1016](https://github.com/markshust/docker-magento/pull/1016). -- Linux ependencies to README [PR #1050](https://github.com/markshust/docker-magento/pull/1050). +- Linux dependencies to README [PR #1050](https://github.com/markshust/docker-magento/pull/1050). - Added `bin/create-user` script to allow for easy creation of Magento admin user & customer [PR #1040](https://github.com/markshust/docker-magento/pull/1040). - Descriptions for all missing helper scripts to README and Makefile [PR #1096](https://github.com/markshust/docker-magento/pull/1096). From 2385779ef4ec75d967965bba27981b68e33bfdbf Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 9 Apr 2024 09:29:00 -0400 Subject: [PATCH 088/115] Update all packages to support latest versions for Magento 2.4.7 #1108 --- .../workflows/build-elasticsearch-7-16.yml | 34 +++++++++++++++++ .../workflows/build-elasticsearch-8-11.yml | 34 +++++++++++++++++ .../workflows/build-elasticsearch-8-13.yml | 34 +++++++++++++++++ .github/workflows/build-elasticsearch-8-7.yml | 34 +++++++++++++++++ .github/workflows/build-nginx-1-22.yml | 34 +++++++++++++++++ .github/workflows/build-nginx-1-24.yml | 34 +++++++++++++++++ .github/workflows/build-opensearch-2-12.yml | 34 +++++++++++++++++ .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- .github/workflows/build-php-8-3.yml | 2 +- .github/workflows/build-rabbitmq-3-12.yml | 34 +++++++++++++++++ .github/workflows/build-rabbitmq-3-8.yml | 34 +++++++++++++++++ README.md | 18 ++++++--- images/elasticsearch/7.16/Dockerfile | 5 +++ images/elasticsearch/8.11/Dockerfile | 5 +++ images/elasticsearch/8.13/Dockerfile | 5 +++ images/nginx/1.22/Dockerfile | 37 +++++++++++++++++++ images/nginx/1.22/conf/default.conf | 35 ++++++++++++++++++ images/nginx/1.22/conf/default.magento1.conf | 35 ++++++++++++++++++ images/nginx/1.22/conf/nginx.conf | 36 ++++++++++++++++++ images/nginx/1.24/Dockerfile | 37 +++++++++++++++++++ images/nginx/1.24/conf/default.conf | 35 ++++++++++++++++++ images/nginx/1.24/conf/default.magento1.conf | 35 ++++++++++++++++++ images/nginx/1.24/conf/nginx.conf | 36 ++++++++++++++++++ images/opensearch/2.12/Dockerfile | 5 +++ images/php/8.1/Dockerfile | 2 +- images/php/8.2/Dockerfile | 2 +- images/rabbitmq/3.12/Dockerfile | 3 ++ images/rabbitmq/3.12/conf/rabbitmq.conf | 1 + images/rabbitmq/3.8/Dockerfile | 3 ++ images/rabbitmq/3.8/conf/rabbitmq.conf | 1 + 31 files changed, 638 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build-elasticsearch-7-16.yml create mode 100644 .github/workflows/build-elasticsearch-8-11.yml create mode 100644 .github/workflows/build-elasticsearch-8-13.yml create mode 100644 .github/workflows/build-elasticsearch-8-7.yml create mode 100644 .github/workflows/build-nginx-1-22.yml create mode 100644 .github/workflows/build-nginx-1-24.yml create mode 100644 .github/workflows/build-opensearch-2-12.yml create mode 100644 .github/workflows/build-rabbitmq-3-12.yml create mode 100644 .github/workflows/build-rabbitmq-3-8.yml create mode 100644 images/elasticsearch/7.16/Dockerfile create mode 100644 images/elasticsearch/8.11/Dockerfile create mode 100644 images/elasticsearch/8.13/Dockerfile create mode 100644 images/nginx/1.22/Dockerfile create mode 100644 images/nginx/1.22/conf/default.conf create mode 100644 images/nginx/1.22/conf/default.magento1.conf create mode 100644 images/nginx/1.22/conf/nginx.conf create mode 100644 images/nginx/1.24/Dockerfile create mode 100644 images/nginx/1.24/conf/default.conf create mode 100644 images/nginx/1.24/conf/default.magento1.conf create mode 100644 images/nginx/1.24/conf/nginx.conf create mode 100644 images/opensearch/2.12/Dockerfile create mode 100644 images/rabbitmq/3.12/Dockerfile create mode 100644 images/rabbitmq/3.12/conf/rabbitmq.conf create mode 100644 images/rabbitmq/3.8/Dockerfile create mode 100644 images/rabbitmq/3.8/conf/rabbitmq.conf diff --git a/.github/workflows/build-elasticsearch-7-16.yml b/.github/workflows/build-elasticsearch-7-16.yml new file mode 100644 index 000000000..d5727ad4e --- /dev/null +++ b/.github/workflows/build-elasticsearch-7-16.yml @@ -0,0 +1,34 @@ +name: build-elasticsearch-7-16 + +on: workflow_dispatch + +jobs: + elasticsearch-7-17: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/elasticsearch/7.17 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-elasticsearch:7.16 + markoshust/magento-elasticsearch:7.16-0 diff --git a/.github/workflows/build-elasticsearch-8-11.yml b/.github/workflows/build-elasticsearch-8-11.yml new file mode 100644 index 000000000..c66e4dc0c --- /dev/null +++ b/.github/workflows/build-elasticsearch-8-11.yml @@ -0,0 +1,34 @@ +name: build-elasticsearch-8-11 + +on: workflow_dispatch + +jobs: + elasticsearch-8-5: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/elasticsearch/8.11 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-elasticsearch:8.11 + markoshust/magento-elasticsearch:8.11-0 diff --git a/.github/workflows/build-elasticsearch-8-13.yml b/.github/workflows/build-elasticsearch-8-13.yml new file mode 100644 index 000000000..1367ce18e --- /dev/null +++ b/.github/workflows/build-elasticsearch-8-13.yml @@ -0,0 +1,34 @@ +name: build-elasticsearch-8-13 + +on: workflow_dispatch + +jobs: + elasticsearch-8-5: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/elasticsearch/8.13 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-elasticsearch:8.13 + markoshust/magento-elasticsearch:8.13-0 diff --git a/.github/workflows/build-elasticsearch-8-7.yml b/.github/workflows/build-elasticsearch-8-7.yml new file mode 100644 index 000000000..99a026160 --- /dev/null +++ b/.github/workflows/build-elasticsearch-8-7.yml @@ -0,0 +1,34 @@ +name: build-elasticsearch-8-7 + +on: workflow_dispatch + +jobs: + elasticsearch-8-5: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/elasticsearch/8.7 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-elasticsearch:8.7 + markoshust/magento-elasticsearch:8.7-0 diff --git a/.github/workflows/build-nginx-1-22.yml b/.github/workflows/build-nginx-1-22.yml new file mode 100644 index 000000000..eadf7c718 --- /dev/null +++ b/.github/workflows/build-nginx-1-22.yml @@ -0,0 +1,34 @@ +name: build-nginx-1-22 + +on: workflow_dispatch + +jobs: + nginx-1-18: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/nginx/1.22 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-nginx:1.22 + markoshust/magento-nginx:1.22-0 diff --git a/.github/workflows/build-nginx-1-24.yml b/.github/workflows/build-nginx-1-24.yml new file mode 100644 index 000000000..1006afba7 --- /dev/null +++ b/.github/workflows/build-nginx-1-24.yml @@ -0,0 +1,34 @@ +name: build-nginx-1-24 + +on: workflow_dispatch + +jobs: + nginx-1-18: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/nginx/1.24 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-nginx:1.24 + markoshust/magento-nginx:1.24-0 diff --git a/.github/workflows/build-opensearch-2-12.yml b/.github/workflows/build-opensearch-2-12.yml new file mode 100644 index 000000000..1e837de25 --- /dev/null +++ b/.github/workflows/build-opensearch-2-12.yml @@ -0,0 +1,34 @@ +name: build-opensearch-2-12 + +on: workflow_dispatch + +jobs: + opensearch-2-5: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/opensearch/2.12 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-opensearch:2.12 + markoshust/magento-opensearch:2.12-0 diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index dbe7daf5b..11b46335c 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.1-fpm - markoshust/magento-php:8.1-fpm-3 + markoshust/magento-php:8.1-fpm-4 diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 8312628a0..10d195082 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.2-fpm - markoshust/magento-php:8.2-fpm-2 + markoshust/magento-php:8.2-fpm-3 diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml index c140c3dbb..fc457fdfa 100644 --- a/.github/workflows/build-php-8-3.yml +++ b/.github/workflows/build-php-8-3.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.3-fpm - markoshust/magento-php:8.3-fpm-develop + markoshust/magento-php:8.3-fpm-0 diff --git a/.github/workflows/build-rabbitmq-3-12.yml b/.github/workflows/build-rabbitmq-3-12.yml new file mode 100644 index 000000000..3f06e02df --- /dev/null +++ b/.github/workflows/build-rabbitmq-3-12.yml @@ -0,0 +1,34 @@ +name: build-rabbitmq-3-12 + +on: workflow_dispatch + +jobs: + rabbitmq-3-11: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/rabbitmq/3.12 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-rabbitmq:3.12 + markoshust/magento-rabbitmq:3.12-0 diff --git a/.github/workflows/build-rabbitmq-3-8.yml b/.github/workflows/build-rabbitmq-3-8.yml new file mode 100644 index 000000000..c95b469bd --- /dev/null +++ b/.github/workflows/build-rabbitmq-3-8.yml @@ -0,0 +1,34 @@ +name: build-rabbitmq-3-8 + +on: workflow_dispatch + +jobs: + rabbitmq-3-9: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + context: images/rabbitmq/3.9 + platforms: linux/amd64,linux/arm64 + push: true + tags: | + markoshust/magento-rabbitmq:3.8 + markoshust/magento-rabbitmq:3.8-0 diff --git a/README.md b/README.md index f33eff514..4b00a01d9 100644 --- a/README.md +++ b/README.md @@ -29,21 +29,29 @@ View Dockerfiles for the latest tags: - [markoshust/magento-nginx (Docker Hub)](https://hub.docker.com/r/markoshust/magento-nginx/) - [`1.18`, `1.18-8`](images/nginx/1.18) + - [`1.22`, `1.22-0`](images/nginx/1.22) + - [`1.24`, `1.24-0`](images/nginx/1.24) - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/) - - [`8.1-fpm`, `8.1-fpm-3`](images/php/8.1) - - [`8.2-fpm`, `8.2-fpm-2`](images/php/8.2) - - [`8.3-fpm`, `8.3-fpm-develop`](images/php/8.3) + - [`8.1-fpm`, `8.1-fpm-4`](images/php/8.1) + - [`8.2-fpm`, `8.2-fpm-3`](images/php/8.2) + - [`8.3-fpm`, `8.3-fpm-0`](images/php/8.3) - [markoshust/magento-opensearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-opensearch/) - - [`1.2`, `1.2-0`](images/opensearch/1.2) - - [`2.5`, `2.5-1`](images/opensearch/2.5) + - [`1.2`, `1.2-0`](images/opensearch/1.2) + - [`2.5`, `2.5-1`](images/opensearch/2.5) + - [`2.12`, `2.12-0`](images/opensearch/2.12) - [markoshust/magento-elasticsearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-elasticsearch/) + - [`7.16`, `7.16-0`](images/elasticsearch/7.16) - [`7.17`, `7.17-1`](images/elasticsearch/7.17) - [`8.4`, `8.4-0`](images/elasticsearch/8.4) - [`8.5`, `8.5-0`](images/elasticsearch/8.5) - [`8.7`, `8.7-0`](images/elasticsearch/8.7) + - [`8.11`, `8.11-0`](images/elasticsearch/8.11) + - [`8.13`, `8.13-0`](images/elasticsearch/8.13) - [markoshust/magento-rabbitmq (Docker Hub)](https://hub.docker.com/r/markoshust/magento-rabbitmq/) + - [`3.8`, `3.8-0`](images/rabbitmq/3.8) - [`3.9`, `3.9-0`](images/rabbitmq/3.9) - [`3.11`, `3.11-1`](images/rabbitmq/3.11) + - [`3.12`, `3.12-0`](images/rabbitmq/3.12) - [markoshust/ssh (Docker Hub)](https://hub.docker.com/r/markoshust/magento-ssh/) - [`latest`](images/ssh) diff --git a/images/elasticsearch/7.16/Dockerfile b/images/elasticsearch/7.16/Dockerfile new file mode 100644 index 000000000..0a9f2b736 --- /dev/null +++ b/images/elasticsearch/7.16/Dockerfile @@ -0,0 +1,5 @@ +FROM elasticsearch:7.16.3 + +RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install \ + analysis-icu \ + analysis-phonetic diff --git a/images/elasticsearch/8.11/Dockerfile b/images/elasticsearch/8.11/Dockerfile new file mode 100644 index 000000000..29e44644a --- /dev/null +++ b/images/elasticsearch/8.11/Dockerfile @@ -0,0 +1,5 @@ +FROM elasticsearch:8.11.4 + +RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install \ + analysis-icu \ + analysis-phonetic diff --git a/images/elasticsearch/8.13/Dockerfile b/images/elasticsearch/8.13/Dockerfile new file mode 100644 index 000000000..963ce8217 --- /dev/null +++ b/images/elasticsearch/8.13/Dockerfile @@ -0,0 +1,5 @@ +FROM elasticsearch:8.13.0 + +RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install \ + analysis-icu \ + analysis-phonetic diff --git a/images/nginx/1.22/Dockerfile b/images/nginx/1.22/Dockerfile new file mode 100644 index 000000000..ec95bf2b9 --- /dev/null +++ b/images/nginx/1.22/Dockerfile @@ -0,0 +1,37 @@ +FROM nginx:1.22-alpine +MAINTAINER Mark Shust + +ARG APP_ID=1000 + +RUN addgroup -g "$APP_ID" app \ + && adduser -G app -u "$APP_ID" -h /var/www -s /bin/bash -S app +RUN touch /var/run/nginx.pid +RUN mkdir /sock + +RUN apk add --no-cache \ + curl \ + nss-tools \ + openssl + +RUN mkdir /etc/nginx/certs \ + && echo -e "\n\n\n\n\n\n\n" | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/certs/nginx.key -out /etc/nginx/certs/nginx.crt + +ARG TARGETARCH + +RUN cd /usr/local/bin/ \ + && curl -L https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-$TARGETARCH -o mkcert \ + && chmod +x mkcert + +COPY ./conf/nginx.conf /etc/nginx/ +COPY ./conf/default.conf /etc/nginx/conf.d/ + +RUN mkdir -p /etc/nginx/html /var/www/html \ + && chown -R app:app /etc/nginx /var/www /var/cache/nginx /var/run/nginx.pid /sock + +EXPOSE 8443 + +USER app:app + +VOLUME /var/www + +WORKDIR /var/www/html diff --git a/images/nginx/1.22/conf/default.conf b/images/nginx/1.22/conf/default.conf new file mode 100644 index 000000000..d579cd850 --- /dev/null +++ b/images/nginx/1.22/conf/default.conf @@ -0,0 +1,35 @@ +upstream fastcgi_backend { + server unix:/sock/docker.sock; +} + +server { + listen 8000; + return 301 https://$host$request_uri; +} + +server { + 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; + + set $MAGE_ROOT /var/www/html; + + fastcgi_buffer_size 64k; + fastcgi_buffers 8 128k; + + location /livereload.js { + proxy_set_header Host $host; + proxy_pass http://phpfpm:35729/livereload.js; + } + + location /livereload { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass http://phpfpm:35729/livereload; + } + + include /var/www/html/nginx[.]conf; +} diff --git a/images/nginx/1.22/conf/default.magento1.conf b/images/nginx/1.22/conf/default.magento1.conf new file mode 100644 index 000000000..23f42e942 --- /dev/null +++ b/images/nginx/1.22/conf/default.magento1.conf @@ -0,0 +1,35 @@ +upstream fastcgi_backend { + server unix:/sock/docker.sock; +} + +server { + listen 8000; + server_name localhost; + + set $MAGE_ROOT /var/www/html; + set $MAGE_IS_DEVELOPER_MODE true; + + root $MAGE_ROOT; + + index index.php; + autoindex off; + charset off; + + add_header 'X-Content-Type-Options' 'nosniff'; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ cron\.php { + deny all; + } + + location ~* \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +} diff --git a/images/nginx/1.22/conf/nginx.conf b/images/nginx/1.22/conf/nginx.conf new file mode 100644 index 000000000..59e1e89d1 --- /dev/null +++ b/images/nginx/1.22/conf/nginx.conf @@ -0,0 +1,36 @@ +# let's assume dual-core machine +worker_processes 2; + +error_log /var/log/nginx/error.log debug; +pid /var/run/nginx.pid; + +load_module /etc/nginx/modules/ngx_http_image_filter_module.so; + +events { + # this should be equal to value of "ulimit -n" + # reference: https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration + worker_connections 1048576; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main + '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + client_max_body_size 20M; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/images/nginx/1.24/Dockerfile b/images/nginx/1.24/Dockerfile new file mode 100644 index 000000000..39c2d8d5f --- /dev/null +++ b/images/nginx/1.24/Dockerfile @@ -0,0 +1,37 @@ +FROM nginx:1.24-alpine +MAINTAINER Mark Shust + +ARG APP_ID=1000 + +RUN addgroup -g "$APP_ID" app \ + && adduser -G app -u "$APP_ID" -h /var/www -s /bin/bash -S app +RUN touch /var/run/nginx.pid +RUN mkdir /sock + +RUN apk add --no-cache \ + curl \ + nss-tools \ + openssl + +RUN mkdir /etc/nginx/certs \ + && echo -e "\n\n\n\n\n\n\n" | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/certs/nginx.key -out /etc/nginx/certs/nginx.crt + +ARG TARGETARCH + +RUN cd /usr/local/bin/ \ + && curl -L https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-$TARGETARCH -o mkcert \ + && chmod +x mkcert + +COPY ./conf/nginx.conf /etc/nginx/ +COPY ./conf/default.conf /etc/nginx/conf.d/ + +RUN mkdir -p /etc/nginx/html /var/www/html \ + && chown -R app:app /etc/nginx /var/www /var/cache/nginx /var/run/nginx.pid /sock + +EXPOSE 8443 + +USER app:app + +VOLUME /var/www + +WORKDIR /var/www/html diff --git a/images/nginx/1.24/conf/default.conf b/images/nginx/1.24/conf/default.conf new file mode 100644 index 000000000..d579cd850 --- /dev/null +++ b/images/nginx/1.24/conf/default.conf @@ -0,0 +1,35 @@ +upstream fastcgi_backend { + server unix:/sock/docker.sock; +} + +server { + listen 8000; + return 301 https://$host$request_uri; +} + +server { + 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; + + set $MAGE_ROOT /var/www/html; + + fastcgi_buffer_size 64k; + fastcgi_buffers 8 128k; + + location /livereload.js { + proxy_set_header Host $host; + proxy_pass http://phpfpm:35729/livereload.js; + } + + location /livereload { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass http://phpfpm:35729/livereload; + } + + include /var/www/html/nginx[.]conf; +} diff --git a/images/nginx/1.24/conf/default.magento1.conf b/images/nginx/1.24/conf/default.magento1.conf new file mode 100644 index 000000000..23f42e942 --- /dev/null +++ b/images/nginx/1.24/conf/default.magento1.conf @@ -0,0 +1,35 @@ +upstream fastcgi_backend { + server unix:/sock/docker.sock; +} + +server { + listen 8000; + server_name localhost; + + set $MAGE_ROOT /var/www/html; + set $MAGE_IS_DEVELOPER_MODE true; + + root $MAGE_ROOT; + + index index.php; + autoindex off; + charset off; + + add_header 'X-Content-Type-Options' 'nosniff'; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ cron\.php { + deny all; + } + + location ~* \.php$ { + try_files $uri =404; + fastcgi_pass fastcgi_backend; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +} diff --git a/images/nginx/1.24/conf/nginx.conf b/images/nginx/1.24/conf/nginx.conf new file mode 100644 index 000000000..59e1e89d1 --- /dev/null +++ b/images/nginx/1.24/conf/nginx.conf @@ -0,0 +1,36 @@ +# let's assume dual-core machine +worker_processes 2; + +error_log /var/log/nginx/error.log debug; +pid /var/run/nginx.pid; + +load_module /etc/nginx/modules/ngx_http_image_filter_module.so; + +events { + # this should be equal to value of "ulimit -n" + # reference: https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration + worker_connections 1048576; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main + '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + client_max_body_size 20M; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/images/opensearch/2.12/Dockerfile b/images/opensearch/2.12/Dockerfile new file mode 100644 index 000000000..3c81caabc --- /dev/null +++ b/images/opensearch/2.12/Dockerfile @@ -0,0 +1,5 @@ +FROM opensearchproject/opensearch:2.12.0 + +RUN /usr/share/opensearch/bin/opensearch-plugin install --batch \ + analysis-icu \ + analysis-phonetic diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index c1d06d4e2..abdfe5b1a 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -93,7 +93,7 @@ RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php && make install RUN curl -sS https://getcomposer.org/installer | \ - php -- --version=2.6.6 --install-dir=/usr/local/bin --filename=composer + php -- --version=2.2.18 --install-dir=/usr/local/bin --filename=composer COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index 5e0c98618..2f44660e8 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -93,7 +93,7 @@ RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php && make install RUN curl -sS https://getcomposer.org/installer | \ - php -- --version=2.6.6 --install-dir=/usr/local/bin --filename=composer + php -- --version=2.2.18 --install-dir=/usr/local/bin --filename=composer COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini diff --git a/images/rabbitmq/3.12/Dockerfile b/images/rabbitmq/3.12/Dockerfile new file mode 100644 index 000000000..75000e1f9 --- /dev/null +++ b/images/rabbitmq/3.12/Dockerfile @@ -0,0 +1,3 @@ +FROM rabbitmq:3.12-management-alpine + +COPY conf/rabbitmq.conf /etc/rabbitmq/rabbitmq.conf diff --git a/images/rabbitmq/3.12/conf/rabbitmq.conf b/images/rabbitmq/3.12/conf/rabbitmq.conf new file mode 100644 index 000000000..bd94175a5 --- /dev/null +++ b/images/rabbitmq/3.12/conf/rabbitmq.conf @@ -0,0 +1 @@ +vm_memory_high_watermark.absolute = 1GB diff --git a/images/rabbitmq/3.8/Dockerfile b/images/rabbitmq/3.8/Dockerfile new file mode 100644 index 000000000..79ff6ea38 --- /dev/null +++ b/images/rabbitmq/3.8/Dockerfile @@ -0,0 +1,3 @@ +FROM rabbitmq:3.8-management-alpine + +COPY conf/rabbitmq.conf /etc/rabbitmq/rabbitmq.conf diff --git a/images/rabbitmq/3.8/conf/rabbitmq.conf b/images/rabbitmq/3.8/conf/rabbitmq.conf new file mode 100644 index 000000000..bd94175a5 --- /dev/null +++ b/images/rabbitmq/3.8/conf/rabbitmq.conf @@ -0,0 +1 @@ +vm_memory_high_watermark.absolute = 1GB From 5a59d7a5cc3166163f5c3fd835e64aff50bd3659 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 9 Apr 2024 10:51:58 -0400 Subject: [PATCH 089/115] Release version 46.0.0 for Magento 2.4.7 support #1110 --- CHANGELOG.md | 15 +++++++++++++++ README.md | 10 +++++----- compose/compose.yaml | 28 +++++++++++++++++++++------- 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9382944f7..11cf3afd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [46.0.0] - 2024-04-09 + +### Added +- New `bin/check-dependencies` script which provides helpful recommendations for dependencies tailored to the chosen Magento version [PR #1018](https://github.com/markshust/docker-magento/pull/1018/files). +- New `nginx` Docker images for versions 1.22, 1.24 [PR #1019](https://github.com/markshust/docker-magento/pull/1109). +- New `php-fpm` 8.3 Docker image for Magento 2.4.7 support [PR #1019](https://github.com/markshust/docker-magento/pull/1109). +- New `opensearch` 2.12 Docker image for Magento 2.4.7 support [PR #1019](https://github.com/markshust/docker-magento/pull/1109). +- New `elasticsearch` 7.16 and 8.11 Docker images for previous Magento versions support [PR #1019](https://github.com/markshust/docker-magento/pull/1109). +- New `elasticsearch` 8.13 Docker image for Magento 2.4.7 support [PR #1019](https://github.com/markshust/docker-magento/pull/1109). +- New `rabbitmq` 3.8 Docker image for previous Magento versions support [PR #1019](https://github.com/markshust/docker-magento/pull/1109). +- New `rabbitmq` 3.12 Docker image for Magento 2.4.7 support [PR #1019](https://github.com/markshust/docker-magento/pull/1109). + +### Updated +- Link `php-fpm` Docker images to officially compatible Composer versions [PR #1019](https://github.com/markshust/docker-magento/pull/1109). + ## [45.1.0] - 2024-03-19 ### Added diff --git a/README.md b/README.md index 4b00a01d9..a3743bc36 100644 --- a/README.md +++ b/README.md @@ -149,10 +149,10 @@ 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.6-p4 community +curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test 2.4.7 community ``` -The `magento.test` above defines the hostname to use, and the `2.4.6-p4` 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 `magento.test` above defines the hostname to use, and the `2.4.7` 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://magento.test`. @@ -180,10 +180,10 @@ 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.6-p4 community +bin/download 2.4.7 community # You can specify the version and type (community, enterprise, mageos, mageos-nightly, mageos-mirror, mageos-hypernode-mirror, or mageos-maxcluster-mirror). # The mageos type is an alias for mageos-mirror. -# If no arguments are passed, "2.4.6-p4" and "community" are the default values used. +# If no arguments are passed, "2.4.7" and "community" are the default values used. # or for Magento core development: # bin/start --no-dev @@ -304,7 +304,7 @@ It is recommended to keep your root docker config files in one repository, and y - `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/download`: Download specific Magento version from Composer to the container, with optional arguments of the version (2.4.7 [default]) and type ("community" [default], "enterprise", or "mageos"). Ex. `bin/download 2.4.7 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` diff --git a/compose/compose.yaml b/compose/compose.yaml index da679726c..27d78717a 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 45.1.0 +## Version 46.0.0 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux @@ -14,7 +14,7 @@ version: "3" services: app: - image: markoshust/magento-nginx:1.18-8 + image: markoshust/magento-nginx:1.24-0 ports: - "80:8000" - "443:8443" @@ -32,7 +32,7 @@ services: #- "host.docker.internal:host-gateway" phpfpm: - image: markoshust/magento-php:8.2-fpm-2 + image: markoshust/magento-php:8.3-fpm-0 volumes: *appvolumes env_file: env/phpfpm.env #extra_hosts: *appextrahosts @@ -49,13 +49,27 @@ services: volumes: - dbdata:/var/lib/mysql + ## If you wish to use MySQL, comment out opensearch image above and + ## uncomment this block. + #db: + # image: mysql:8.0 + # command: + # --max_allowed_packet=64M + # --optimizer_use_condition_selectivity=1 + # --optimizer_switch="rowid_filter=off" + # ports: + # - "3306:3306" + # env_file: env/db.env + # volumes: + # - dbdata:/var/lib/mysql + redis: - image: redis:7.0-alpine + image: redis:7.2-alpine ports: - "6379:6379" opensearch: - image: markoshust/magento-opensearch:2.5-1 + image: markoshust/magento-opensearch:2.12-0 ports: - "9200:9200" - "9300:9300" @@ -75,7 +89,7 @@ services: # update the bin/setup command to use the $ES_HOST variable as the value for # the --elasticsearch-host argument passed to bin/magento setup:install. #elasticsearch: - # image: markoshust/magento-elasticsearch:7.17-1 + # image: markoshust/magento-elasticsearch:8.13-0 # ports: # - "9200:9200" # - "9300:9300" @@ -90,7 +104,7 @@ services: # - "max_map_count=262144" rabbitmq: - image: markoshust/magento-rabbitmq:3.11-1 + image: markoshust/magento-rabbitmq:3.12-0 ports: - "15672:15672" - "5672:5672" From 3bcab173ef31641330586fcecd9c038cdf69e51b Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Fri, 12 Apr 2024 23:10:53 -0400 Subject: [PATCH 090/115] Downgrade Xdebug to 3.2.2 to fix 502 Bad Gateway error #1085 --- images/php/8.1/Dockerfile | 2 +- images/php/8.2/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index abdfe5b1a..0ab3a35fc 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -44,7 +44,7 @@ RUN pecl channel-update pecl.php.net && pecl install \ imagick-3.7.0 \ redis-6.0.2 \ ssh2-1.3.1 \ - xdebug-3.3.1 \ + xdebug-3.2.2 \ && pecl clear-cache \ && rm -rf /tmp/pear diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index 2f44660e8..b4365f9b0 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -44,7 +44,7 @@ RUN pecl channel-update pecl.php.net && pecl install \ imagick-3.7.0 \ redis-6.0.2 \ ssh2-1.3.1 \ - xdebug-3.3.1 \ + xdebug-3.2.2 \ && pecl clear-cache \ && rm -rf /tmp/pear From b7efbbc51437e3ae79912f7876f40e57a21f3be4 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Fri, 12 Apr 2024 23:13:06 -0400 Subject: [PATCH 091/115] Added swoole to all PHP images --- images/php/8.1/Dockerfile | 1 + images/php/8.2/Dockerfile | 1 + images/php/8.3/Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/images/php/8.1/Dockerfile b/images/php/8.1/Dockerfile index 0ab3a35fc..4c1c6d8c0 100644 --- a/images/php/8.1/Dockerfile +++ b/images/php/8.1/Dockerfile @@ -44,6 +44,7 @@ RUN pecl channel-update pecl.php.net && pecl install \ imagick-3.7.0 \ redis-6.0.2 \ ssh2-1.3.1 \ + swoole-5.1.1 \ xdebug-3.2.2 \ && pecl clear-cache \ && rm -rf /tmp/pear diff --git a/images/php/8.2/Dockerfile b/images/php/8.2/Dockerfile index b4365f9b0..80e6b7393 100644 --- a/images/php/8.2/Dockerfile +++ b/images/php/8.2/Dockerfile @@ -44,6 +44,7 @@ RUN pecl channel-update pecl.php.net && pecl install \ imagick-3.7.0 \ redis-6.0.2 \ ssh2-1.3.1 \ + swoole-5.1.1 \ xdebug-3.2.2 \ && pecl clear-cache \ && rm -rf /tmp/pear diff --git a/images/php/8.3/Dockerfile b/images/php/8.3/Dockerfile index dde116865..ca0eee43f 100644 --- a/images/php/8.3/Dockerfile +++ b/images/php/8.3/Dockerfile @@ -43,6 +43,7 @@ RUN apt-get update && apt-get install -y \ RUN pecl channel-update pecl.php.net && pecl install \ redis-6.0.2 \ ssh2-1.3.1 \ + swoole-5.1.1 \ xdebug-3.3.1 \ && pecl clear-cache \ && rm -rf /tmp/pear From e6d11d47e7ee4520928837b0b44495c80b63e595 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 13 Apr 2024 11:28:37 -0400 Subject: [PATCH 092/115] New `bin/blackfire` script to enable, disable, or check status of Blackfire extension. --- README.md | 3 ++- compose/Makefile | 3 ++- compose/bin/blackfire | 55 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100755 compose/bin/blackfire diff --git a/README.md b/README.md index a3743bc36..85ae84e63 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,7 @@ It is recommended to keep your root docker config files in one repository, and y - `bin/analyse`: Run `phpstan analyse` within the container to statically analyse code, passing in directory to analyse. Ex. `bin/analyse app/code` - `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/blackfire`: Disable or enable Blackfire. Accepts argument `disable`, `enable`, or `status`. Ex. `bin/blackfire enable` - `bin/cache-clean`: Access the [cache-clean](https://github.com/mage2tv/magento-cache-clean) CLI. Note the watcher is automatically started at startup in `bin/start`. Ex. `bin/cache-clean config full_page` - `bin/check-dependencies`: Provides helpful recommendations for dependencies tailored to the chosen Magento version. - `bin/cli`: Run any CLI command without going into the bash prompt. Ex. `bin/cli ls` @@ -346,7 +347,7 @@ It is recommended to keep your root docker config files in one repository, and y - `bin/stop`: Stop all project containers. - `bin/stopall`: Stop all docker running 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` +- `bin/xdebug`: Disable or enable Xdebug. Accepts argument `disable`, `enable`, or `status`. Ex. `bin/xdebug enable` ## Misc Info diff --git a/compose/Makefile b/compose/Makefile index 780169dca..af3cfa3bc 100644 --- a/compose/Makefile +++ b/compose/Makefile @@ -21,6 +21,7 @@ help: @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,blackfire,'Disable or enable Blackfire. Accepts argument `disable`, `enable`, or `status`.')" @echo "$(call format,cache-clean,'Access the cache-clean CLI.')" @echo "$(call format,check-dependencies,'Provides helpful recommendations for dependencies.')" @echo "$(call format,cli,'Run any CLI command without going into the bash prompt.')" @@ -81,7 +82,7 @@ help: @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.')" + @echo "$(call format,xdebug,'Disable or enable Xdebug. Accepts argument `disable`, `enable`, or `status`.')" analyse: diff --git a/compose/bin/blackfire b/compose/bin/blackfire new file mode 100755 index 000000000..a100f43ef --- /dev/null +++ b/compose/bin/blackfire @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +S=$(bin/clinotty cat /usr/local/etc/php/conf.d/blackfire.ini | grep -iGc '\;extension=blackfire.so'); + +blackfire_status() { + if [[ $S == 1 ]]; then + echo "Blackfire is disabled." + else + echo "Blackfire is enabled." + fi +} + +blackfire_toggle() { + if [[ $S == 1 ]]; then + blackfire_enable + else + blackfire_disable + fi +} + +blackfire_enable() { + if [[ $S == 1 ]]; then + bin/root sed -i -e 's/^;extension=blackfire.so/extension=blackfire.so/g' /usr/local/etc/php/conf.d/blackfire.ini + sleep 1 + bin/restart phpfpm + echo "Blackfire has been enabled." + else + echo "Blackfire is already enabled." + fi +} + +blackfire_disable() { + if [[ $S == 0 ]]; then + bin/root sed -i -e 's/^extension=blackfire.so/;extension=blackfire.so/g' /usr/local/etc/php/conf.d/blackfire.ini + sleep 1 + bin/restart phpfpm + echo "Blackfire has been disabled." + else + echo "Blackfire is already disabled." + fi +} + +firstArgLetter="$(echo "$1" | head -c 1)" + +if [[ $firstArgLetter == "d" ]]; then + blackfire_disable +elif [[ $firstArgLetter == "e" ]]; then + blackfire_enable +elif [[ $firstArgLetter == "t" ]]; then + blackfire_toggle +elif [[ $firstArgLetter == "s" ]]; then + blackfire_status +else + printf "Please specify either 'disable', 'enable', 'status' or 'toggle' as an argument.\nEx: bin/blackfire status\n" +fi From 0aa0fe3b7224302d07975a1aa97c39c79877ec74 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 13 Apr 2024 11:54:13 -0400 Subject: [PATCH 093/115] Disable Blackfire in PHP 8.3 image by default #1085 --- images/php/8.3/conf/blackfire.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/php/8.3/conf/blackfire.ini b/images/php/8.3/conf/blackfire.ini index 86b377f66..2b9b0a679 100644 --- a/images/php/8.3/conf/blackfire.ini +++ b/images/php/8.3/conf/blackfire.ini @@ -1,2 +1,2 @@ -extension=blackfire.so +;extension=blackfire.so blackfire.agent_socket=tcp://blackfire:8307 From 92b5522bd40310aa4ba519767e80365b9eebba12 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 13 Apr 2024 11:56:48 -0400 Subject: [PATCH 094/115] Tagging new versions of PHP Docker images to fix #1085 --- .github/workflows/build-php-8-1.yml | 2 +- .github/workflows/build-php-8-2.yml | 2 +- .github/workflows/build-php-8-3.yml | 2 +- README.md | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-php-8-1.yml b/.github/workflows/build-php-8-1.yml index 11b46335c..92c78e543 100644 --- a/.github/workflows/build-php-8-1.yml +++ b/.github/workflows/build-php-8-1.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.1-fpm - markoshust/magento-php:8.1-fpm-4 + markoshust/magento-php:8.1-fpm-5 diff --git a/.github/workflows/build-php-8-2.yml b/.github/workflows/build-php-8-2.yml index 10d195082..8329648b1 100644 --- a/.github/workflows/build-php-8-2.yml +++ b/.github/workflows/build-php-8-2.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.2-fpm - markoshust/magento-php:8.2-fpm-3 + markoshust/magento-php:8.2-fpm-4 diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml index fc457fdfa..e9c7df909 100644 --- a/.github/workflows/build-php-8-3.yml +++ b/.github/workflows/build-php-8-3.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.3-fpm - markoshust/magento-php:8.3-fpm-0 + markoshust/magento-php:8.3-fpm-1 diff --git a/README.md b/README.md index 85ae84e63..e671e4eda 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,9 @@ View Dockerfiles for the latest tags: - [`1.22`, `1.22-0`](images/nginx/1.22) - [`1.24`, `1.24-0`](images/nginx/1.24) - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/) - - [`8.1-fpm`, `8.1-fpm-4`](images/php/8.1) - - [`8.2-fpm`, `8.2-fpm-3`](images/php/8.2) - - [`8.3-fpm`, `8.3-fpm-0`](images/php/8.3) + - [`8.1-fpm`, `8.1-fpm-5`](images/php/8.1) + - [`8.2-fpm`, `8.2-fpm-4`](images/php/8.2) + - [`8.3-fpm`, `8.3-fpm-1`](images/php/8.3) - [markoshust/magento-opensearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-opensearch/) - [`1.2`, `1.2-0`](images/opensearch/1.2) - [`2.5`, `2.5-1`](images/opensearch/2.5) From d019251b596b9d9f022ead5dd7b7806481ae579a Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Sat, 13 Apr 2024 13:56:46 -0400 Subject: [PATCH 095/115] Released 46.1.0. --- CHANGELOG.md | 12 ++++++++++++ README.md | 7 +++++++ compose/compose.yaml | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd5b4090f..38a4df4f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [46.1.0] - 2024-04-13 + +### Added +- New `bin/blackfire` script to enable, disable, or check status of Blackfire extension [PR #1115](https://github.com/markshust/docker-magento/pull/1115). +- Swool PHP extension to all PHP Docker images to support Adobe Commerce GraphQL Application Layer [PR #1114](https://github.com/markshust/docker-magento/pull/1114). + +### Updated +- Supported versions in the `bin/check-dependencies` script [PR #1112](https://github.com/markshust/docker-magento/pull/1112). + +### Fixed +- Random 502 Bad Gateway errors when Xdebug is enabled [PR #1085](https://github.com/markshust/docker-magento/pull/1085), [PR #1116](https://github.com/markshust/docker-magento/pull/1116). + ## [46.0.0] - 2024-04-09 ### Added diff --git a/README.md b/README.md index e671e4eda..d35d16728 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ - [Updates](#updates) - [Custom CLI Commands](#custom-cli-commands) - [Misc Info](#misc-info) +- [Known Issues](#known-issues) - [Credits](#credits) - [License](#license) @@ -754,6 +755,12 @@ curl --cookie "SPX_REPORT=full; SPX_ENABLED=1; SPX_SAMPLING_PERIOD=5000" https:/ Additional information of how to work with SPX is available at https://www.youtube.com/watch?v=xk-JiBLsKfA +## Known Issues + +### Xdebug & Blackfire incompatibility + +There is an outstanding bug when Xdebug runs alongside Blackfire in PHP 8.3. See https://github.com/markshust/docker-magento/issues/1118 for more info. + ## Credits ### M.academy diff --git a/compose/compose.yaml b/compose/compose.yaml index 27d78717a..13ac3408a 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 46.0.0 +## Version 46.1.0 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux @@ -32,7 +32,7 @@ services: #- "host.docker.internal:host-gateway" phpfpm: - image: markoshust/magento-php:8.3-fpm-0 + image: markoshust/magento-php:8.3-fpm-1 volumes: *appvolumes env_file: env/phpfpm.env #extra_hosts: *appextrahosts From 86aef07846bed9b7f753a412ae91668303653946 Mon Sep 17 00:00:00 2001 From: Luke Collymore Date: Mon, 15 Apr 2024 14:01:55 +0100 Subject: [PATCH 096/115] Update compose.yaml Corrected comment typo --- compose/compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/compose.yaml b/compose/compose.yaml index 13ac3408a..ae430de1c 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -49,7 +49,7 @@ services: volumes: - dbdata:/var/lib/mysql - ## If you wish to use MySQL, comment out opensearch image above and + ## If you wish to use MySQL, comment out the mariadb db image above and ## uncomment this block. #db: # image: mysql:8.0 From 92e8c752a5c5ab76d6ee2489b7c4c213f6fff984 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 16 Apr 2024 14:45:45 -0400 Subject: [PATCH 097/115] Xdebug 3.3.1 and Blackfire PHP extension incompatibility #1118 --- .github/workflows/build-php-8-3.yml | 2 +- CHANGELOG.md | 5 +++++ README.md | 15 +++++++-------- compose/compose.yaml | 2 +- images/php/8.3/Dockerfile | 2 +- images/php/8.3/conf/blackfire.ini | 2 +- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-php-8-3.yml b/.github/workflows/build-php-8-3.yml index e9c7df909..c50d2b433 100644 --- a/.github/workflows/build-php-8-3.yml +++ b/.github/workflows/build-php-8-3.yml @@ -31,4 +31,4 @@ jobs: push: true tags: | markoshust/magento-php:8.3-fpm - markoshust/magento-php:8.3-fpm-1 + markoshust/magento-php:8.3-fpm-2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 38a4df4f4..725724c49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [46.1.1] - 2024-04-16 + +### Fixed +- Xdebug 3.3.1 and Blackfire PHP extension incompatibility [PR #1121](https://github.com/markshust/docker-magento/pull/1120). + ## [46.1.0] - 2024-04-13 ### Added diff --git a/README.md b/README.md index d35d16728..ab3341706 100644 --- a/README.md +++ b/README.md @@ -757,9 +757,7 @@ Additional information of how to work with SPX is available at https://www.youtu ## Known Issues -### Xdebug & Blackfire incompatibility - -There is an outstanding bug when Xdebug runs alongside Blackfire in PHP 8.3. See https://github.com/markshust/docker-magento/issues/1118 for more info. +There are currently no large known issues or workarounds needed to use docker-magento with your Magento project. If you find any, please [report them](https://github.com/markshust/docker-magento/issues)! ## Credits @@ -771,13 +769,14 @@ This course is sponsored by M.academ ### Mark Shust -My name is Mark Shust and I'm the creator of this repo. I'm a Zend Certified Engineer and Adobe Certified Magento Developer, and have been involved since the early days of Magento (0.8!). I'm no longer available for consulting, but am creating course content full-time at M.academy. +My name is Mark Shust and I'm the creator of this repo. I'm a 6X Adobe Commerce Certified Developer and have been involved with Magento since the early days (v0.8!). I create technical education courses full-time for my company, M.academy. -- 🔗 Connect with me on LinkedIn +- 🖥️ See my Magento lessons & courses +- 📖 Read my technical articles - 🎥 Watch my YouTube videos -- 🐦 Follow me on Twitter -- 📖 Read my blog -- 💌 Contact me +- 🔗 Connect on LinkedIn +- 🐦 Follow me on X +- 💌 Contact me ## License diff --git a/compose/compose.yaml b/compose/compose.yaml index 13ac3408a..948fa7aa0 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 46.1.0 +## Version 46.1.1 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux diff --git a/images/php/8.3/Dockerfile b/images/php/8.3/Dockerfile index ca0eee43f..87cc35711 100644 --- a/images/php/8.3/Dockerfile +++ b/images/php/8.3/Dockerfile @@ -44,7 +44,7 @@ RUN pecl channel-update pecl.php.net && pecl install \ redis-6.0.2 \ ssh2-1.3.1 \ swoole-5.1.1 \ - xdebug-3.3.1 \ + xdebug-3.3.2 \ && pecl clear-cache \ && rm -rf /tmp/pear diff --git a/images/php/8.3/conf/blackfire.ini b/images/php/8.3/conf/blackfire.ini index 2b9b0a679..86b377f66 100644 --- a/images/php/8.3/conf/blackfire.ini +++ b/images/php/8.3/conf/blackfire.ini @@ -1,2 +1,2 @@ -;extension=blackfire.so +extension=blackfire.so blackfire.agent_socket=tcp://blackfire:8307 From 05b5a0bf66b0490fecbe9ca4830695c9b117ee74 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 16 Apr 2024 14:46:58 -0400 Subject: [PATCH 098/115] Bump PHP 8.3 image version in README #1118 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab3341706..eed46f803 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ View Dockerfiles for the latest tags: - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/) - [`8.1-fpm`, `8.1-fpm-5`](images/php/8.1) - [`8.2-fpm`, `8.2-fpm-4`](images/php/8.2) - - [`8.3-fpm`, `8.3-fpm-1`](images/php/8.3) + - [`8.3-fpm`, `8.3-fpm-2`](images/php/8.3) - [markoshust/magento-opensearch (Docker Hub)](https://hub.docker.com/r/markoshust/magento-opensearch/) - [`1.2`, `1.2-0`](images/opensearch/1.2) - [`2.5`, `2.5-1`](images/opensearch/2.5) From b342ce3397985ddf6c07ca8cb6b952f28ce833d2 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 16 Apr 2024 14:47:47 -0400 Subject: [PATCH 099/115] Fix PR version in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 725724c49..d0ab25bdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [46.1.1] - 2024-04-16 ### Fixed -- Xdebug 3.3.1 and Blackfire PHP extension incompatibility [PR #1121](https://github.com/markshust/docker-magento/pull/1120). +- Xdebug 3.3.1 and Blackfire PHP extension incompatibility [PR #1122](https://github.com/markshust/docker-magento/pull/1122). ## [46.1.0] - 2024-04-13 From f4ae04bcbd505c40b4d141a48adb580c0ae0b6cc Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 16 Apr 2024 14:48:22 -0400 Subject: [PATCH 100/115] Back out compose.yaml file update until PHP image is built #1122 --- compose/compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/compose.yaml b/compose/compose.yaml index 948fa7aa0..13ac3408a 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 46.1.1 +## Version 46.1.0 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux From 507c1c7f1e1b12569ef7da682bfb8c2315991dfe Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 16 Apr 2024 14:49:15 -0400 Subject: [PATCH 101/115] Back out CHANGELOG updates until PHP 8.3 image is built #1118 --- CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ab25bdd..38a4df4f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [46.1.1] - 2024-04-16 - -### Fixed -- Xdebug 3.3.1 and Blackfire PHP extension incompatibility [PR #1122](https://github.com/markshust/docker-magento/pull/1122). - ## [46.1.0] - 2024-04-13 ### Added From 2d3b2f80ccb87ca99ff0ae3182a8ade1ce8a2890 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Tue, 16 Apr 2024 14:52:11 -0400 Subject: [PATCH 102/115] Release version 46.1.1 --- CHANGELOG.md | 5 +++++ compose/compose.yaml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38a4df4f4..d0ab25bdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [46.1.1] - 2024-04-16 + +### Fixed +- Xdebug 3.3.1 and Blackfire PHP extension incompatibility [PR #1122](https://github.com/markshust/docker-magento/pull/1122). + ## [46.1.0] - 2024-04-13 ### Added diff --git a/compose/compose.yaml b/compose/compose.yaml index ae430de1c..2059562e9 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 46.1.0 +## Version 46.1.1 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux @@ -32,7 +32,7 @@ services: #- "host.docker.internal:host-gateway" phpfpm: - image: markoshust/magento-php:8.3-fpm-1 + image: markoshust/magento-php:8.3-fpm-2 volumes: *appvolumes env_file: env/phpfpm.env #extra_hosts: *appextrahosts From 5d9292392eb34f9017b0879824ffe5a6478301b9 Mon Sep 17 00:00:00 2001 From: Michael Lehmkuhl Date: Wed, 17 Apr 2024 11:44:52 -0500 Subject: [PATCH 103/115] Removes obsolete `version` directive from docker compose files (#1125) --- compose/compose.dev-linux.yaml | 2 -- compose/compose.dev-ssh.yaml | 2 -- compose/compose.dev.yaml | 2 -- compose/compose.healthcheck.yaml | 2 -- compose/compose.yaml | 6 ++---- 5 files changed, 2 insertions(+), 12 deletions(-) diff --git a/compose/compose.dev-linux.yaml b/compose/compose.dev-linux.yaml index 8df350fa0..fae7d78cb 100644 --- a/compose/compose.dev-linux.yaml +++ b/compose/compose.dev-linux.yaml @@ -1,5 +1,3 @@ -version: "3" - services: app: volumes: &appvolumes diff --git a/compose/compose.dev-ssh.yaml b/compose/compose.dev-ssh.yaml index 6744b8a54..c05c72234 100644 --- a/compose/compose.dev-ssh.yaml +++ b/compose/compose.dev-ssh.yaml @@ -1,5 +1,3 @@ -version: "3" - services: app: volumes: &appvolumes diff --git a/compose/compose.dev.yaml b/compose/compose.dev.yaml index 44d2d5114..641fc7b56 100644 --- a/compose/compose.dev.yaml +++ b/compose/compose.dev.yaml @@ -1,5 +1,3 @@ -version: "3" - services: app: volumes: &appvolumes diff --git a/compose/compose.healthcheck.yaml b/compose/compose.healthcheck.yaml index e18245944..b53891ca7 100644 --- a/compose/compose.healthcheck.yaml +++ b/compose/compose.healthcheck.yaml @@ -1,5 +1,3 @@ -version: "3" - services: app: healthcheck: diff --git a/compose/compose.yaml b/compose/compose.yaml index 2059562e9..834d0477d 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -10,8 +10,6 @@ ## 172.17.0.1 in this file with the result of: ## docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}' -version: "3" - services: app: image: markoshust/magento-nginx:1.24-0 @@ -116,14 +114,14 @@ services: image: sj26/mailcatcher ports: - "1080:1080" - + ## Cloudflare tunnel support, uncomment to enable #tunnel: # container_name: cloudflared-tunnel # image: cloudflare/cloudflared:latest # command: tunnel run # env_file: env/cloudflare.env - + ## Blackfire support, uncomment to enable #blackfire: # image: blackfire/blackfire:2 From 865f7e0f11547c14985f3f291f66853da97f597f Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Thu, 18 Apr 2024 00:01:27 +0300 Subject: [PATCH 104/115] Update predefined version from 2.4.6-p4 to 2.4.7 (#1128) --- lib/onelinesetup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/onelinesetup b/lib/onelinesetup index d802f4593..62b5fbdaa 100755 --- a/lib/onelinesetup +++ b/lib/onelinesetup @@ -2,7 +2,7 @@ set -o errexit DOMAIN=${1:-magento.test} -VERSION=${2:-2.4.6-p4} +VERSION=${2:-2.4.7} EDITION=${3:-community} curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash From 4dd2e62b8370ebddb7f184ca6a531da7e292aab6 Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Thu, 18 Apr 2024 00:01:27 +0300 Subject: [PATCH 105/115] Update predefined version from 2.4.6-p4 to 2.4.7 (#1128) --- lib/onelinesetup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/onelinesetup b/lib/onelinesetup index d802f4593..62b5fbdaa 100755 --- a/lib/onelinesetup +++ b/lib/onelinesetup @@ -2,7 +2,7 @@ set -o errexit DOMAIN=${1:-magento.test} -VERSION=${2:-2.4.6-p4} +VERSION=${2:-2.4.7} EDITION=${3:-community} curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash From ed401d39a48583c37ca389824a0fb6c359e17078 Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Thu, 18 Apr 2024 00:06:30 +0300 Subject: [PATCH 106/115] Adds a check to ensure that the directory does not already exist in the project directory (#1127) Co-authored-by: Mark Shust --- compose/bin/download | 5 +++++ lib/template | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/compose/bin/download b/compose/bin/download index 452fcba85..9ae09b959 100755 --- a/compose/bin/download +++ b/compose/bin/download @@ -10,6 +10,11 @@ NC='\033[0m' # No Color bin/stop +if [ -d "./bin" ]; then + echo "Error: The current directory is not empty. Please remove all contents within this directory and try again." + exit 1 +fi + bin/start --no-dev [ $? != 0 ] && echo "Failed to start Docker services" && exit diff --git a/lib/template b/lib/template index 3ef44a660..8f3a4833e 100755 --- a/lib/template +++ b/lib/template @@ -3,6 +3,12 @@ git init -qqq git remote add origin https://github.com/markshust/docker-magento git fetch origin -qqq git checkout origin/master -- compose + +if [ -d "./bin" ]; then + echo "Error: The current directory is not empty. Please remove all contents within this directory and try again." + exit 1 +fi + mv compose/* ./ mv compose/.gitignore ./ mv compose/.vscode ./ From eb69d509221b8938071c069433f91528be46eeef Mon Sep 17 00:00:00 2001 From: Tu Van Date: Fri, 19 Apr 2024 03:20:09 +0700 Subject: [PATCH 107/115] Update Integration testing configuration to use OpenSearch (#1131) --- .../tests/integration/etc/install-config-mysql.php.2.4.dist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compose/template/dev/tests/integration/etc/install-config-mysql.php.2.4.dist b/compose/template/dev/tests/integration/etc/install-config-mysql.php.2.4.dist index 68acd8359..29ae77348 100644 --- a/compose/template/dev/tests/integration/etc/install-config-mysql.php.2.4.dist +++ b/compose/template/dev/tests/integration/etc/install-config-mysql.php.2.4.dist @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + return [ 'db-host' => 'db', 'db-user' => 'magento', @@ -10,8 +11,8 @@ return [ 'db-name' => 'magento_integration_tests', 'db-prefix' => '', 'backend-frontname' => 'backend', - 'search-engine' => 'elasticsearch7', - 'elasticsearch-host' => 'elasticsearch', + 'search-engine' => 'opensearch', + 'opensearch-host' => 'opensearch', 'admin-user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME, 'admin-password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD, 'admin-email' => \Magento\TestFramework\Bootstrap::ADMIN_EMAIL, @@ -21,4 +22,5 @@ return [ 'amqp-port' => '5672', 'amqp-user' => 'magento', 'amqp-password' => 'magento', + 'consumers-wait-for-messages' => '0', ]; From 016e1429d18ac8bc8bbd61d3034e48886594b556 Mon Sep 17 00:00:00 2001 From: Cid Lopes Date: Wed, 24 Apr 2024 19:29:42 +0300 Subject: [PATCH 108/115] Fix SSL cert generation when domain has a port included (#1136) --- compose/bin/setup-ssl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compose/bin/setup-ssl b/compose/bin/setup-ssl index 405552735..9d8f29e3c 100755 --- a/compose/bin/setup-ssl +++ b/compose/bin/setup-ssl @@ -7,7 +7,8 @@ if ! bin/docker-compose exec -T -u root app cat /root/.local/share/mkcert/rootCA fi # Generate the certificate for the specified domain -bin/docker-compose exec -T -u root app mkcert -key-file nginx.key -cert-file nginx.crt "$@" +DOMAIN_WITHOUT_PORT=$(echo "$@" | cut -d ':' -f1) +bin/docker-compose exec -T -u root app mkcert -key-file nginx.key -cert-file nginx.crt "$DOMAIN_WITHOUT_PORT" echo "Moving key and cert to /etc/nginx/certs/..." bin/docker-compose exec -T -u root app chown app:app nginx.key nginx.crt bin/docker-compose exec -T -u root app mv nginx.key nginx.crt /etc/nginx/certs/ From aa7297c64899757d6944a90ed743e02d1fbb3c92 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 25 Apr 2024 12:09:24 -0400 Subject: [PATCH 109/115] =?UTF-8?q?OpenSearch=20container=20fails=20to=20s?= =?UTF-8?q?tart=20due=20to=20memory=20heap=20size=20configura=E2=80=A6=20(?= =?UTF-8?q?#1137)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compose/compose.yaml | 12 ++++++++---- compose/env/elasticsearch.env | 3 --- compose/env/opensearch.env | 4 ---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/compose/compose.yaml b/compose/compose.yaml index 834d0477d..dd7e37883 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -78,8 +78,10 @@ services: ## More info at https://github.com/markshust/docker-magento/issues/488 - "cluster.routing.allocation.disk.threshold_enabled=false" - "index.blocks.read_only_allow_delete" - ## Uncomment the following line to increase the virtual memory map count - # - "max_map_count=262144" + ## Uncomment to set custom heap size to avoid memory errors + #- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g" + ## Uncomment to increase the virtual memory map count + #- "max_map_count=262144" ## If you wish to use Elasticsearch, comment out opensearch image above and ## uncomment this block. Do the same in the composer.healthcheck.yaml file. @@ -98,8 +100,10 @@ services: # ## More info at https://github.com/markshust/docker-magento/issues/488 # - "cluster.routing.allocation.disk.threshold_enabled=false" # - "index.blocks.read_only_allow_delete" - # ## Uncomment the following line to increase the virtual memory map count - # - "max_map_count=262144" + # ## Uncomment to set custom heap size to avoid memory errors + # #- "ES_JAVA_OPTS=-Xms1g -Xmx1g" + # ## Uncomment to increase the virtual memory map count + # #- "max_map_count=262144" rabbitmq: image: markoshust/magento-rabbitmq:3.12-0 diff --git a/compose/env/elasticsearch.env b/compose/env/elasticsearch.env index acc1712ee..5856225ce 100644 --- a/compose/env/elasticsearch.env +++ b/compose/env/elasticsearch.env @@ -1,5 +1,2 @@ ES_HOST=elasticsearch ES_PORT=9200 - -## Set custom heap size to avoid memory errors -ES_JAVA_OPTS="-Xms1g -Xmx1g" diff --git a/compose/env/opensearch.env b/compose/env/opensearch.env index 9ae75b55b..2a5680329 100644 --- a/compose/env/opensearch.env +++ b/compose/env/opensearch.env @@ -1,9 +1,5 @@ OPENSEARCH_HOST=opensearch OPENSEARCH_PORT=9200 -OPENSEARCH_HEALTHCHECK_TIMEOUT=100 - -## Set custom heap size to avoid memory errors -OPENSEARCH_JAVA_OPTS="-Xms1g -Xmx1g" # Prevent security patch conflicts with core M2 code DISABLE_SECURITY_PLUGIN=true From 2180a35eadeb403017a693d9f6563bdb2ac598da Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 25 Apr 2024 12:17:43 -0400 Subject: [PATCH 110/115] Update CHANGELOG and version to 47.0.0 --- CHANGELOG.md | 14 ++++++++++++++ compose/compose.yaml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ab25bdd..659c9eae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [47.0.0] - 2024-04-25 + +### Added +- Check to ensure directory does not already exist in project directory [PR #1127](https://github.com/markshust/docker-magento/pull/1127). + +### Updated +- Remove obsolete version directive from docker compose files [PR #1125](https://github.com/markshust/docker-magento/pull/1125). +- Predefined version from 2.4.6-p4 to 2.4.7 [PR #1128](https://github.com/markshust/docker-magento/pull/1128). +- Integration testing configuration to use OpenSearch [PR #1131](https://github.com/markshust/docker-magento/pull/1131). + +### Fixed +- SSL cert generation when domain has a port included [PR #1136](https://github.com/markshust/docker-magento/pull/1136). +- OpenSearch container fails to start due to memory heap size configuration [PR #1137](https://github.com/markshust/docker-magento/pull/1137). + ## [46.1.1] - 2024-04-16 ### Fixed diff --git a/compose/compose.yaml b/compose/compose.yaml index dd7e37883..c0e987cb0 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 46.1.1 +## Version 47.0.0 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux From 4d0801d9f76b9a1032bb5dccfc099ad723f552f3 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 25 Apr 2024 12:19:12 -0400 Subject: [PATCH 111/115] Release 47.0.0 (#1138) (#1139) Co-authored-by: Michael Lehmkuhl Co-authored-by: Jenyamba Co-authored-by: Tu Van Co-authored-by: Cid Lopes From b6b46f56c5048e8435179d01136167c6b4f6d6bb Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 25 Apr 2024 12:35:35 -0400 Subject: [PATCH 112/115] Fix "The current directory is not empty" message appearing on new install (#1140) Co-authored-by: Michael Lehmkuhl Co-authored-by: Jenyamba Co-authored-by: Tu Van Co-authored-by: Cid Lopes --- CHANGELOG.md | 5 +++++ compose/bin/download | 4 ++-- compose/compose.yaml | 2 +- lib/onelinesetup | 5 +++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 659c9eae2..b0e177dc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [47.0.1] - 2024-04-25 + +### Fixed +- "The current directory is not empty" message appearing on new install [PR #1141](https://github.com/markshust/docker-magento/pull/1141). + ## [47.0.0] - 2024-04-25 ### Added diff --git a/compose/bin/download b/compose/bin/download index 9ae09b959..a540eee90 100755 --- a/compose/bin/download +++ b/compose/bin/download @@ -10,8 +10,8 @@ NC='\033[0m' # No Color bin/stop -if [ -d "./bin" ]; then - echo "Error: The current directory is not empty. Please remove all contents within this directory and try again." +if [ -d "./src" ]; then + echo "Error: The \"src\" directory is not empty. Please remove all contents within this directory and try again." exit 1 fi diff --git a/compose/compose.yaml b/compose/compose.yaml index c0e987cb0..82bcf4e54 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,7 +1,7 @@ ## Mark Shust's Docker Configuration for Magento ## (https://github.com/markshust/docker-magento) ## -## Version 47.0.0 +## Version 47.0.1 ## To use SSH, see https://github.com/markshust/docker-magento#ssh ## Linux users, see https://github.com/markshust/docker-magento#linux diff --git a/lib/onelinesetup b/lib/onelinesetup index 62b5fbdaa..b1234baf7 100755 --- a/lib/onelinesetup +++ b/lib/onelinesetup @@ -5,6 +5,11 @@ DOMAIN=${1:-magento.test} VERSION=${2:-2.4.7} EDITION=${3:-community} +if [ -d "./bin" ]; then + echo "Error: The current directory is not empty. Please remove all contents within this directory and try again." + exit 1 +fi + curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash # &&'s are used below otherwise onelinesetup script fails/errors after bin/download From 3f5c1b820ebf0fff0ef1d3780cade7aa94363ef1 Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Fri, 26 Apr 2024 17:16:19 +0300 Subject: [PATCH 113/115] Fix code duplication (#1141) Co-authored-by: Mark Shust Co-authored-by: Michael Lehmkuhl Co-authored-by: Tu Van Co-authored-by: Cid Lopes --- lib/onelinesetup | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/onelinesetup b/lib/onelinesetup index b1234baf7..62b5fbdaa 100755 --- a/lib/onelinesetup +++ b/lib/onelinesetup @@ -5,11 +5,6 @@ DOMAIN=${1:-magento.test} VERSION=${2:-2.4.7} EDITION=${3:-community} -if [ -d "./bin" ]; then - echo "Error: The current directory is not empty. Please remove all contents within this directory and try again." - exit 1 -fi - curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/template | bash # &&'s are used below otherwise onelinesetup script fails/errors after bin/download From 5891bf53fd5aeb455e9c86fc46735305c088b823 Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Sat, 27 Apr 2024 19:46:03 +0300 Subject: [PATCH 114/115] Moved check for empty directory to top of scripts (#1143) Co-authored-by: Mark Shust Co-authored-by: Michael Lehmkuhl Co-authored-by: Tu Van Co-authored-by: Cid Lopes --- compose/bin/download | 4 ++-- lib/template | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/compose/bin/download b/compose/bin/download index a540eee90..9ee6528cb 100755 --- a/compose/bin/download +++ b/compose/bin/download @@ -8,13 +8,13 @@ YELLOW='\033[0;33m' BLUE='\033[0;34m' NC='\033[0m' # No Color -bin/stop - if [ -d "./src" ]; then echo "Error: The \"src\" directory is not empty. Please remove all contents within this directory and try again." exit 1 fi +bin/stop + bin/start --no-dev [ $? != 0 ] && echo "Failed to start Docker services" && exit diff --git a/lib/template b/lib/template index 8f3a4833e..ea47a4ba9 100755 --- a/lib/template +++ b/lib/template @@ -1,14 +1,15 @@ #!/usr/bin/env bash -git init -qqq -git remote add origin https://github.com/markshust/docker-magento -git fetch origin -qqq -git checkout origin/master -- compose if [ -d "./bin" ]; then echo "Error: The current directory is not empty. Please remove all contents within this directory and try again." exit 1 fi +git init -qqq +git remote add origin https://github.com/markshust/docker-magento +git fetch origin -qqq +git checkout origin/master -- compose + mv compose/* ./ mv compose/.gitignore ./ mv compose/.vscode ./ From 6e0f08efa56b77855ffb5e1d7f5ce048d4257797 Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Tue, 30 Apr 2024 18:17:41 +0300 Subject: [PATCH 115/115] Updated links in the README (#1145) Co-authored-by: Mark Shust Co-authored-by: Michael Lehmkuhl Co-authored-by: Tu Van Co-authored-by: Cid Lopes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eed46f803..b46c9ea05 100644 --- a/README.md +++ b/README.md @@ -254,8 +254,8 @@ open https://magento.test ### Elasticsearch vs OpenSearch OpenSearch is set as the default search engine when setting up this project. Follow the instructions below if you want to use Elasticsearch instead: -1. Comment out or remove the `opensearch` container in both the [`compose.yaml`](https://github.com/markshust/docker-magento/blob/master/compose/compose.yaml#L55-L66) and [`compose.healthcheck.yaml`](https://github.com/markshust/docker-magento/blob/master/compose/compose.healthcheck.yaml#L38-L43) files -2. Uncomment the `elasticsearch` container in both the [`compose.yaml`](https://github.com/markshust/docker-magento/blob/master/compose/compose.yaml#L70-L81) and [`compose.healthcheck.yaml`](https://github.com/markshust/docker-magento/blob/master/compose/compose.healthcheck.yaml#L45-L50) files +1. Comment out or remove the `opensearch` container in both the [`compose.yaml`](https://github.com/markshust/docker-magento/blob/master/compose/compose.yaml#L69-L84) and [`compose.healthcheck.yaml`](https://github.com/markshust/docker-magento/blob/master/compose/compose.healthcheck.yaml#L36-L41) files +2. Uncomment the `elasticsearch` container in both the [`compose.yaml`](https://github.com/markshust/docker-magento/blob/master/compose/compose.yaml#L86-L106) and [`compose.healthcheck.yaml`](https://github.com/markshust/docker-magento/blob/master/compose/compose.healthcheck.yaml#L43-L48) files 3. Update the `bin/setup-install` command to use the Elasticsearch ratther than OpenSearch. Change: ```