This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.
This is how I manage real production loads for my Rails apps. It assumes:
- Rails 7+
- Ruby 3+
- PostgreSQL
- Ubuntu Server 24.04
- Capistrano, Puma, Nginx
| #!/bin/bash | |
| # Production Docker Host Hardening Script v2 | |
| # For Ubuntu Server 24.04 LTS (Noble) | |
| # Suitable for both Kamal deployment and builder hosts | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # --- Constants --- |
| #!/bin/bash | |
| # This script takes a clean Ubuntu Server 24.04 LTS image and installs and configures | |
| # everything needed to deploy a production-ready PostgreSQL server. | |
| set -euo pipefail | |
| # --- AESTHETICS --- | |
| GREEN='\033[0;32m' |
This is an opinionated handbook on how I migrated all my Rails apps off the cloud and into VPS.
This is how I manage real production loads for my Rails apps. It assumes:
| # Capistrano Task that hooks into `deploy:finished` to send a message to Slack | |
| # | |
| # 1. Setup a Slack Incoming Webhook Integration (https://api.slack.com/incoming-webhooks) | |
| # 2. Put the Webhook URL in an Environment variable (SLACK_WEBHOOK_URL) | |
| # 3. Place this file in `lib/capistrano/tasks` | |
| # | |
| # This will then create a new message in the channel on deployment, including who, what and where information | |
| require "net/http" | |
| require "json" |
| fr: | |
| admin: | |
| js: | |
| true: Vrai | |
| false: Faux | |
| is_present: Est présent | |
| is_blank: Est vide | |
| date: Date ... | |
| between_and_: Entre le ... et le ... | |
| today: "Aujourd'hui" |