Update production scripts to install/load NodeJS/npm using nvm

This commit is contained in:
wiz 2020-09-18 21:53:58 +09:00
parent 07cfdd73aa
commit 91815072d5
No known key found for this signature in database
GPG Key ID: A394E332255A6173
4 changed files with 23 additions and 2 deletions

View File

@ -68,6 +68,16 @@ pkg install -y boost-libs autoconf automake gmake gcc libevent libtool pkgconf
pkg install -y mariadb55-server mariadb55-client nginx py37-certbot-nginx npm
```
### NodeJS / npm
I recommend to build nodejs / npm from source using nvm:
```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | zsh
source $HOME/.zshrc
nvm install node
nvm alias default node
```
### Rust
I recommend to build rust from latest source:

View File

@ -1,4 +1,6 @@
#!/usr/local/bin/zsh
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
for site in mainnet liquid testnet bisq
do
git clone https://github.com/mempool/mempool "${HOME}/${site}"

View File

@ -1,4 +1,6 @@
#!/usr/local/bin/zsh
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
for site in mainnet liquid testnet bisq
do
cd "${HOME}/${site}/backend/"

View File

@ -1,10 +1,17 @@
#!/usr/local/bin/zsh -x
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$HOME/bin
[ -f $HOME/lock ] && exit 1
if [ -f $HOME/lock ];then
echo "check lockfile"
exit 1
fi
touch $HOME/lock
echo 'rebuilding mempool sites'|wall
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
echo 'upgrading mempool'|wall
cd "$HOME/mempool"
git pull --rebase origin master