strfryをdockerで立てる
著名リレー実装の一つの strfry をdockerで起動する方法。 1. docker-compose.yml を作る
code:docker-compose.yml
version: '3'
services:
strfry:
image: pluja/strfry:latest
restart: unless-stopped
volumes:
- type: bind
source: ./strfry.conf
target: /etc/strfry.conf
- ./strfry-db:/app/strfry-db
ports:
- "7777:7777"
2. strfry.conf を入手する
code:bash
3. strfry.conf の44行目付近にある relay.bind を 127.0.0.1 から 0.0.0.0 に書き換える
code:diff
--- strfry.conf.old 2023-10-18 10:43:06
+++ strfry.conf 2023-10-18 10:33:48
@@ -41,7 +41,7 @@
relay {
# Interface to listen on. Use 0.0.0.0 to listen on all interfaces (restart required)
- bind = "127.0.0.1"
+ bind = "0.0.0.0"
# Port to open for the nostr websocket protocol (restart required)
port = 7777
4. 起動する
code:bash
docker compose up -d
5. 動作確認する
code:bash