Azure へのデプロイ
Azure VM または Azure Container Apps に nostrfy をデプロイ — systemd、TLS、動的パブリック IP の注意点を含めてステップごとに解説します。
選択肢: VM(推奨)、または Container Apps。
オプション 1: 仮想マシン(推奨)
- VM を作成: Ubuntu 24.04 LTS、開始時は
Standard_B1s(1 GB) またはStandard_B2s(2 GB)。ユーザーに近いリージョンを選んでください。 - ネットワーク セキュリティ グループ (NSG): TCP
8080(TLS 用に443も)の受信規則を追加します。SSH 規則は自分の IP に制限してください。 - SSH で接続し、汎用の VPS ガイドに従います:
sh
ssh <user>@<public-ip>
curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh
sudo mkdir -p /etc/nostrfy
sudo curl -fsSL -o /etc/nostrfy/nostrfy.toml \
https://raw.githubusercontent.com/iqbqioza/nostrfy/main/deploy/nostrfy.toml
sudo nano /etc/nostrfy/nostrfy.toml # name、public_url、private_key を設定します
sudo curl -fsSL -o /etc/systemd/system/nostrfy.service \
https://raw.githubusercontent.com/iqbqioza/nostrfy/main/deploy/nostrfy.service
sudo systemctl daemon-reload
sudo systemctl enable --now nostrfy- 検証:
sh
curl http://<public-ip>:8080/health- TLS (
wss://) を追加: certbot + nginx で(VPS ガイド と同様に)、または証明書付きの Azure Application Gateway を使用します。
オプション 2: Azure Container Apps
Container Apps はリポジトリの Dockerfile からビルドします(事前ビルド済みリリースバイナリをダウンロードするもの):
- Container App を作成: GitHub リポジトリから作成します(またはイメージを ACR にプッシュ)。
- ポート:コンテナポートを
8080に設定します。 - メモリ: 最低 1 GB。
- 永続ストレージ: LMDB データ用に Azure Storage ファイル共有 を
/dataにマウントします。 - TLS: Container Apps はアプリ URL に
https://を提供します —relay.public_url = "wss://<app>.<region>.azurecontainerapps.io"を設定します(またはカスタムドメイン)。