blob: f57f50a46f772fbc555d70f062295b420a3f3d2a (
plain) (
blame)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
# The coinos v3 services. Each runs this checkout under Bun.
#
# Secrets and state live outside the checkout, under $STATE (set it in a .env
# file next to this one; see README.md):
# $STATE/names/config.json $STATE/names/data/ (names.db)
# $STATE/nwcpush/config.json $STATE/nwcpush/data/
# $STATE/blossom/data/
# $STATE/live/config.json $STATE/live/data/ (TURN key; streams and their recordings)
# $STATE/messages/bin/magnitude-relay $STATE/messages/data/ (see messages/README.md)
# $STATE/dns/keys.conf $STATE/dns/storage/ (TSIG keys; zones, journal, DNSSEC keys — see dns/README.md)
services:
names:
image: ghcr.io/coinos/bun:1.4.3
container_name: names
working_dir: /app
command: bun names/server.js
environment:
NAMES_CONFIG: /etc/coinosv3/config.json
volumes:
- .:/app:ro
- ${STATE:?set STATE in .env}/names/config.json:/etc/coinosv3/config.json:ro
- ${STATE}/names/data:/data
- ${CLN_RPC:?set CLN_RPC in .env}:/cln/lightning-rpc
- ${CLN_MUT_RPC:-/dev/null}:/cln-mut/lightning-rpc
ports:
- 127.0.0.1:8798:8798
networks: [net]
restart: unless-stopped
# BIP-353 records: Knot DNS, the hidden primary (dns/primary.conf). The
# registrar updates it over `net`; ovh2's public secondary transfers from
# it over Tailscale, on cs's Tailscale address only. The bootstrap zones
# are copied in once (cp -n); after that the zones live in Knot's storage.
dns:
image: cznic/knot:3.4
container_name: dns
command: sh -c 'cp -n /bootstrap/*.zone /storage/ && exec knotd -c /config/knot.conf'
volumes:
- ./dns/primary.conf:/config/knot.conf:ro
- ./dns/bootstrap:/bootstrap:ro
- ${STATE}/dns/keys.conf:/keys/keys.conf:ro
- ${STATE}/dns/storage:/storage
ports:
- ${DNS_XFR_ADDR:-100.119.250.121}:53:53/tcp
- ${DNS_XFR_ADDR:-100.119.250.121}:53:53/udp
networks: [net]
restart: unless-stopped
# Moves wallets' Spending coins off the retired ark.coinos.io to
# ark2.coinos.io (migrator/server.js): a deposit address on the old server
# per migration, the same amount paid from a float on the new one.
migrator:
image: ghcr.io/coinos/bun:1.4.3
container_name: migrator
working_dir: /app
command: bun migrator/server.js
environment:
MIGRATOR_CONFIG: /etc/coinosv3/config.json
volumes:
- .:/app:ro
- ${STATE}/migrator/config.json:/etc/coinosv3/config.json:ro
- ${STATE}/migrator/data:/data
ports:
- 127.0.0.1:8802:8802
networks: [net]
restart: unless-stopped
nwcpush:
image: ghcr.io/coinos/bun:1.4.3
container_name: nwcpush
working_dir: /app
command: bun nwcpush/server.js
environment:
NWCPUSH_CONFIG: /etc/coinosv3/config.json
volumes:
- .:/app:ro
- ${STATE}/nwcpush/config.json:/etc/coinosv3/config.json:ro
- ${STATE}/nwcpush/data:/data
ports:
- 127.0.0.1:8797:8797
networks: [net]
restart: unless-stopped
blossom:
image: ghcr.io/coinos/bun:1.4.3
container_name: blossom
working_dir: /app
command: bun blossom/server.js
environment:
BLOSSOM_DATA: /data
BLOSSOM_PORT: "8796"
BLOSSOM_HOST: blossom.coinos.io
volumes:
- .:/app:ro
- ${STATE}/blossom/data:/data
ports:
- 127.0.0.1:8796:8796
networks: [net]
restart: unless-stopped
# live streams sent from the app (live/server.js). ffmpeg comes with the
# vmedia image (vmedia/Dockerfile: `docker build -t vmedia vmedia/` on the host).
live:
image: vmedia
container_name: live
working_dir: /app
command: bun live/server.js
environment:
LIVE_DATA: /data
LIVE_PORT: "8795"
LIVE_BASE: https://v3.coinos.io/live
NAMES_URL: http://names:8798
LIVE_CONFIG: /etc/coinosv3/config.json
volumes:
- .:/app:ro
- ${STATE}/live/data:/data
- ${STATE}/live/config.json:/etc/coinosv3/config.json:ro
cpus: 4
mem_limit: 2g
networks: [net]
restart: unless-stopped
# messages.coinos.io: Magnitude Relay (Rust) for private messages and group
# chats. Its binary is built on the host (messages/README.md), not in the
# hook; host networking so it can sync from the strfry tunnel on 127.0.0.1.
messages:
image: debian:bookworm-slim
container_name: messages
command: /usr/local/bin/magnitude-relay --config /etc/magnitude-relay/relay.toml
volumes:
- ${STATE}/messages/bin/magnitude-relay:/usr/local/bin/magnitude-relay:ro
- ./messages/relay.toml:/etc/magnitude-relay/relay.toml:ro
- ${STATE}/messages/data:/data
network_mode: host
cpus: 2
mem_limit: 2g
stop_grace_period: 20s
restart: unless-stopped
networks:
net:
external: true
|