Skip to content

Instantly share code, notes, and snippets.

@ARozputnii
ARozputnii / RoR_deploy_to_AWS_EC2.txt
Last active June 6, 2022 12:30
Capistrano | RVM | PUMA
1) Connect to your server and create deployer user
_________________________
ssh -i ~/.ssh/id_rsa.pub ubuntu@Server_IP
sudo su
cd
adduser deployer
mkdir -p /home/deployer/.ssh
\\ Copy key from local machine -
@ARozputnii
ARozputnii / rails7_esbuild_setup
Last active June 6, 2022 18:55
RoR-7 | Esbuild setup
1. Create new app:
rails new your_project -j=esbuild -d=postgresql -T --css [tailwind|bootstrap|bulma|postcss|sass]
2. Run:
echo 'app' > .ruby-gemset
5. Rename main css file in app/assets/stylesheets dir to "application.scss"
6. Add to package.json
"scripts": {
// CREATE AN EC2 INSTANCE
- In local machine Terminal enter the following command and copy the result.
cat ~/.ssh/id_rsa.pub
- from the AWS EC2 dashboard click ‘Key Pairs’, then ‘Import Key Pairs’.
Specify the name id_rsa and paste the key you just copied from your local machine. Then click ‘Import’.
- create ec2 instance LTS Ubuntu.
@ARozputnii
ARozputnii / deploy_rails_app_on_server_via_Capistrano.txt
Last active April 11, 2022 07:49
Setup Rails app on Ubuntu 20.04 LTS (DigitalOcean or AWS EC2)
// Basic server setup
1) Connect to your server
your_machine$ ssh root@server_host
2) Update/Upgrade your system packages
root# apt-get update && apt-get upgrade