-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
80 lines (79 loc) · 2.95 KB
/
Copy pathdocker-compose.dev.yaml
File metadata and controls
80 lines (79 loc) · 2.95 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# RXinDexer Local Development Docker Compose
# Uses the production Dockerfile but mounts local code for live changes.
#
# Usage:
# docker compose -f docker-compose.dev.yaml up --build
# docker compose -f docker-compose.dev.yaml logs -f
# docker compose -f docker-compose.dev.yaml down
services:
electrumx:
build:
context: .
dockerfile: Dockerfile
container_name: rxindexer_dev
user: "root"
restart: unless-stopped
ports:
- "50010:50010" # TCP (ElectrumX protocol)
- "50011:50011" # WSS
- "50012:50012" # SSL
- "50020:50020" # WS (plain, for local browser apps / regtest dev)
- "8000:8000" # REST API
- "127.0.0.1:8001:8001" # Admin RPC (localhost only)
environment:
- DAEMON_URL=${DAEMON_URL}
- COIN=${COIN:-Radiant}
- NET=${NET:-mainnet}
- DB_ENGINE=${DB_ENGINE:-rocksdb}
- DB_DIRECTORY=${DB_DIRECTORY:-/data/electrumdb}
- SERVICES=${SERVICES:-tcp://0.0.0.0:50010,ssl://0.0.0.0:50012,wss://0.0.0.0:50011,rpc://127.0.0.1:8001}
- SSL_CERTFILE=${SSL_CERTFILE:-/data/electrumdb/server.crt}
- SSL_KEYFILE=${SSL_KEYFILE:-/data/electrumdb/server.key}
- REST_API_ENABLED=${REST_API_ENABLED:-1}
- REST_API_HOST=${REST_API_HOST:-0.0.0.0}
- REST_API_PORT=${REST_API_PORT:-8000}
- CACHE_MB=${CACHE_MB:-2000}
- MAX_SESSIONS=${MAX_SESSIONS:-10000}
- MAX_SEND=${MAX_SEND:-10000000}
- MAX_RECV=${MAX_RECV:-10000000}
- REQUEST_TIMEOUT=${REQUEST_TIMEOUT:-60}
- COST_SOFT_LIMIT=${COST_SOFT_LIMIT:-1000}
- COST_HARD_LIMIT=${COST_HARD_LIMIT:-10000}
- ALLOW_ROOT=${ALLOW_ROOT:-true}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- ELECTRUMX_ENV=dev
- ALLOWED_ORIGINS=*
# RXinDexer features
- GLYPH_INDEX=1
- WAVE_INDEX=1
- SWAP_INDEX=1
- GLYPH_SUBSCRIPTIONS=1
- MEMPOOL_GLYPH_INDEX=1
- MEMPOOL_SWAP_INDEX=1
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
# Persist database across restarts
- ./electrumdb:/data/electrumdb
# Mount local code over cloned repo for live development.
# The image clones into /opt/electrumx and runs with WORKDIR/PYTHONPATH=/opt/electrumx
# (see Dockerfile), so mounts MUST target /opt/electrumx/* — mounting under
# /root/electrumx/* lands off PYTHONPATH and the running process keeps using the
# baked GitHub clone, silently ignoring local edits.
- ./electrumx:/opt/electrumx/electrumx:ro
- ./electrumx_server:/opt/electrumx/electrumx_server:ro
- ./electrumx_rpc:/opt/electrumx/electrumx_rpc:ro
- ./electrumx_rest_api:/opt/electrumx/electrumx_rest_api:ro
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 50010 || exit 1"]
interval: 30s
timeout: 5s
retries: 5
start_period: 120s
stop_signal: SIGTERM
stop_grace_period: 180s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"