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:
I hereby claim:
To claim this, I am signing this object:
| apiVersion: v1 | |
| data: | |
| configManagementPlugins: | | |
| - name: decider2 | |
| generate: | |
| command: ["/bin/bash","-c",'rgrep prod ../apps/ &>/dev/null || exit 0 ; for i in *.yaml;do cat $i;echo ---;done'] | |
| kind: ConfigMap | |
| metadata: | |
| labels: | |
| app.kubernetes.io/name: argocd-cm |
| #!/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" |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <parent> | |
| <groupId>org.springframework.boot</groupId> | |
| <artifactId>spring-boot-starter-parent</artifactId> | |
| <version>2.3.2.RELEASE</version> | |
| <relativePath/> <!-- lookup parent from repository --> | |
| </parent> |
(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="" |
| import tweepy | |
| class TwitterFollow(object): | |
| def __init__(self): | |
| consumer_key = "GYYNimu/ExAMPLE/" | |
| consumer_secret = "QYRC39S84T8zycck2/EXAMPLE/" | |
| access_token = "417735939-tfBA/EXAMPLE/" | |
| access_token_secret = "59kGZexvIRJE/EXAMPLE/" | |
| auth = tweepy.OAuthHandler(consumer_key,consumer_secret) | |
| auth.set_access_token(access_token,access_token_secret) |