Skip to content

Instantly share code, notes, and snippets.

View hulous's full-sized avatar
🖖

Fabien Bénariac hulous

🖖
  • Lendopolis
  • Boussy Saint Antoine, France
  • 00:30 (UTC +02:00)
  • LinkedIn in/fbenariac
View GitHub Profile

How to deploy a Rails 7.1 app with Postgres and Kamal on a single server

I think you have looked at the tutorial from Mr. Heinemeier Hansson at least once or twice and have a similar setup.

rails new kamal_pg --css tailwind --skip-test --database=postgresql

cd kamal_pg
@hulous
hulous / "torn" 1 Setup vps.md
Created February 5, 2024 20:39 — forked from deHelden/"torn" 1 Setup vps.md
Deploy Rails 7.0.4.2 to VPS(DigitalOcean Ubuntu 20). Nginx, Puma, Capistrano3, PostgreSQL, Rbenv.

SETUP VPS

based on DigitalOcean guide

Create local project

local$ rails new appname -T -d postgresql
local$ rails g scaffold Story title:string body:text
local$ rails db:migrate
@hulous
hulous / keyboard_newmen_gm610.md
Created July 8, 2023 17:43
This is a little quick reminder about my new keyboard.

Keyboard newmen gm610

Wireless or Wire mode:

  • FN + Tab for 3 seconds to switch from on to another. Blue flashing tab means Wireless mode, red flashing means Wire mode.

Bluthouth connection:

  • FN + Q or W or E for 3 seconds to try to connect
  • FN + Q or W or E to switch blutouth channel
@hulous
hulous / railscasts.vim
Created November 10, 2022 12:15
Color schemes for vim
" Vim color scheme based on http://github.com/jpo/vim-railscasts-theme
"
" Name: railscasts.vim
" Maintainer: Ryan Bates
" License: MIT
set background=dark
hi clear
if exists("syntax_on")
syntax reset
@hulous
hulous / .rubocop.yml
Last active December 6, 2022 21:30
Basecamp rubocop config inspiration. This template is inspired on https://gist.githubusercontent.com/lazaronixon/7815d84702f277ead5e89c9f2aa5581f/raw/rubocop.yml
# This template is inspired on https://gist.githubusercontent.com/lazaronixon/7815d84702f277ead5e89c9f2aa5581f/raw/rubocop.yml
require:
- rubocop-performance
- rubocop-rails
- rubocop-rspec
Rails:
Enabled: true
@hulous
hulous / config.vscode
Last active November 9, 2022 15:38
This my config for VSCode and/or VSCodium
{
"editor.fontSize": 14,
"editor.rulers": [
75,
80,
85,
100,
120
],
"explorer.openEditors.visible": 10,
@hulous
hulous / .env.local
Last active October 21, 2022 15:40
base rails docker config: only a dockerfile and a docker-compose.yml (with a makefile ;-)) Notice the app_name and application_name must be adapted to your app.
DATABASE_HOST=app_name-db
DATABASE_USER=postgres
DATABASE_PASSWORD=password
@hulous
hulous / Makefile
Last active September 25, 2023 07:45
Rails app Docker and docker-compose command abstraction
APPLICATION_NAME = app_name
WEB_CONTAINER_NAME = $(APPLICATION_NAME)-web
.DEFAULT_GOAL := help
CONTAINER_APP_MANAGER = docker ## Podman vs Docker
# Docker stuff
attach: ## Attach running web container to see logs
$(CONTAINER_APP_MANAGER) attach $(APPLICATION_NAME)_$(WEB_CONTAINER_NAME)_1
The "C" Bible
1:1 In the beginning Unix created the Kernel and the C.
1:2 And the Kernel was without form and (void); and obscurity was on
the face of the C. And the spirit of Unix moved upon the face
of the C.
1:3 And Unix said, Let there be Code: and there was Code.
1:4 And Unix saw the Code, that it was tight: and Unix divided the
unstructured from the GOTO-less.
1:5 And Unix called the Code compact, and the unstructured he called
spaghetti. And the Program and the Module were the first day.
@hulous
hulous / config.reek
Last active October 9, 2022 19:49
reek base config for rails app
directories:
"/":
IrresponsibleModule:
enabled: false
FeatureEnvy:
enabled: false
NilCheck:
enabled: false