-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
66 lines (63 loc) · 2.46 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
66 lines (63 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Example Docker Compose: 5chan board manager with bitsocial-cli (PKC RPC)
#
# Quick start:
# cp docker-compose.example.yml docker-compose.yml
# docker compose up -d
# # Install the spam-blocker challenge referenced by the default preset
# # (without it, `5chan board add --apply-defaults` is rejected by the RPC server):
# docker compose exec bitsocial bitsocial challenge install @bitsocial/spam-blocker-challenge
# # Now add boards via 5chan board add (see README.md)
#
# View logs:
# docker compose logs -f 5chan
services:
bitsocial:
image: ghcr.io/bitsocialnet/bitsocial-cli:latest
container_name: 5chan-bitsocial-cli
restart: unless-stopped
ports:
- "9138:9138"
- "4001:4001" # Kubo Swarm (TCP)
- "4001:4001/udp" # Kubo Swarm (QUIC + WebTransport + WebRTC-direct)
volumes:
- bitsocial-data:/data
- bitsocial-logs:/logs
environment:
# Fixed RPC auth key so 5chan board manager can connect without extracting it from logs.
# Change this to your own random string (e.g.: openssl rand -base64 32 | tr -d '/+=')
- PKC_RPC_AUTH_KEY=TFCh0joRU60KwlfVaprP2uenw7NCdAwsBCF5UDoVg
# Optional: increase UDP buffer limits for QUIC transport (used by Kubo/IPFS).
# Uncomment if you are running Docker with root privileges.
# sysctls:
# - net.core.rmem_max=7500000
# - net.core.wmem_max=7500000
healthcheck:
test: ["CMD", "node", "-e", "const net=require('net');const s=net.connect(9138,'localhost',()=>{s.end();process.exit(0)});s.on('error',()=>process.exit(1));setTimeout(()=>process.exit(1),5000)"]
interval: 30s
timeout: 10s
start_period: 60s
retries: 3
5chan:
image: ghcr.io/bitsocialnet/5chan-board-manager:latest
container_name: 5chan
restart: unless-stopped
depends_on:
bitsocial:
condition: service_healthy
volumes:
- 5chan-data:/data
environment:
# Must match PKC_RPC_AUTH_KEY on the bitsocial service above
- PKC_RPC_WS_URL=ws://bitsocial:9138/TFCh0joRU60KwlfVaprP2uenw7NCdAwsBCF5UDoVg
# Daemon debug logging — flows into `5chan logs`. Set to "" to silence.
- DEBUG=bitsocial:5chan-board-manager*
healthcheck:
test: ["CMD", "node", "-e", "process.exit(Date.now() - require('fs').statSync('/data/5chan/heartbeat').mtimeMs < 600000 ? 0 : 1)"]
interval: 60s
timeout: 5s
start_period: 180s
retries: 3
volumes:
bitsocial-data:
bitsocial-logs:
5chan-data: