You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.3 KiB

4 years ago
#!/bin/bash
4 years ago
#################################
# set USERNAME #
#################################
4 years ago
4 years ago
USERNAME=
4 years ago
4 years ago
if [ -z "$USERNAME" ]; then
4 years ago
4 years ago
# ------------------------
# install wireguard jq
# ------------------------
4 years ago
4 years ago
sudo apt update
sudo apt install wireguard jq
4 years ago
4 years ago
# ------------------------
# install node version 15
# ------------------------
4 years ago
4 years ago
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs
4 years ago
4 years ago
# ------------------------
# install docker
# ------------------------
4 years ago
4 years ago
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install -y docker-ce
sudo usermod -aG docker $USERNAME
4 years ago
4 years ago
# ------------------------
# install docker-compose
# ------------------------
4 years ago
4 years ago
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
4 years ago
4 years ago
# ------------------------
# install pm2
# ------------------------
sudo npm install -g pm2
echo ""
echo "run ./install.sh"
4 years ago
echo ""
else
echo ""
echo "set USERNAME first"
echo ""
4 years ago
fi