Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security issue #2

Merged
merged 4 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions NodeJS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ if [ -d "$nvmDir" ]; then
if [ ! -d "/opt/nvm/versions/node/$nodeVersion" ]; then
echo "Install this version"
nvm install $nodeVersion

chmod -R 777 /opt/nvm
chmod -R 755 /opt/nvm
else
echo "Error on install Node version on NVM"
fi
Expand Down Expand Up @@ -90,7 +89,7 @@ sleep 5

if [ ! -f "$nodeDir/app.sock" ]; then
echo "Allow nginx access to the socket $nodeDir/app.sock"
chmod 777 "$nodeDir/app.sock"
chmod 755 "$nodeDir/app.sock"
else
echo "Sock file not present disable Node app"
runuser -l $user -c "pm2 del $scriptName"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HestiaCP with Node.JS support.

With this repo you can run multiples NodeJS Apps at same time.
This template read `.env` file, `.nvm` for Node version, and `package.json` for get info and auto install modules.
This template reads the `.env` file, `.nvm` for Node version, and `package.json` to get info and automatically install modules.

![HestiaCP](https://logico.com.ar/img/2019/04/21/vestacp_proxy_setup.png)

Expand All @@ -11,7 +11,7 @@ https://logico.ar/blog/2019/04/20/soporte-para-aplicaciones-nodejs-en-vestacp
## Installation

***Auto "With Script":***
* First download this Git in your `home` directory and run `chmod +x ./install.sh`, `./install.sh`. Script auto install `NVM` and `PM2`
* First download this Git in your `home` directory and run `chmod +x ./install.sh`, `sudo ./install.sh`. Script auto install `NVM` and `PM2`

***Manually:***
* Install PM2 `npm i pm2@latest -g`
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ ! -f ~/.nvm/nvm.sh ]; then


mv ~/.nvm /opt/nvm
chmod -R 777 /opt/nvm
chmod -R 755 /opt/nvm

echo "-> Add this lines to the end your ~/.bashrc file"
echo 'export NVM_DIR="/opt/nvm"
Expand Down