This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script adds SSH key and deploys the application | |
# Add SSH key to authorized_keys | |
mkdir -p /root/.ssh | |
chmod 700 /root/.ssh | |
cat >> /root/.ssh/authorized_keys << 'SSHKEY' | |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDI/+m67qkL+Gt6mfYVnyY5IMkY/QYA4dfBYBAPP9SyGJq+NRZ7BwNh9WOEBcvWb9iQ7IuJcmiN/cPgVjJRUiungRFB8SbWTaZsp2h4crrLkh64P8Jiv9YNBDmxI5tCjnUhHoHGhM9rb/GSa1GQEpIIlgglzrFSenY2Uw8yWB+oFutHPZC+tL49MT/Ma4Qi3YYhEeKbIFkKXtkDNvE1qPXPC50PB6gUHEg9P08C2V39YtkqqZN4DcCbyv5zBjkNhd+MKpqPZUf1ooghpJmqEdLnpEy8EUwj0qCivyXzhSM/1mU+7qpSacviXzl0WptgPzKeo95zsUkhFla5QBGcv6dY/aE9kFERwTLAWi3rbMfvDbTBKz8tR2XtXs0D7emzlwDFmrVshM9+ZzlV4AOnS2CH+AQp9YmKBQ5FhgYtVBuUbECRD0JfRg3B9VOCSl0TM8Eg/r8a97nrqpwnZGNQiYKHoq4rpRadzU0BSw5fycsKISOv3lwWIGe+w2qx4XH80e02K2ux5nCBmRBxbzyZUMw8xu9VQjAeMd4e9zO5/F3hhyP60kvTFqbPLkbcYw2heK+mAxYEByeG0Tg6XYel7782cPaQKboZhyetqrxhl2HDAw23Yot7GujmAB//KNKyEkG2L2S7N/B/bOrTwzC7BhWMzSoWfuJRLeHFvehwRis9cQ== gauravtrehan@Gauravs-Laptop.local | |
SSHKEY | |
chmod 600 /root/.ssh/authorized_keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo "🚀 Starting deployment..." | |
# Install dependencies | |
apt-get update -y | |
apt-get install -y git curl postgresql postgresql-contrib | |
# Install Node.js 18 |