2026-01-24 22:01:51 +00:00
|
|
|
app:
|
|
|
|
|
id: bitcoin-core
|
2026-04-30 16:29:56 -04:00
|
|
|
name: Bitcoin Core
|
2026-04-22 08:29:56 -04:00
|
|
|
version: 28.4.0
|
2026-04-30 16:29:56 -04:00
|
|
|
description: Reference Bitcoin Core node with dynamic prune/full-mode startup based on host disk.
|
2026-04-28 15:00:58 -04:00
|
|
|
|
2026-04-30 16:29:56 -04:00
|
|
|
container_name: bitcoin-core
|
2026-04-22 08:29:56 -04:00
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
container:
|
2026-04-30 16:29:56 -04:00
|
|
|
image: 146.59.87.168:3000/lfg2025/bitcoin:28.4
|
2026-04-28 15:00:58 -04:00
|
|
|
pull_policy: if-not-present
|
|
|
|
|
network: archy-net
|
|
|
|
|
entrypoint: ["sh", "-lc"]
|
|
|
|
|
custom_args:
|
2026-04-29 15:47:51 -04:00
|
|
|
# Sync-speed flags: -par=0 uses every core (was capped at 2 by
|
|
|
|
|
# --cpus=2, now removed for bitcoin/electrumx). -dbcache sized to
|
|
|
|
|
# the IBD sweet spot — 4GB on full nodes, 1GB on pruned. Container
|
|
|
|
|
# --memory=8g (config.rs::get_memory_limit) leaves headroom for
|
|
|
|
|
# mempool + connections.
|
2026-04-28 15:00:58 -04:00
|
|
|
- >-
|
|
|
|
|
if [ "${DISK_GB:-0}" -lt 1000 ]; then
|
2026-04-29 15:47:51 -04:00
|
|
|
exec bitcoind -server=1 -prune=550 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0:8332 -listen=1 -bind=0.0.0.0:8333 -dbcache=1024 -par=0 -maxconnections=125 -rpcuser="${BITCOIN_RPC_USER}" -rpcpassword="${BITCOIN_RPC_PASS}";
|
2026-04-28 15:00:58 -04:00
|
|
|
else
|
2026-04-29 15:47:51 -04:00
|
|
|
exec bitcoind -server=1 -txindex=1 -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0:8332 -listen=1 -bind=0.0.0.0:8333 -dbcache=4096 -par=0 -maxconnections=125 -rpcuser="${BITCOIN_RPC_USER}" -rpcpassword="${BITCOIN_RPC_PASS}";
|
2026-04-28 15:00:58 -04:00
|
|
|
fi
|
|
|
|
|
derived_env:
|
|
|
|
|
- key: DISK_GB
|
|
|
|
|
template: "{{DISK_GB}}"
|
|
|
|
|
secret_env:
|
|
|
|
|
- key: BITCOIN_RPC_PASS
|
|
|
|
|
secret_file: bitcoin-rpc-password
|
|
|
|
|
data_uid: "100101:100101"
|
|
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
dependencies:
|
2026-04-28 15:00:58 -04:00
|
|
|
- storage: 500Gi
|
|
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
resources:
|
2026-04-28 15:00:58 -04:00
|
|
|
cpu_limit: 0
|
|
|
|
|
memory_limit: 4Gi
|
2026-01-24 22:01:51 +00:00
|
|
|
disk_limit: 500Gi
|
2026-04-28 15:00:58 -04:00
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
security:
|
2026-04-28 15:00:58 -04:00
|
|
|
capabilities: [CHOWN, FOWNER, SETUID, SETGID, DAC_OVERRIDE]
|
|
|
|
|
readonly_root: false
|
2026-01-24 22:01:51 +00:00
|
|
|
network_policy: isolated
|
2026-04-28 15:00:58 -04:00
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
ports:
|
|
|
|
|
- host: 8332
|
|
|
|
|
container: 8332
|
2026-04-28 15:00:58 -04:00
|
|
|
protocol: tcp
|
2026-01-24 22:01:51 +00:00
|
|
|
- host: 8333
|
|
|
|
|
container: 8333
|
2026-04-28 15:00:58 -04:00
|
|
|
protocol: tcp
|
|
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
volumes:
|
|
|
|
|
- type: bind
|
|
|
|
|
source: /var/lib/archipelago/bitcoin
|
|
|
|
|
target: /home/bitcoin/.bitcoin
|
|
|
|
|
options: [rw]
|
2026-04-28 15:00:58 -04:00
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
environment:
|
2026-04-28 15:00:58 -04:00
|
|
|
- BITCOIN_RPC_USER=archipelago
|
|
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
health_check:
|
2026-04-28 15:00:58 -04:00
|
|
|
type: tcp
|
|
|
|
|
endpoint: localhost:8332
|
2026-01-24 22:01:51 +00:00
|
|
|
interval: 30s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 3
|
2026-04-28 15:00:58 -04:00
|
|
|
|
2026-01-24 22:01:51 +00:00
|
|
|
bitcoin_integration:
|
|
|
|
|
rpc_access: admin
|
|
|
|
|
sync_required: true
|
2026-04-28 15:00:58 -04:00
|
|
|
testnet_support: false
|
2026-01-24 22:01:51 +00:00
|
|
|
pruning_support: true
|