Skip to content

Commit

Permalink
Merge pull request #227 from magenx/dev
Browse files Browse the repository at this point in the history
- add nvm nodejs
  • Loading branch information
magenx authored Dec 7, 2023
2 parents 9421c45 + ebc6fe0 commit e314925
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions magenx.install.latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ MARIADB_VERSION="10.11"
ELASTICSEARCH_VERSION="7.x"
VARNISH_VERSION="73"
REDIS_VERSION="7"
NODE_VERSION="18"
NVM_VERSION="0.39.7"

# Repositories
MARIADB_REPO_CONFIG="https://downloads.mariadb.com/MariaDB/mariadb_repo_setup"
Expand Down Expand Up @@ -1277,11 +1279,11 @@ for ENV_SELECTED in "${ENV[@]}"
echo ""
pause '[] Press [Enter] key to start downloading'
echo ""
## create some temp dirs
COMPOSER_TMP=".config,.cache,.local,.composer"
mkdir -p ${ROOT_PATH%/*}/{.config,.cache,.local,.composer}
chmod 2750 ${ROOT_PATH%/*}/{.config,.cache,.local,.composer}
chown -R ${OWNER}:${OWNER} ${ROOT_PATH%/*}/{.config,.cache,.local,.composer}
## create some dirs and files
touch ${ROOT_PATH%/*}/{.bashrc,.bash_profile}
mkdir -p ${ROOT_PATH%/*}/{.config,.cache,.local,.composer,.nvm}
chmod 2750 ${ROOT_PATH%/*}/{.config,.cache,.local,.composer,.nvm,.bashrc,.bash_profile}
chown -R ${OWNER}:${OWNER} ${ROOT_PATH%/*}/{.config,.cache,.local,.composer,.nvm,.bashrc,.bash_profile}
##

su ${OWNER} -s /bin/bash -c "composer -n -q config -g http-basic.repo.magento.com ${COMPOSER_NAME} ${COMPOSER_PASSWORD}"
Expand Down Expand Up @@ -1980,7 +1982,7 @@ if [ "${apply_config}" == "y" ]; then
su ${GET_[owner]} -s /bin/bash -c "bin/magento config:set dev/caching/cache_user_defined_attributes 1"
su ${GET_[owner]} -s /bin/bash -c "mkdir -p var/tmp"
su ${GET_[owner]} -s /bin/bash -c "composer config --no-plugins allow-plugins.cweagans/composer-patches true"
su ${GET_[owner]} -s /bin/bash -c "composer require magento/quality-patches cweagans/composer-patches -n"
su ${GET_[owner]} -s /bin/bash -c "composer require magento/quality-patches cweagans/composer-patches vlucas/phpdotenv -n"
su ${GET_[owner]} -s /bin/bash -c "bin/magento setup:upgrade"
su ${GET_[owner]} -s /bin/bash -c "bin/magento deploy:mode:set ${GET_[env]}"
su ${GET_[owner]} -s /bin/bash -c "bin/magento cache:flush"
Expand Down Expand Up @@ -2118,6 +2120,14 @@ cd ~/public_html/
PS1='\[\e[37m\][\[\e[m\]\[\e[32m\]\u\[\e[m\]\[\e[37m\]@\[\e[m\]\[\e[35m\]\h\[\e[m\]\[\e[37m\]:\[\e[m\]\[\e[36m\]\W\[\e[m\]\[\e[37m\]]\[\e[m\]$ '
END

if [ "${GET_[env]}" == "developer" ]; then
YELLOWTXT "[-] Install nodejs ${NODE_VERSION} for [ developer ] environment"
echo ""
su ${GET_[owner]} -s /bin/bash -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash"
su ${GET_[owner]} -s /bin/bash -c "nvm install ${NODE_VERSION}"
fi
echo ""

done

echo ""
Expand Down

0 comments on commit e314925

Please sign in to comment.