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
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:
| #!/bin/bash | |
| # Get directory of script | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| if [[ $# -ne 1 ]] | |
| then | |
| echo "ERROR: This script expects the namespace name to be given as an argument" | |
| echo "e.g. ./ecr-cred-updater.sh my-namespace" | |
| exit 1 |
| require "formula" | |
| require_relative "lib/private_strategy" | |
| class Hoge < Formula | |
| homepage "https://github.com/yourcompany/hoge" | |
| url "https://github.com/yourcompany/hoge/releases/download/v0.1.0/hoge_v0.1.0_darwin_amd64.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy | |
| sha256 "6de411ff3e4b1658a413dd6181fcXXXXXXXXXXXXXXXXXXXX" | |
| head "https://github.com/yourcompany/hoge.git" | |
| version "0.1.0" |
(note: replace ORGANIZATION and PROJECT)
git clone git clone [email protected]:ORGANIZATION/PROJECT.git my-repository
| #!/bin/bash | |
| # Example for the Docker Hub V2 API | |
| # Returns all imagas and tags associated with a Docker Hub user account. | |
| # Requires 'jq': https://stedolan.github.io/jq/ | |
| # set username and password | |
| UNAME="" | |
| UPASS="" |
| #!/bin/bash | |
| # Example for the Docker Hub V2 API | |
| # Returns all images and tags associated with a Docker Hub organization account. | |
| # Requires 'jq': https://stedolan.github.io/jq/ | |
| # set username, password, and organization | |
| UNAME="" | |
| UPASS="" | |
| ORG="" |