This repository was archived by the owner on Oct 1, 2020. It is now read-only.
File tree 4 files changed +18
-9
lines changed
4 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ Vagrant.configure(VAGRANT_API_VERSION) do |config|
58
58
guest_magento_dir , #2
59
59
magento_host_name , #3
60
60
config_data [ 'environment' ] [ 'use_php7' ] , #4
61
- config_data [ 'magento' ] [ 'backend_frontname ' ] , #5
61
+ config_data [ 'magento' ] [ 'admin_frontname ' ] , #5
62
62
config_data [ 'magento' ] [ 'language' ] , #6
63
63
config_data [ 'magento' ] [ 'timezone' ] , #8
64
64
config_data [ 'magento' ] [ 'currency' ] , #9
Original file line number Diff line number Diff line change 3
3
vagrant_dir=$PWD
4
4
magento_ce_dir=" ${vagrant_dir} /magento2ce"
5
5
magento_ee_dir=" ${magento_ce_dir} /magento2ee"
6
+ config_path=" ${vagrant_dir} /local.config/config.yaml"
6
7
7
8
# Enable trace printing and exit on the first error
8
9
set -ex
9
10
10
11
bash " ${vagrant_dir} /scripts/host/shell/check_requirements.sh"
11
12
13
+ # Generate random IP address and host name to prevent collisions, if not specified explicitly in local config
14
+ if [ ! -f " ${vagrant_dir} /local.config/config.yaml" ]; then
15
+ cp " ${config_path} .dist" ${config_path}
16
+ fi
17
+ random_ip=$(( ( RANDOM % 240 ) + 12 ))
18
+ sed -i.back " s|ip_address: \" 192.168.10.2\" |ip_address: \" 192.168.10.${random_ip} \" |g" " ${config_path} "
19
+ sed -i.back " s|host_name: \" magento2.vagrant2\" |host_name: \" magento2.vagrant${random_ip} \" |g" " ${config_path} "
20
+ rm -f " ${config_path} .back"
21
+
22
+ # Clean up the project before initialization if "-f" option was specified
12
23
force_project_cleaning=0
13
24
while getopts ' f' flag; do
14
25
case " ${flag} " in
15
26
f) force_project_cleaning=1 ;;
16
27
* ) error " Unexpected option ${flag} " ;;
17
28
esac
18
29
done
19
-
20
- # Clean up the project before initialization if "-f" option was specified
21
30
if [ ${force_project_cleaning} -eq 1 ]; then
22
31
vagrant destroy -f
23
32
rm -rf ${magento_ce_dir} ${vagrant_dir} /.idea ${vagrant_dir} /.vagrant
Original file line number Diff line number Diff line change 6
6
use_nfs: 1
7
7
# Default is 2Gb, around 3Gb is necessary to run functional tests
8
8
memory: 2048
9
- ip_address: "192.168.10.11 "
9
+ ip_address: "192.168.10.2 "
10
10
environment:
11
11
# If set to 0, PHP 5 will be installed
12
12
use_php7: 1
13
13
magento:
14
- host_name: "magento2.vagrant "
15
- backend_frontname : "admin"
14
+ host_name: "magento2.vagrant2 "
15
+ admin_frontname : "admin"
16
16
language: "en_US"
17
17
timezone: "America/Chicago"
18
18
currency: "USD"
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ guest_magento_dir=$2
10
10
magento_host_name=$3
11
11
12
12
declare -A setupOptions
13
- setupOptions[backend_frontname ]=$5
13
+ setupOptions[admin_frontname ]=$5
14
14
setupOptions[language]=$6
15
15
setupOptions[timezone]=$7
16
16
setupOptions[currency]=$8
@@ -50,7 +50,7 @@ install_cmd="./bin/magento setup:install \
50
50
--db-host=${setupOptions[db_host]} \
51
51
--db-name=${setupOptions[db_name]} \
52
52
--db-user=${setupOptions[db_user]} \
53
- --backend-frontname=${setupOptions[backend_frontname ]} \
53
+ --backend-frontname=${setupOptions[admin_frontname ]} \
54
54
--base-url=${setupOptions[base_url]} \
55
55
--language=${setupOptions[language]} \
56
56
--timezone=${setupOptions[timezone]} \
86
86
echo "
87
87
Magento application was deployed to ${guest_magento_dir} and installed successfully
88
88
Access storefront at ${setupOptions[base_url]}
89
- Access admin panel at ${setupOptions[base_url]}${setupOptions[backend_frontname ]} /"
89
+ Access admin panel at ${setupOptions[base_url]}${setupOptions[admin_frontname ]} /"
90
90
91
91
if [ ${use_nfs_for_synced_folders} -eq 0 ]; then
92
92
echo "
You can’t perform that action at this time.
0 commit comments