From 3f5c1b820ebf0fff0ef1d3780cade7aa94363ef1 Mon Sep 17 00:00:00 2001 From: Jenyamba Date: Fri, 26 Apr 2024 17:16:19 +0300 Subject: [PATCH 1/3] 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 2/3] 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 3/3] 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: ```