| @@ 57-87 (lines=31) @@ | ||
| 54 | * @param $projectPath |
|
| 55 | * @param OutputInterface $output |
|
| 56 | */ |
|
| 57 | protected function installMagento(array $options, $projectPath, OutputInterface $output) |
|
| 58 | { |
|
| 59 | $this->setPermissions($projectPath, $output); |
|
| 60 | ||
| 61 | $output->writeln('<info>Installing Magento 2 Software</info>'); |
|
| 62 | $locale = $options['magestead']['apps']['mba_12345']['locale']; |
|
| 63 | $db_name = $options['magestead']['apps']['mba_12345']['db_name']; |
|
| 64 | $base_url = $options['magestead']['apps']['mba_12345']['base_url']; |
|
| 65 | $default_currency = $options['magestead']['apps']['mba_12345']['default_currency']; |
|
| 66 | ||
| 67 | $install = 'vagrant ssh -c \'cd /var/www/public; bin/magento setup:install --base-url=http://'.$base_url.'/ \ |
|
| 68 | --db-host=localhost \ |
|
| 69 | --db-name='.$db_name.' \ |
|
| 70 | --db-user=magestead \ |
|
| 71 | --db-password=vagrant \ |
|
| 72 | --admin-firstname=RichDynamix \ |
|
| 73 | --admin-lastname=Magestead \ |
|
| 74 | [email protected] \ |
|
| 75 | --admin-user=admin \ |
|
| 76 | --admin-password=password123 \ |
|
| 77 | --language='.$locale.' \ |
|
| 78 | --currency='.$default_currency.' \ |
|
| 79 | --timezone=Europe/London \ |
|
| 80 | --use-rewrites=1 \ |
|
| 81 | --backend-frontname=admin \ |
|
| 82 | --session-save=db \''; |
|
| 83 | ||
| 84 | new ProcessCommand($install, $projectPath, $output); |
|
| 85 | ||
| 86 | $this->configureRedis($projectPath, $output); |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * @param $projectPath |
|
| @@ 33-67 (lines=35) @@ | ||
| 30 | * @param $projectPath |
|
| 31 | * @param $output |
|
| 32 | */ |
|
| 33 | protected function installMagento(array $options, $projectPath, OutputInterface $output) |
|
| 34 | { |
|
| 35 | $locale = $options['magestead']['apps']['mba_12345']['locale']; |
|
| 36 | $db_name = $options['magestead']['apps']['mba_12345']['db_name']; |
|
| 37 | $base_url = $options['magestead']['apps']['mba_12345']['base_url']; |
|
| 38 | $default_currency = $options['magestead']['apps']['mba_12345']['default_currency']; |
|
| 39 | ||
| 40 | $install = 'vagrant ssh -c \'cd /var/www/public; php -f install.php -- \ |
|
| 41 | --license_agreement_accepted "yes" \ |
|
| 42 | --locale "' . $locale . '" \ |
|
| 43 | --timezone "Europe/London" \ |
|
| 44 | --default_currency "' . $default_currency . '" \ |
|
| 45 | --db_host "localhost" \ |
|
| 46 | --db_name "' . $db_name . '" \ |
|
| 47 | --db_user "magestead" \ |
|
| 48 | --db_pass "vagrant" \ |
|
| 49 | --session_save "db" \ |
|
| 50 | --url "http://' . $base_url . '/" \ |
|
| 51 | --use_rewrites "yes" \ |
|
| 52 | --skip_url_validation "yes" \ |
|
| 53 | --use_secure "no" \ |
|
| 54 | --use_secure_admin "no" \ |
|
| 55 | --secure_base_url "http://' . $base_url . '/" \ |
|
| 56 | --admin_firstname "RichDynamix" \ |
|
| 57 | --admin_lastname "Magestead" \ |
|
| 58 | --admin_email "[email protected]" \ |
|
| 59 | --admin_username "admin" \ |
|
| 60 | --admin_password "password123"\' '; |
|
| 61 | ||
| 62 | new ProcessCommand($install, $projectPath, $output); |
|
| 63 | ||
| 64 | $this->configureRedis($projectPath); |
|
| 65 | $this->setPermissions($projectPath, $output); |
|
| 66 | $this->installMagerun($projectPath, $output); |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * @param $projectPath |
|