Skip to content

Commit

Permalink
Update Node.js install using the new distribution policy.
Browse files Browse the repository at this point in the history
  • Loading branch information
GhaziTriki committed Sep 14, 2023
1 parent 1242e69 commit 99c2309
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
10 changes: 6 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,12 @@ install_deps() {
apt-get install -y redis-server

echo "Install node.js"
curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
bash nodesource_setup.sh
rm nodesource_setup.sh
apt-get install -y nodejs
apt-get update
apt-get install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
-fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

echo "Install PHP 8.2 with its dependencies"
apt-get install -y php8.2-curl php8.2-cli php8.2-intl php8.2-redis php8.2-gd php8.2-fpm php8.2-pgsql \
Expand Down
13 changes: 7 additions & 6 deletions vagrant/provision/once-as-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin

info "Install Node.js"
sudo apt-get install -y gcc g++ make
sudo apt-get install -y gcc g++ make ca-certificates curl gnupg
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
rm nodesource_setup.sh
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt remove libnode72
sudo apt-get -y install gcc g++ make
sudo apt-get update
sudo apt-get -y install nodejs
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
Expand All @@ -69,7 +70,7 @@ sudo apt-get install -y php8.2-curl php8.2-cli php8.2-intl php8.2-redis php8.2-g
php8.2-mbstring php8.2-xml php8.2-bcmath php8.2-zip php8.2-xdebug

info "Installing PostgreSQL"
sudo percona-release setup ppg-15.1
sudo percona-release setup ppg-15.4
sudo apt-get install -y percona-postgresql-15 \
percona-postgresql-15-repack \
percona-postgresql-15-pgaudit \
Expand Down

0 comments on commit 99c2309

Please sign in to comment.