ごきげんよう。
ある
しかし
さて、retrospring.net
)も
Retrospring never was a large company, as many might have assumed. It never was a company at all. Retrospring started as a project by two friends, later having another one join, and someone leaving again. So, currently, the entire site is being taken care of by 2 people.
With service quality steadily degrading and us not being able to keep up anymore, which is turning into more and more of a liability with our current user counts, we are deciding to shut down the service.
かくしてまた
ならずに
Rainbeamと
駆け出しの
要件
動作に 必要な もの
- RAMが
1GB程度の Linuxサーバ - Redis
- SQLite3
- リバースプロキシ(Caddyや
Nginx) - hCaptchaの
サイトキー・シークレット
1GBとVM.Standard.E2.1.Micro
, Ubuntu 24.04 minimal)を
ビルドに 必要な もの
ビルドは
ビルド
依存関係の インストール
# Ubuntu 24.04 の場合sudo apt install build-essentials rustup just pkg-config libssl-dev
実行
リポジトリをjust build
git clone https://github.com/swmff/rainbeamcd rainbeamjust build sqlite
終わったら./target/release/rainbeam
に
サーバの 設定
以下、ask.example.com
と
依存関係の インストール・ 有効化
# Ubuntu 24.04 の場合sudo apt install redis sqlite3 caddysudo systemctl enable redis-server --nowsudo systemctl enable caddy --now
設定ファイルの 編集
サーバ上にも./.config/
以下、
git clone https://github.com/swmff/rainbeamcd rainbeam
まず./.config/config.toml
に./.config/config.example.toml
port = 8080 # Rainbeamが待ち受けるポートname = "きみの質問箱"description = "🌈"static_dir = "" # 静的ファイルを置くディレクトリ。デフォルトでは作業ディレクトリ直下の ./.config/static/registration_enabled = true # ユーザ登録を許可するか否か(後述)host = "https://ask.example.com" # きみの設定したドメインblocked_hosts = []migration = falsereal_ip_header = "CF-Connecting-IP" # CloudflareのCDNを挟む場合
[captcha]site_key = "hCaptchaのサイトキー"secret = "hCaptchaのシークレット"
[tiers]double_limits = 1stylish_card = 1avatar_crown = 1profile_badge = 1pages = 1
続いて./.config/static/site/about.md
を/site/about
に
## この質問箱について
- お前も**本当に美しい**魂になりたいんだろ? - なりたければ[プロフ](https://www.haxibami.net/about)みて
ちょっとした ハック
touch main.db
執筆時点では、main.db
)が
リバースプロキシの 設定
良き慣習に
ask.example.com { # Caddyの自動SSLを使わず別の証明書(Cloudflareの証明書など)を使う場合はそれも指定 # tls /etc/ssl/certs/cloudflare.pem /etc/ssl/private/cloudflare.key encode zstd gzip reverse_proxy localhost:8080}
sudo systemctl restart caddy
systemdの セットアップ
任意だが、
[Unit]Description=Rainbeam daemonRequires=caddy.serviceAfter=caddy.service network-online.target
[Service]Type=simpleUser=rainbeamExecStart=/usr/local/bin/rainbeamWorkingDirectory=/home/rainbeam/rainbeamTimeoutSec=60StandardOutput=journalStandardError=journalSyslogIdentifier=rainbeamRestart=always
[Install]WantedBy=multi-user.target
変更を
sudo systemctl daemon-reloadsudo systemctl enable --now rainbeam
> systemctl status rainbeam● rainbeam.service - Rainbeam daemon Loaded: loaded (/etc/systemd/system/rainbeam.service; enabled; preset: enabled) Active: active (running) since Sat 2024-10-26 03:28:55 UTC; 13h ago Main PID: XXXX (rainbeam) Tasks: X (limit: XXXX) Memory: 16.6M (peak: 17.3M) CPU: 3.589s CGroup: /system.slice/rainbeam.service └─XXXX /home/rainbeam/rainbeam/target/release/rainbeam
2024-10-26T03:28:55.678132Z INFO 🌈 Starting server at: http://localhost:8080!
うまく

初期設定
このregistration_enabled
をfalse
に
あとは
結果
そういうわけで
脚注
-
Rainbeam is a faithful recreation of the amazing Q&A site Retrospring. Rainbeam uses many Retrospring's core concepts, ideas, and designs, however it is built from the ground up and uses none of Retrospring's original code or assets.
(READMEより) ↩ -
と
いうのも、 他の OSでの クロスコンパイルが 通るかは 不明なので (試していないが、 OpenSSLに リンクしている 関係で たぶん うまく いかない)。 ↩ -
そのうえメモリ消費も
激しい (参考までに :RAM 1GB + スワップ領域4GBの 環境で、 スワップ1~2GBを 消費) ↩