Skip to content

Instantly share code, notes, and snippets.

View anko20094's full-sized avatar

Danyil Shkoropad anko20094

View GitHub Profile
@anko20094
anko20094 / A basic set up for a remote server
Last active June 4, 2023 14:03
Set up server for a telegram bot Rails application. Railas 7, Postgresql, Puma, Nginx, RVM
Note: Replace UPPERCASE words with your own setup details.
Note 2: I use vim to edit files, you can and should replace vim with nano or any other editor of choice if you're not familiar with it.
Note 3: Always use random and long passwords, don't share them between applications and don't lose them. Also never commit unencrypted secrets to public repos.
1) Good practice to update packages
sudo apt-get update
2) Install nginx
sudo apt-get install curl git-core nginx -y
@anko20094
anko20094 / .env
Last active June 4, 2023 09:52
Set up server for a Rails application. Railas 7, Postgresql, Esbuild, Propshaft, Puma, Nginx, RVM
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
DB_USERNAME=NAME_OF_USER_FOR_DB_IN_DEVELOPMENT_ENV
DB_PASSWORD=PASSWORD_OF_USER_FOR_DB_IN_DEVELOPMENT_ENV
PRODUCTION_USERNAME=NAME_OF_USER_FOR_DB
PRODUCTION_PASSWORD=PASSWORD_OF_USER_FOR_DB