Add docs + .sh files

This commit is contained in:
2024-08-07 06:44:52 +00:00
parent f7917ed781
commit 0786dafbf0
5 changed files with 131 additions and 36 deletions

View File

@@ -1,38 +1,8 @@
#!/bin/bash
# Update and install necessary packages
sudo apt update
sudo apt install -y curl gnupg lsb-release
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
# Install PM2
sudo npm install -g pm2
# Install Nginx
sudo apt install -y nginx
# Create files and directories
sudo mkdir -p /var/www/myapp
sudo touch /var/www/myapp/index.html
sudo ln -s /var/www/myapp /var/www/html/myapp
# Set up default Nginx config
cat <<EOF | sudo tee /etc/nginx/sites-available/default
server {
listen 80;
server_name myserver.com;
root /var/www/myapp;
index index.html;
location / {
try_files \$uri \$uri/ =404;
}
}
EOF
# Restart Nginx to apply changes
sudo systemctl restart nginx
echo "Installing and setting up nginx"
./install_nginx.sh
echo "Installing and setting up Docker"
./install_docker.sh
echo "New user creation"
./create_user.sh