Skip to content

Instantly share code, notes, and snippets.

@rootsec1
Last active May 21, 2021 13:23
Show Gist options
  • Save rootsec1/b5e251f8ef0c05147fbff627206514cb to your computer and use it in GitHub Desktop.
Save rootsec1/b5e251f8ef0c05147fbff627206514cb to your computer and use it in GitHub Desktop.
Prod deployment setup
curl -sS 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
sudo apt update && sudo apt -y upgrade
sudo apt install -y nodejs npm nginx yarn redis python3-certbot-nginx
sudo chown -R $(whoami) ~/.npm
sudo npm i -g pm2
pm2 list
sudo systemctl enable nginx
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
echo "y" | sudo ufw enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment