Skip to content

Commit 73af199

Browse files
author
Benjamin Calef
authored
Merge pull request #109 from zepgram/release/v1.7.0
[v1.7.0] adding support to install magento 2.4.6
2 parents 59c8d8e + ac8e43b commit 73af199

8 files changed

+142
-54
lines changed

README.md

+44-33
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Supported release:<br>
1818
[![v2.3.*](https://img.shields.io/badge/v2.3-grey.svg?longCache=true&style=flat-square&logo=magento&color=858256)](https://github.com/magento/magento2/tree/2.3)
1919
[![v2.4.*](https://img.shields.io/badge/v2.4-grey.svg?longCache=true&style=flat-square&logo=magento&color=36853c)](https://github.com/magento/magento2/tree/2.4)
2020

21-
![technical-stack](https://user-images.githubusercontent.com/16258478/182571024-28eed354-5747-482d-a078-a6fb15b4a35d.jpg)<br>
21+
![technical-stack](https://user-images.githubusercontent.com/16258478/226653131-4f8a5b30-318d-46c8-af3e-d5dac6c90c12.jpg)<br>
2222

2323
[![associate-developer](https://user-images.githubusercontent.com/16258478/182574034-662e3aeb-318a-496d-9b65-9a927e8782e0.png)](https://www.youracclaim.com/badges/406cc91a-0fda-4a6f-846b-19d7f8b59e0a/public_url)
2424

@@ -73,33 +73,35 @@ If your ssh key has been created with a passphrase, please create another one.
7373
1. Finally, run: ``vagrant ssh`` to access guest machine
7474

7575
### Yaml config overview
76-
Parent Node | Name | Default Value | Allowed Value | Is optional | Description
77-
| --- | --- | --- | --- | --- |---
78-
| vmconf | machine_name | Vagrant Magento 2 | string | no | Vagrant machine name
79-
| | network_ip | 192.168.60.0 | IP address | no | Accessible IP address /etc/hosts
80-
| | host_name | zepgram | string | no | Virtual host name
81-
| | memory | 4096 | number | no | RAM allocated
82-
| | cpus | 1 | number | no | CPU allocated
83-
| | mount | nfs | nfs / rsync / default | no | Mount strategy
84-
| | path | root | app / root | no | Mount whole directory or `app/` only
85-
| | provision | all | all / system / magento | no | Define script provision
86-
| composer | username | magentoUsernameKey | string | no | <a href="https://marketplace.magento.com/customer/accessKeys/" target="_blank">Composer auth user</a>
87-
| | password | magentoPasswordKey | string | no | <a href="https://marketplace.magento.com/customer/accessKeys/" target="_blank">Composer auth password</a>
88-
| git | name | John Doe | string | yes | Git user name
89-
| | email | [email protected] | email | yes | Git user email
90-
| | host | github.com | url | yes | Git host server name
91-
| | repository | ssh://[email protected]:%.git | git repository | yes | Define repository to clone
92-
| magento | url | dev.magento.com | url | no | Magento site host name
93-
| | source | composer | composer / (master/develop..) | no | Define source installation. On git install set the branch name to clone.
94-
| | edition | community | community / enterprise | no | Magento project edition
95-
| | version | 2.4.5 | >=2.2 | no | Magento version release
96-
| | php_version | default | default / 7.x | no | PHP version
97-
| | sample | true | true / false | no | Install sample data
98-
| | mode | developer | developer / production | no | Magento execution mode
99-
| | currency | USD | <a href="https://en.wikipedia.org/wiki/ISO_4217#Active_codes" target="_blank">ISO 4217</a> | no | Default currency
100-
| | language | en_US | <a href="https://www.iso.org/iso-639-language-codes.html" target="_blank">ISO 639-1</a> + <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank">ISO 3166</a> | no | Default language
101-
| | time_zone | America/New_York | <a href="https://www.php.net/manual/en/timezones.php" target="_blank">timezone</a> | no | Default timezone
102-
| | crypt_key | - | string | yes | Crypt key form app/etc/env.php for db-dump.sql.gz (db import)
76+
Parent Node | Name | Default Value | Allowed Value | Is optional | Description
77+
| --- |---------------| -- | --- | --- |---
78+
| vmconf | machine_name | Vagrant Magento 2 | string | no | Vagrant machine name
79+
| | network_ip | 192.168.60.0 | IP address | no | Accessible IP address /etc/hosts
80+
| | host_name | zepgram | string | no | Virtual host name
81+
| | memory | 4096 | number | no | RAM allocated
82+
| | cpus | 1 | number | no | CPU allocated
83+
| | mount | nfs | nfs / rsync / default | no | Mount strategy
84+
| | path | root | app / root | no | Mount whole directory or `app/` only
85+
| | provision | all | all / system / magento | no | Define script provision
86+
| composer | username | magentoUsernameKey | string | no | <a href="https://marketplace.magento.com/customer/accessKeys/" target="_blank">Composer auth user</a>
87+
| | password | magentoPasswordKey | string | no | <a href="https://marketplace.magento.com/customer/accessKeys/" target="_blank">Composer auth password</a>
88+
| git | name | John Doe | string | yes | Git user name
89+
| | email | [email protected] | email | yes | Git user email
90+
| | host | github.com | url | yes | Git host server name
91+
| | repository | ssh://[email protected]:%.git | git repository | yes | Define repository to clone
92+
| magento | url | dev.magento.com | url | no | Magento site host name
93+
| | source | composer | composer / (master/develop..) | no | Define source installation. On git install set the branch name to clone.
94+
| | edition | community | community / enterprise | no | Magento project edition
95+
| | version | 2.4.5 | >=2.2 | no | Magento version release
96+
| | php_version | default | default / 7.x / 8.x | no | PHP version
97+
| | sample | true | true / false | no | Install sample data
98+
| | mode | developer | developer / production | no | Magento execution mode
99+
| | currency | USD | <a href="https://en.wikipedia.org/wiki/ISO_4217#Active_codes" target="_blank">ISO 4217</a> | no | Default currency
100+
| | language | en_US | <a href="https://www.iso.org/iso-639-language-codes.html" target="_blank">ISO 639-1</a> + <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank">ISO 3166</a> | no | Default language
101+
| | time_zone | America/New_York | <a href="https://www.php.net/manual/en/timezones.php" target="_blank">timezone</a> | no | Default timezone
102+
| | crypt_key | - | string | yes | Crypt key form app/etc/env.php for db-dump.sql.gz (db import)
103+
| | search_engine | opensearch | opensearch / elasticsearch | false | Search engine for catalog search
104+
| | disable_two_factor_auth | true | true / false | false | Disable 2 factor authentication for admin access
103105

104106
### Path
105107
* <b>root directory:</b> mount the entire project.
@@ -177,6 +179,7 @@ Disable cron:
177179
- percona
178180
- redis-server
179181
- elasticsearch
182+
- opensearch
180183
- grunt
181184
- postfix
182185
- mailhog
@@ -205,19 +208,27 @@ Disable cron:
205208
* url: [network_ip]/php
206209

207210
### Mysql
208-
Percona server 8.0 is now installed for Magento >=2.4.0
211+
Percona server 8.0 is now installed for Magento >=2.4.0<br>
212+
Lower versions are handled foreach existing Magento versions.
209213

210214
### PHP
211-
PHP 8.1 is now installed by default for Magento >=2.4.4
215+
PHP 8.2 is now installed by default for Magento >=2.4.6<br>
216+
Lower versions are handled foreach existing Magento versions.
212217

213218
### Composer
214-
Composer v2 is now installed by default for Magento >=2.4.2
219+
Composer v2 is now installed by default for Magento >=2.4.2<br>
220+
Lower versions are handled foreach existing Magento versions.
215221

216222
### Elasticsearch
217-
Version 7.6.x of Elasticsearch is now available for Magento 2.4.0.<br>
218-
For lower Magento version, ES 6.x will be installed.<br>
223+
Version 8.4.x of Elasticsearch is now available for Magento 2.4.6<br>
224+
Version 7.6.x of Elasticsearch is available for version between 2.4.0 and 2.4.5<br>
225+
Lower versions are handled foreach existing Magento versions<br>
219226
Otherwise, you can also completely disable elasticsearch by installing this module: https://github.com/zepgram/module-disable-search-engine
220227

228+
### Opensearch
229+
Version 2.5.x is now available for Magento 2.4.6<br>
230+
Elasticsearch will be installed by default on lower Magento versions.
231+
221232
## Issues
222233

223234
### Windows 10

Vagrantfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ end
3838
Vagrant.configure(2) do |config|
3939
# Virtual machine
4040
config.vm.box = 'geerlingguy/debian10'
41-
41+
4242
# Host manager configuration
4343
config.vm.define vmconf['host_name']
4444
config.vm.hostname = vmconf['host_name']
4545
config.vm.network "private_network", ip: vmconf['network_ip']
46-
46+
4747
# VBox config
4848
config.vm.provider 'virtualbox' do |v|
4949
v.name = vmconf['machine_name']
@@ -88,7 +88,7 @@ Vagrant.configure(2) do |config|
8888
end
8989
# Rsync mount
9090
if vmconf['mount'] == 'rsync'
91-
config.vm.synced_folder hostDirectory, guestDirectory, create: true, type: 'rsync',
91+
config.vm.synced_folder hostDirectory, guestDirectory, create: true, type: 'rsync',
9292
rsync__args: ['--archive', '-z', '--copy-links'],
9393
rsync__exclude: rsync_exclude
9494
end
@@ -114,14 +114,15 @@ Vagrant.configure(2) do |config|
114114
if File.file?('db-dump.sql.gz')
115115
config.vm.provision 'file', source: 'db-dump.sql.gz', destination: '/home/vagrant/extra/db-dump.sql.gz', run: 'always'
116116
end
117-
117+
118118
# Environment provisioning
119119
config.vm.provision 'shell', path: 'provision/001-system-env.sh', run: 'always', keep_color: true, args: [
120120
projectName, composer['username'], composer['password'],
121121
git['name'], git['email'], git['host'], git['repository'],
122122
magento['url'], magento['php_version'], magento['source'], magento['edition'],
123123
magento['version'], magento['sample'], magento['mode'], magento['currency'],
124-
magento['language'], magento['time_zone'], magento['crypt_key'], vmconf['mount'], vmconf['path']
124+
magento['language'], magento['time_zone'], magento['crypt_key'], vmconf['mount'], vmconf['path'],
125+
magento['search_engine'], magento['disable_two_factor_auth']
125126
]
126127

127128
# Shell provisioning
@@ -146,7 +147,7 @@ Vagrant.configure(2) do |config|
146147
config.ssh.forward_agent = true
147148

148149
# Post up message
149-
config.vm.post_up_message =
150+
config.vm.post_up_message =
150151
"
151152
---------------------------------------------------------
152153
Vagrant machine ready to use for #{git['name']}

config.yaml.example

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ magento:
1919
url: 'dev.magento.com'
2020
source: 'composer'
2121
edition: 'community'
22-
version: '2.4.5'
22+
version: '2.4.6'
2323
php_version: 'default'
2424
sample: 'true'
2525
mode: 'developer'
2626
currency: 'USD'
2727
language: 'en_US'
2828
time_zone: 'America/New_York'
2929
crypt_key: ''
30+
search_engine: 'opensearch'
31+
disable_two_factor_auth: 'true'

provision/001-system-env.sh

+19-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ echo '--- Environment variables ---'
1313

1414
# Set php version
1515
PROJECT_VERSION=${12};
16-
PROJECT_PHP_VERSION='8.1';
16+
PROJECT_PHP_VERSION='8.2';
17+
if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.4.6"); then
18+
PROJECT_PHP_VERSION='8.1';
19+
fi
1720
if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.4.4"); then
1821
PROJECT_PHP_VERSION='7.4';
1922
fi
@@ -30,6 +33,18 @@ if [ "${9}" != 'default' ]; then
3033
PROJECT_PHP_VERSION="${9}"
3134
fi
3235

36+
# search engine
37+
SEARCH_ENGINE=${21}
38+
if [ "$SEARCH_ENGINE" != "opensearch" ] || $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.4.6"); then
39+
SEARCH_ENGINE='elasticsearch'
40+
fi
41+
42+
# two factor auth
43+
DISABLE_TWO_FACTOR_AUTH=${22}
44+
if [ "$DISABLE_TWO_FACTOR_AUTH" == "true" ] && $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.4.0"); then
45+
DISABLE_TWO_FACTOR_AUTH='false'
46+
fi
47+
3348
# Set environment variable
3449
cat <<EOF > /etc/profile.d/env.sh
3550
export PROJECT_NAME="${1}"
@@ -54,6 +69,8 @@ export PROJECT_TIME_ZONE="${17}"
5469
export PROJECT_CRYPT_KEY="${18}"
5570
export PROJECT_MOUNT="${19}"
5671
export PROJECT_MOUNT_PATH="${20}"
72+
export PROJECT_SEARCH_ENGINE="${SEARCH_ENGINE}"
73+
export PROJECT_DISABLE_TWO_FACTOR_AUTH="${DISABLE_TWO_FACTOR_AUTH}"
5774
EOF
5875
source /etc/profile.d/env.sh
5976

@@ -66,7 +83,7 @@ fi
6683

6784
# Patch extra files
6885
sudo -u vagrant mkdir -p /home/vagrant/extra
69-
if [[ ! $(dpkg-query -l 'dos2unix') ]]; then
86+
if [[ ! $(dpkg-query -l 'dos2unix') ]]; then
7087
sudo apt-get install -y dos2unix
7188
fi
7289
if [ -f /home/vagrant/extra/001-env.sh ]; then

provision/010-system-packages.sh

+23-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,20 @@ wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.
4949
dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb
5050
rm -f percona-release_latest.$(lsb_release -sc)_all.deb
5151

52-
# Elasticsearch repository
53-
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
54-
if $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.0"); then
55-
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-7.x.list
52+
if [ "$PROJECT_SEARCH_ENGINE" == "opensearch" ]; then
53+
# Open search repository
54+
curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | sudo apt-key add -
55+
echo "deb https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/opensearch-2.x.list
5656
else
57-
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-6.x.list
57+
# Elasticsearch repository
58+
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
59+
if $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.6"); then
60+
echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-8.x.list
61+
elif $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.0"); then
62+
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-7.x.list
63+
else
64+
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-6.x.list
65+
fi
5866
fi
5967

6068
# PHP and additional
@@ -65,11 +73,20 @@ apt-get update -y && apt-get install -y \
6573
php"${PROJECT_PHP_VERSION}"-xml php"${PROJECT_PHP_VERSION}"-xml php"${PROJECT_PHP_VERSION}"-bcmath \
6674
php"${PROJECT_PHP_VERSION}"-mysql php"${PROJECT_PHP_VERSION}"-sqlite3 php"${PROJECT_PHP_VERSION}"-fpm \
6775
php"${PROJECT_PHP_VERSION}"-memcache php"${PROJECT_PHP_VERSION}"-redis php"${PROJECT_PHP_VERSION}"-opcache \
68-
php"${PROJECT_PHP_VERSION}"-sockets elasticsearch
76+
php"${PROJECT_PHP_VERSION}"-sockets
6977
if $(dpkg --compare-versions "${PROJECT_PHP_VERSION}" "lt" "7.2"); then
7078
apt-get install -y php"${PROJECT_PHP_VERSION}"-mcrypt
7179
fi
7280

81+
# Search engine
82+
if [ "$PROJECT_SEARCH_ENGINE" == "opensearch" ]; then
83+
apt-get install -y opensearch=2.5.0
84+
# remove from apt list to avoid self-update
85+
rm -f /etc/apt/sources.list.d/opensearch-2.x.list
86+
else
87+
apt-get install -y elasticsearch
88+
fi
89+
7390
# MySQL
7491
if $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.0"); then
7592
percona-release setup ps80

provision/020-system-services.sh

+23-1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,24 @@ sed -i 's/pm.max_spare_servers = .*/pm.max_spare_servers = 5/' /etc/php/"$PROJEC
116116
# -----------------------------------------------------------------------------------------------------
117117

118118

119+
# Open search
120+
if [ "$PROJECT_SEARCH_ENGINE" == "opensearch" ]; then
121+
# Check if the configuration already exists in the opensearch.yml file
122+
if grep -q "plugins.security.disabled" /etc/opensearch/opensearch.yml; then
123+
sed -i "s/plugins.security.disabled: .*/plugins.security.disabled: true/" /etc/opensearch/opensearch.yml
124+
else
125+
# Add the configuration to the opensearch.yml file
126+
echo "plugins.security.disabled: true" >> /etc/opensearch/opensearch.yml
127+
fi
128+
sed -i "s/#network.host: .*/network.host: 127.0.0.1/" /etc/opensearch/opensearch.yml
129+
sed -i "s/#http.port: .*/http.port: 9200/" /etc/opensearch/opensearch.yml
130+
sed -i "s|#JAVA_HOME.*|JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre|" /etc/default/opensearch
131+
132+
/bin/systemctl daemon-reload
133+
/bin/systemctl enable opensearch.service
134+
/bin/systemctl start opensearch.service
135+
136+
else
119137
# Elastic search
120138
sed -i "s/#network.host: .*/network.host: 127.0.0.1/" /etc/elasticsearch/elasticsearch.yml
121139
sed -i "s/#http.port: .*/http.port: 9200/" /etc/elasticsearch/elasticsearch.yml
@@ -124,6 +142,10 @@ if $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.0"); then
124142
else
125143
sed -i "s|#JAVA_HOME.*|JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java|" /etc/default/elasticsearch
126144
fi
145+
if $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.6"); then
146+
sed -i "s/xpack.security.enabled: .*/xpack.security.enabled: false/" /etc/elasticsearch/elasticsearch.yml
147+
fi
148+
127149
mkdir /etc/systemd/system/elasticsearch.service.d
128150
cat <<'EOF' > /etc/systemd/system/elasticsearch.service.d/override.conf
129151
[Service]
@@ -133,7 +155,7 @@ EOF
133155
/bin/systemctl daemon-reload
134156
/bin/systemctl enable elasticsearch.service
135157
/bin/systemctl start elasticsearch.service
136-
158+
fi
137159

138160
# -----------------------------------------------------------------------------------------------------
139161

provision/110-magento-app.sh

+14-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,19 @@ if $(dpkg --compare-versions "${COMPOSER_VERSION}" "ge" "2.0"); then
4545
fi
4646
sudo -u vagrant COMPOSER_MEMORY_LIMIT=-1 composer install -d "$PROJECT_BUILD" --no-progress --no-interaction
4747

48+
# Handle two factor auth deactivation
49+
if [ "$PROJECT_DISABLE_TWO_FACTOR_AUTH" == "true" ]; then
50+
sudo -u vagrant COMPOSER_MEMORY_LIMIT=-1 composer require -d "$PROJECT_BUILD" --no-progress --no-interaction markshust/magento2-module-disabletwofactorauth
51+
fi
52+
4853
# Rsync directory
4954
if [ "$PROJECT_BUILD" != "$PROJECT_PATH" ]; then
5055
rsync -a --remove-source-files "$PROJECT_BUILD"/ "$PROJECT_PATH"/ || true
5156
fi
5257

5358
# Copy auth.json for sample installation
5459
if [ ! -f "$PROJECT_PATH/auth.json" ] && [ -f /home/vagrant/auth.json ]; then
55-
sudo -u vagrant cp /home/vagrant/auth.json "$PROJECT_PATH"/auth.json
60+
sudo -u vagrant cp /home/vagrant/auth.json "$PROJECT_PATH"/auth.json
5661
fi
5762

5863
# Symlink
@@ -62,6 +67,12 @@ ln -sfn "$PROJECT_PATH" /var/www/html/"$PROJECT_NAME"
6267
# Apply basic rights on regular mount
6368
chown -fR :www-data "$PROJECT_PATH"
6469

70+
# Search engine argument
71+
SEARCH_ENGINE=""
72+
if $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.6"); then
73+
SEARCH_ENGINE="--search-engine=${PROJECT_SEARCH_ENGINE}"
74+
fi
75+
6576
# Run install
6677
chmod +x "$PROJECT_PATH"/bin/magento
6778
sudo -u vagrant "$PROJECT_PATH"/bin/magento setup:uninstall -n -q
@@ -81,7 +92,8 @@ sudo -u vagrant "$PROJECT_PATH"/bin/magento setup:install \
8192
--currency="${PROJECT_CURRENCY}" \
8293
--timezone="${PROJECT_TIME_ZONE}" \
8394
--use-rewrites="1" \
84-
--backend-frontname="admin"
95+
--backend-frontname="admin" \
96+
$SEARCH_ENGINE
8597

8698
# Install sample data
8799
if [ "$PROJECT_SAMPLE" == "true" ]; then

provision/120-magento-post.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,16 @@ if $(dpkg --compare-versions "${PROJECT_VERSION}" "gt" "2.2"); then
8686
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "web/secure/use_in_adminhtml" "1"
8787
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "web/secure/use_in_frontend" "1"
8888
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "web/secure/enable_hsts" "1"
89-
if $(dpkg --compare-versions "${PROJECT_VERSION}" "lt" "2.3.5-p2"); then
90-
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "catalog/search/engine" "elasticsearch6"
89+
if [ "$PROJECT_SEARCH_ENGINE" == "opensearch" ]; then
90+
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "catalog/search/engine" "opensearch"
9191
else
92-
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "catalog/search/engine" "elasticsearch7"
92+
if $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.6"); then
93+
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "catalog/search/engine" "elasticsearch8"
94+
elif $(dpkg --compare-versions "${PROJECT_VERSION}" "ge" "2.4.0"); then
95+
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "catalog/search/engine" "elasticsearch7"
96+
else
97+
sudo -u vagrant "$PROJECT_PATH"/bin/magento config:set "catalog/search/engine" "elasticsearch6"
98+
fi
9399
fi
94100
else
95101
# Force https on unsecure request for older versions

0 commit comments

Comments
 (0)