2024-08-13 14:48:30 +00:00
|
|
|
x-env_file: &env_file
|
|
|
|
- path: .env.development
|
|
|
|
required: true
|
|
|
|
- path: .env.local
|
|
|
|
required: false
|
2024-04-17 18:46:18 +00:00
|
|
|
x-healthcheck: &healthcheck
|
|
|
|
interval: 10s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 10
|
|
|
|
start_period: 1m
|
|
|
|
x-depends-on-db: &depends_on_db
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
|
|
|
x-depends-on-app: &depends_on_app
|
|
|
|
app:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
|
|
|
x-depends-on-bitcoin: &depends_on_bitcoin
|
|
|
|
bitcoin:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
|
|
|
|
2021-10-20 19:57:11 +00:00
|
|
|
services:
|
|
|
|
db:
|
|
|
|
container_name: db
|
2024-03-13 14:04:09 +00:00
|
|
|
build: ./docker/db
|
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2024-03-24 18:59:23 +00:00
|
|
|
test: ["CMD-SHELL", "PGPASSWORD=${POSTGRES_PASSWORD} pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB} -h 127.0.0.1 && psql -U ${POSTGRES_USER} ${POSTGRES_DB} -c 'SELECT 1 FROM users LIMIT 1'"]
|
2021-10-20 19:57:11 +00:00
|
|
|
expose:
|
|
|
|
- "5432"
|
|
|
|
ports:
|
|
|
|
- "5431:5432"
|
2024-04-17 18:46:18 +00:00
|
|
|
env_file: *env_file
|
2023-06-13 01:22:10 +00:00
|
|
|
volumes:
|
2024-03-13 14:04:09 +00:00
|
|
|
- ./docker/db/seed.sql:/docker-entrypoint-initdb.d/seed.sql
|
2023-06-13 01:22:10 +00:00
|
|
|
- db:/var/lib/postgresql/data
|
2024-03-13 14:04:09 +00:00
|
|
|
labels:
|
|
|
|
CONNECT: "localhost:5431"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_IMPORTANT}"
|
2024-11-07 15:03:54 +00:00
|
|
|
tor:
|
|
|
|
build:
|
|
|
|
context: ./docker/tor
|
|
|
|
container_name: tor
|
|
|
|
profiles:
|
|
|
|
- payments
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
|
|
- tordata:/tordata/
|
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
|
|
|
env_file: *env_file
|
|
|
|
healthcheck:
|
|
|
|
<<: *healthcheck
|
|
|
|
test: ["CMD-SHELL", "bash /tor.sh check"]
|
2021-10-20 19:57:11 +00:00
|
|
|
app:
|
|
|
|
container_name: app
|
2024-07-04 17:30:42 +00:00
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
2024-03-13 14:04:09 +00:00
|
|
|
build:
|
|
|
|
context: ./
|
|
|
|
args:
|
|
|
|
- UID=${CURRENT_UID}
|
|
|
|
- GID=${CURRENT_GID}
|
|
|
|
restart: unless-stopped
|
2023-04-25 21:30:28 +00:00
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2023-04-25 21:30:28 +00:00
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
2024-04-17 18:46:18 +00:00
|
|
|
depends_on: *depends_on_db
|
|
|
|
env_file: *env_file
|
2024-03-13 14:04:09 +00:00
|
|
|
expose:
|
|
|
|
- "3000"
|
2021-10-20 19:57:11 +00:00
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
volumes:
|
|
|
|
- ./:/app
|
2024-03-13 14:04:09 +00:00
|
|
|
labels:
|
|
|
|
CONNECT: "localhost:3000"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_IMPORTANT}"
|
2024-04-03 19:28:51 +00:00
|
|
|
capture:
|
|
|
|
container_name: capture
|
|
|
|
build:
|
|
|
|
context: ./capture
|
|
|
|
restart: unless-stopped
|
2024-04-17 18:46:18 +00:00
|
|
|
depends_on: *depends_on_app
|
2024-04-03 19:28:51 +00:00
|
|
|
profiles:
|
|
|
|
- capture
|
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2024-04-03 19:28:51 +00:00
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:5678/health"]
|
2024-04-17 18:46:18 +00:00
|
|
|
env_file: *env_file
|
2024-04-03 19:28:51 +00:00
|
|
|
environment:
|
|
|
|
# configure to screenshot production, because local dev is too slow
|
|
|
|
- CAPTURE_URL=http://stacker.news
|
|
|
|
expose:
|
|
|
|
- "5678"
|
|
|
|
ports:
|
|
|
|
- "5678:5678"
|
|
|
|
labels:
|
|
|
|
CONNECT: "localhost:5678"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2022-10-06 20:33:18 +00:00
|
|
|
worker:
|
|
|
|
container_name: worker
|
2024-03-13 14:04:09 +00:00
|
|
|
build:
|
2024-05-08 21:25:01 +00:00
|
|
|
context: ./worker
|
2024-03-13 14:04:09 +00:00
|
|
|
args:
|
|
|
|
- UID=${CURRENT_UID}
|
|
|
|
- GID=${CURRENT_GID}
|
|
|
|
restart: unless-stopped
|
2022-10-06 20:33:18 +00:00
|
|
|
depends_on:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<:
|
|
|
|
- *depends_on_db
|
|
|
|
- *depends_on_app
|
|
|
|
env_file: *env_file
|
2022-10-06 20:33:18 +00:00
|
|
|
volumes:
|
|
|
|
- ./:/app
|
|
|
|
entrypoint: ["/bin/sh", "-c"]
|
2023-04-25 21:30:28 +00:00
|
|
|
command:
|
2024-03-13 14:04:09 +00:00
|
|
|
- npm run worker:dev
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_IMPORTANT}"
|
2023-07-13 00:10:01 +00:00
|
|
|
imgproxy:
|
|
|
|
container_name: imgproxy
|
2024-03-16 02:15:49 +00:00
|
|
|
image: darthsim/imgproxy:v3.23.0
|
2024-03-18 01:43:34 +00:00
|
|
|
profiles:
|
|
|
|
- images
|
2023-07-13 00:10:01 +00:00
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2023-07-13 00:10:01 +00:00
|
|
|
test: [ "CMD", "imgproxy", "health" ]
|
2024-03-13 14:04:09 +00:00
|
|
|
restart: unless-stopped
|
2024-04-17 18:46:18 +00:00
|
|
|
env_file: *env_file
|
2024-03-13 14:04:09 +00:00
|
|
|
ports:
|
|
|
|
- "3001:8080"
|
2023-07-13 00:10:01 +00:00
|
|
|
expose:
|
|
|
|
- "8080"
|
2024-03-13 14:04:09 +00:00
|
|
|
labels:
|
|
|
|
- "CONNECT=localhost:3001"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2024-03-13 14:04:09 +00:00
|
|
|
s3:
|
|
|
|
container_name: s3
|
|
|
|
image: localstack/localstack:s3-latest
|
|
|
|
# healthcheck:
|
|
|
|
# test: ["CMD-SHELL", "awslocal", "s3", "ls", "s3://uploads"]
|
|
|
|
# interval: 10s
|
|
|
|
# timeout: 10s
|
|
|
|
# retries: 10
|
|
|
|
# start_period: 1m
|
|
|
|
restart: unless-stopped
|
2024-03-18 01:43:34 +00:00
|
|
|
profiles:
|
|
|
|
- images
|
2024-04-17 18:46:18 +00:00
|
|
|
env_file: *env_file
|
2024-03-13 14:04:09 +00:00
|
|
|
environment:
|
|
|
|
- DEBUG=1
|
2023-07-13 00:10:01 +00:00
|
|
|
ports:
|
2024-03-13 14:04:09 +00:00
|
|
|
- "4566:4566"
|
|
|
|
expose:
|
|
|
|
- "4566"
|
|
|
|
volumes:
|
|
|
|
- 's3:/var/lib/localstack'
|
|
|
|
- './docker/s3/init-s3.sh:/etc/localstack/init/ready.d/init-s3.sh'
|
|
|
|
- './docker/s3/cors.json:/etc/localstack/init/ready.d/cors.json'
|
|
|
|
labels:
|
|
|
|
- "CONNECT=localhost:4566"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2023-09-24 23:24:04 +00:00
|
|
|
opensearch:
|
2024-03-13 14:04:09 +00:00
|
|
|
image: opensearchproject/opensearch:2.12.0
|
2023-09-24 23:24:04 +00:00
|
|
|
container_name: opensearch
|
2024-03-18 01:43:34 +00:00
|
|
|
profiles:
|
|
|
|
- search
|
2024-03-13 14:04:09 +00:00
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2024-03-13 14:04:09 +00:00
|
|
|
test: ["CMD-SHELL", "curl -ku admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} --silent --fail localhost:9200/_cluster/health || exit 1"]
|
|
|
|
restart: unless-stopped
|
2024-04-17 18:46:18 +00:00
|
|
|
env_file: *env_file
|
2023-09-24 23:24:04 +00:00
|
|
|
environment:
|
2024-03-13 14:04:09 +00:00
|
|
|
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=mVchg1T5oA9wudUh
|
2024-08-01 00:44:08 +00:00
|
|
|
- plugins.security.disabled=true
|
|
|
|
- discovery.type=single-node
|
2023-09-24 23:24:04 +00:00
|
|
|
ports:
|
|
|
|
- 9200:9200 # REST API
|
|
|
|
- 9600:9600 # Performance Analyzer
|
|
|
|
volumes:
|
|
|
|
- os:/usr/share/opensearch/data
|
2024-03-13 14:04:09 +00:00
|
|
|
labels:
|
|
|
|
CONNECT: "localhost:9200"
|
2023-09-24 23:24:04 +00:00
|
|
|
command: >
|
|
|
|
bash -c '
|
|
|
|
set -m
|
|
|
|
/usr/share/opensearch/opensearch-docker-entrypoint.sh &
|
2024-03-13 14:04:09 +00:00
|
|
|
until curl -sS "http://localhost:9200/_cat/health?h=status" -ku admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} | grep -q "green\|yellow"; do
|
2023-09-24 23:24:04 +00:00
|
|
|
echo "Waiting for OpenSearch to start..."
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
echo "OpenSearch started."
|
2024-03-15 19:29:42 +00:00
|
|
|
curl \
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
-X PUT \
|
|
|
|
-d '{"mappings":{"properties":{"text":{"type":"text","analyzer":"english","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"title":{"type":"text","analyzer":"english","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}' \
|
|
|
|
"http://localhost:9200/item" \
|
|
|
|
-ku admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD}
|
2023-09-24 23:24:04 +00:00
|
|
|
echo "OpenSearch index created."
|
|
|
|
fg
|
|
|
|
'
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2023-09-24 23:24:04 +00:00
|
|
|
os-dashboard:
|
2024-03-13 14:04:09 +00:00
|
|
|
image: opensearchproject/opensearch-dashboards:2.12.0
|
2023-09-24 23:24:04 +00:00
|
|
|
container_name: os-dashboard
|
2024-03-13 14:04:09 +00:00
|
|
|
restart: unless-stopped
|
2024-03-18 01:43:34 +00:00
|
|
|
profiles:
|
|
|
|
- search
|
2024-03-13 14:04:09 +00:00
|
|
|
depends_on:
|
|
|
|
opensearch:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
2024-04-17 18:46:18 +00:00
|
|
|
env_file: *env_file
|
2023-09-24 23:24:04 +00:00
|
|
|
environment:
|
|
|
|
- opensearch.ssl.verificationMode=none
|
|
|
|
- OPENSEARCH_HOSTS=http://opensearch:9200
|
2024-03-13 14:04:09 +00:00
|
|
|
- server.ssl.enabled=false
|
2023-09-24 23:24:04 +00:00
|
|
|
ports:
|
|
|
|
- 5601:5601
|
|
|
|
links:
|
|
|
|
- opensearch
|
2024-03-13 14:04:09 +00:00
|
|
|
labels:
|
|
|
|
CONNECT: "localhost:5601"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2024-03-13 14:04:09 +00:00
|
|
|
bitcoin:
|
2024-08-13 14:48:30 +00:00
|
|
|
image: polarlightning/bitcoind:27.0
|
2024-03-13 14:04:09 +00:00
|
|
|
container_name: bitcoin
|
|
|
|
restart: unless-stopped
|
2024-03-18 01:43:34 +00:00
|
|
|
profiles:
|
|
|
|
- payments
|
2024-03-13 14:04:09 +00:00
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2024-03-13 14:04:09 +00:00
|
|
|
test: ["CMD-SHELL", "bitcoin-cli -chain=regtest -rpcport=${RPC_PORT} -rpcuser=${RPC_USER} -rpcpassword=${RPC_PASS} getblockchaininfo"]
|
|
|
|
command:
|
|
|
|
- 'bitcoind'
|
|
|
|
- '-server=1'
|
|
|
|
- '-regtest=1'
|
|
|
|
- '-rpcauth=${RPC_USER}:${RPC_AUTH}'
|
|
|
|
- '-debug=1'
|
|
|
|
- '-zmqpubrawblock=tcp://0.0.0.0:${ZMQ_BLOCK_PORT}'
|
|
|
|
- '-zmqpubrawtx=tcp://0.0.0.0:${ZMQ_TX_PORT}'
|
|
|
|
- '-txindex=1'
|
|
|
|
- '-dnsseed=0'
|
|
|
|
- '-upnp=0'
|
|
|
|
- '-rpcbind=0.0.0.0'
|
|
|
|
- '-rpcallowip=0.0.0.0/0'
|
|
|
|
- '-rpcport=${RPC_PORT}'
|
|
|
|
- '-rest'
|
|
|
|
- '-listen=1'
|
|
|
|
- '-listenonion=0'
|
|
|
|
- '-fallbackfee=0.0002'
|
|
|
|
- '-blockfilterindex=1'
|
|
|
|
- '-peerblockfilters=1'
|
2024-08-13 14:48:30 +00:00
|
|
|
- '-maxmempool=5'
|
2024-03-13 14:04:09 +00:00
|
|
|
expose:
|
|
|
|
- "${RPC_PORT}"
|
|
|
|
- "${P2P_PORT}"
|
|
|
|
- "${ZMQ_BLOCK_PORT}"
|
|
|
|
- "${ZMQ_TX_PORT}"
|
|
|
|
volumes:
|
|
|
|
- bitcoin:/home/bitcoin/.bitcoin
|
|
|
|
labels:
|
|
|
|
ofelia.enabled: "true"
|
|
|
|
ofelia.job-exec.minecron.schedule: "@every 1m"
|
|
|
|
ofelia.job-exec.minecron.command: >
|
|
|
|
bash -c '
|
2024-08-13 14:48:30 +00:00
|
|
|
bitcoin-cli () {
|
|
|
|
command bitcoin-cli -chain=regtest -rpcport=${RPC_PORT} -rpcuser=${RPC_USER} -rpcpassword=${RPC_PASS} "$$@"
|
|
|
|
}
|
|
|
|
blockcount=$$(bitcoin-cli getblockcount 2>/dev/null)
|
|
|
|
nodes=(${LND_ADDR} ${STACKER_LND_ADDR} ${STACKER_CLN_ADDR})
|
2024-03-13 14:04:09 +00:00
|
|
|
if (( blockcount <= 0 )); then
|
2024-08-13 14:48:30 +00:00
|
|
|
echo "Creating wallet and address..."
|
|
|
|
bitcoin-cli createwallet ""
|
|
|
|
nodes+=($$(bitcoin-cli getnewaddress))
|
2024-11-09 21:52:04 +00:00
|
|
|
echo "Mining 100 blocks to sn_lnd, lnd, cln..."
|
2024-08-13 14:48:30 +00:00
|
|
|
for addr in "$${nodes[@]}"; do
|
|
|
|
bitcoin-cli generatetoaddress 100 $$addr
|
|
|
|
echo "Mining 100 blocks to a random address..."
|
|
|
|
bitcoin-cli generatetoaddress 100 $$(bitcoin-cli getnewaddress)
|
|
|
|
done
|
2024-03-13 14:04:09 +00:00
|
|
|
else
|
2024-08-13 14:48:30 +00:00
|
|
|
echo "generating txs for fee rate estimation..."
|
|
|
|
while true
|
|
|
|
do
|
|
|
|
i=0
|
|
|
|
range=$$(( $$RANDOM % 11 + 20 ))
|
|
|
|
while [ $$i -lt $$range ]
|
|
|
|
do
|
|
|
|
address=$$(bitcoin-cli getnewaddress)
|
|
|
|
bitcoin-cli -named sendtoaddress address=$$address amount=0.01 fee_rate=$$(( $$RANDOM % 25 + 1 ))
|
|
|
|
((++i))
|
|
|
|
done
|
|
|
|
echo "generating block..."
|
|
|
|
bitcoin-cli generatetoaddress 1 "$${nodes[ $$RANDOM % $${#nodes[@]} ]}"
|
|
|
|
if [[ $$(bitcoin-cli estimatesmartfee 6) =~ "\\"feerate\\":" ]]; then
|
|
|
|
echo "fee estimation succeeded..."
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2024-03-13 14:04:09 +00:00
|
|
|
fi
|
|
|
|
'
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_MODERATE}"
|
2024-03-13 14:04:09 +00:00
|
|
|
sn_lnd:
|
|
|
|
build:
|
|
|
|
context: ./docker/lnd
|
|
|
|
args:
|
|
|
|
- LN_NODE_FOR=sn
|
|
|
|
container_name: sn_lnd
|
|
|
|
restart: unless-stopped
|
2024-03-18 01:43:34 +00:00
|
|
|
profiles:
|
|
|
|
- payments
|
2024-03-13 14:04:09 +00:00
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2024-03-13 14:04:09 +00:00
|
|
|
test: ["CMD-SHELL", "lncli", "getinfo"]
|
2024-04-17 18:46:18 +00:00
|
|
|
depends_on: *depends_on_bitcoin
|
|
|
|
env_file: *env_file
|
2024-03-13 14:04:09 +00:00
|
|
|
command:
|
|
|
|
- 'lnd'
|
|
|
|
- '--noseedbackup'
|
|
|
|
- '--trickledelay=5000'
|
|
|
|
- '--alias=sn_lnd'
|
|
|
|
- '--externalip=sn_lnd'
|
|
|
|
- '--tlsextradomain=sn_lnd'
|
|
|
|
- '--tlsextradomain=host.docker.internal'
|
2024-03-25 17:18:32 +00:00
|
|
|
- '--listen=0.0.0.0:9735'
|
|
|
|
- '--rpclisten=0.0.0.0:10009'
|
|
|
|
- '--restlisten=0.0.0.0:8080'
|
2024-03-13 14:04:09 +00:00
|
|
|
- '--bitcoin.active'
|
|
|
|
- '--bitcoin.regtest'
|
|
|
|
- '--bitcoin.node=bitcoind'
|
|
|
|
- '--bitcoind.rpchost=bitcoin'
|
|
|
|
- '--bitcoind.rpcuser=${RPC_USER}'
|
|
|
|
- '--bitcoind.rpcpass=${RPC_PASS}'
|
|
|
|
- '--bitcoind.zmqpubrawblock=tcp://bitcoin:${ZMQ_BLOCK_PORT}'
|
|
|
|
- '--bitcoind.zmqpubrawtx=tcp://bitcoin:${ZMQ_TX_PORT}'
|
|
|
|
- '--protocol.wumbo-channels'
|
|
|
|
- '--maxchansize=1000000000'
|
|
|
|
- '--allow-circular-route'
|
|
|
|
- '--bitcoin.defaultchanconfs=1'
|
|
|
|
- '--maxpendingchannels=10'
|
|
|
|
expose:
|
2024-03-25 17:18:32 +00:00
|
|
|
- "9735"
|
2024-03-13 14:04:09 +00:00
|
|
|
ports:
|
2024-03-25 17:18:32 +00:00
|
|
|
- "${LND_REST_PORT}:8080"
|
|
|
|
- "${LND_GRPC_PORT}:10009"
|
2024-03-13 14:04:09 +00:00
|
|
|
volumes:
|
|
|
|
- sn_lnd:/home/lnd/.lnd
|
|
|
|
labels:
|
2024-11-09 21:52:04 +00:00
|
|
|
CLI: "lncli"
|
|
|
|
CLI_USER: "lnd"
|
2024-03-13 14:04:09 +00:00
|
|
|
ofelia.enabled: "true"
|
|
|
|
ofelia.job-exec.sn_channel_cron.schedule: "@every 1m"
|
|
|
|
ofelia.job-exec.sn_channel_cron.command: >
|
|
|
|
su lnd -c bash -c "
|
|
|
|
if [ $$(lncli getinfo | jq '.num_active_channels + .num_pending_channels') -ge 3 ]; then
|
|
|
|
exit 0
|
|
|
|
else
|
2024-11-09 21:52:04 +00:00
|
|
|
lncli openchannel --node_key=$STACKER_LND_PUBKEY --connect lnd:9735 --sat_per_vbyte 1 \\
|
2024-03-13 14:04:09 +00:00
|
|
|
--min_confs 0 --local_amt=1000000000 --push_amt=500000000
|
|
|
|
fi
|
|
|
|
"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_MODERATE}"
|
2024-11-09 21:52:04 +00:00
|
|
|
lnd:
|
2024-03-13 14:04:09 +00:00
|
|
|
build:
|
|
|
|
context: ./docker/lnd
|
|
|
|
args:
|
|
|
|
- LN_NODE_FOR=stacker
|
2024-11-09 21:52:04 +00:00
|
|
|
container_name: lnd
|
2024-03-13 14:04:09 +00:00
|
|
|
restart: unless-stopped
|
2024-03-18 01:43:34 +00:00
|
|
|
profiles:
|
|
|
|
- payments
|
2024-03-13 14:04:09 +00:00
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2024-03-13 14:04:09 +00:00
|
|
|
test: ["CMD-SHELL", "lncli", "getinfo"]
|
2024-11-07 15:03:54 +00:00
|
|
|
depends_on:
|
|
|
|
tor:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
|
|
|
<<: *depends_on_bitcoin
|
2024-04-17 18:46:18 +00:00
|
|
|
env_file: *env_file
|
2024-11-07 15:03:54 +00:00
|
|
|
entrypoint: /tor-entrypoint
|
2024-03-13 14:04:09 +00:00
|
|
|
command:
|
|
|
|
- 'lnd'
|
|
|
|
- '--noseedbackup'
|
|
|
|
- '--trickledelay=5000'
|
2024-11-09 21:52:04 +00:00
|
|
|
- '--alias=lnd'
|
|
|
|
- '--externalip=lnd'
|
|
|
|
- '--tlsextradomain=lnd'
|
2024-03-13 14:04:09 +00:00
|
|
|
- '--tlsextradomain=host.docker.internal'
|
2024-11-07 15:03:54 +00:00
|
|
|
- '--tlsextradomain=$${ONION_DOMAIN}'
|
2024-03-25 17:18:32 +00:00
|
|
|
- '--listen=0.0.0.0:9735'
|
|
|
|
- '--rpclisten=0.0.0.0:10009'
|
2024-04-27 02:22:30 +00:00
|
|
|
- '--rpcmiddleware.enable'
|
2024-03-25 17:18:32 +00:00
|
|
|
- '--restlisten=0.0.0.0:8080'
|
2024-03-13 14:04:09 +00:00
|
|
|
- '--bitcoin.active'
|
|
|
|
- '--bitcoin.regtest'
|
|
|
|
- '--bitcoin.node=bitcoind'
|
|
|
|
- '--bitcoind.rpchost=bitcoin'
|
|
|
|
- '--bitcoind.rpcuser=${RPC_USER}'
|
|
|
|
- '--bitcoind.rpcpass=${RPC_PASS}'
|
|
|
|
- '--bitcoind.zmqpubrawblock=tcp://bitcoin:${ZMQ_BLOCK_PORT}'
|
|
|
|
- '--bitcoind.zmqpubrawtx=tcp://bitcoin:${ZMQ_TX_PORT}'
|
|
|
|
- '--protocol.wumbo-channels'
|
|
|
|
- '--maxchansize=1000000000'
|
|
|
|
- '--allow-circular-route'
|
|
|
|
- '--bitcoin.defaultchanconfs=1'
|
|
|
|
- '--maxpendingchannels=10'
|
|
|
|
expose:
|
2024-03-25 17:18:32 +00:00
|
|
|
- "9735"
|
2024-04-27 02:22:30 +00:00
|
|
|
- "10009"
|
2024-03-13 14:04:09 +00:00
|
|
|
ports:
|
2024-03-25 17:18:32 +00:00
|
|
|
- "${STACKER_LND_REST_PORT}:8080"
|
|
|
|
- "${STACKER_LND_GRPC_PORT}:10009"
|
2024-03-13 14:04:09 +00:00
|
|
|
volumes:
|
2024-11-09 21:52:04 +00:00
|
|
|
- lnd:/home/lnd/.lnd
|
2024-11-07 15:03:54 +00:00
|
|
|
- tordata:/home/lnd/.tor
|
2024-03-13 14:04:09 +00:00
|
|
|
labels:
|
2024-11-09 21:52:04 +00:00
|
|
|
TORDIR: "/home/lnd/.tor"
|
|
|
|
CERTDIR: "/home/lnd/.lnd"
|
|
|
|
CLI: "lncli"
|
|
|
|
CLI_USER: "lnd"
|
2024-03-13 14:04:09 +00:00
|
|
|
ofelia.enabled: "true"
|
2024-11-09 21:52:04 +00:00
|
|
|
ofelia.job-exec.lnd_channel_cron.schedule: "@every 1m"
|
|
|
|
ofelia.job-exec.lnd_channel_cron.command: >
|
2024-03-13 14:04:09 +00:00
|
|
|
su lnd -c bash -c "
|
|
|
|
if [ $$(lncli getinfo | jq '.num_active_channels + .num_pending_channels') -ge 3 ]; then
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
lncli openchannel --node_key=$LND_PUBKEY --connect sn_lnd:9735 --sat_per_vbyte 1 \\
|
|
|
|
--min_confs 0 --local_amt=1000000000 --push_amt=500000000
|
|
|
|
fi
|
|
|
|
"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_MODERATE}"
|
2024-04-27 02:22:30 +00:00
|
|
|
litd:
|
|
|
|
container_name: litd
|
2024-06-25 01:28:42 +00:00
|
|
|
build:
|
|
|
|
context: ./docker/litd
|
2024-04-27 02:22:30 +00:00
|
|
|
profiles:
|
2024-07-09 16:37:55 +00:00
|
|
|
- wallets
|
2024-04-27 02:22:30 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
|
|
|
<<: *healthcheck
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:8443"]
|
|
|
|
depends_on:
|
2024-11-09 21:52:04 +00:00
|
|
|
lnd:
|
2024-04-27 02:22:30 +00:00
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
|
|
|
volumes:
|
2024-11-09 21:52:04 +00:00
|
|
|
- lnd:/lnd
|
2024-04-27 02:22:30 +00:00
|
|
|
ports:
|
|
|
|
- "8443:8443"
|
|
|
|
command:
|
|
|
|
- 'litd'
|
|
|
|
- '--httpslisten=0.0.0.0:8444'
|
|
|
|
- '--insecure-httplisten=0.0.0.0:8443'
|
|
|
|
- '--uipassword=password'
|
|
|
|
- '--lnd-mode=remote'
|
|
|
|
- '--network=regtest'
|
|
|
|
- '--remote.lit-debuglevel=debug'
|
2024-11-09 21:52:04 +00:00
|
|
|
- '--remote.lnd.rpcserver=lnd:10009'
|
2024-04-27 02:22:30 +00:00
|
|
|
- '--remote.lnd.macaroonpath=/lnd/data/chain/bitcoin/regtest/admin.macaroon'
|
|
|
|
- '--remote.lnd.tlscertpath=/lnd/tls.cert'
|
|
|
|
- '--autopilot.disable'
|
|
|
|
- '--pool.auctionserver=test.pool.lightning.finance:12010'
|
|
|
|
- '--loop.server.host=test.swap.lightning.today:11010'
|
2024-05-04 23:06:15 +00:00
|
|
|
labels:
|
|
|
|
CONNECT: "localhost:8443"
|
2024-11-09 21:52:04 +00:00
|
|
|
CLI: "litcli"
|
|
|
|
CLI_ARGS: "-n regtest --rpcserver localhost:8444"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_MODERATE}"
|
2024-11-09 21:52:04 +00:00
|
|
|
cln:
|
2024-04-14 22:34:21 +00:00
|
|
|
build:
|
|
|
|
context: ./docker/cln
|
2024-11-09 21:52:04 +00:00
|
|
|
container_name: cln
|
2024-04-14 22:34:21 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
profiles:
|
|
|
|
- payments
|
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2024-04-14 22:34:21 +00:00
|
|
|
test: ["CMD-SHELL", "su clightning -c 'lightning-cli --network=regtest getinfo'"]
|
2024-11-07 15:03:54 +00:00
|
|
|
depends_on:
|
|
|
|
tor:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
|
|
|
<<: *depends_on_bitcoin
|
2024-04-17 18:46:18 +00:00
|
|
|
env_file: *env_file
|
2024-04-14 22:34:21 +00:00
|
|
|
command:
|
|
|
|
- 'lightningd'
|
|
|
|
- '--network=regtest'
|
2024-11-09 21:52:04 +00:00
|
|
|
- '--alias=cln'
|
2024-04-14 22:34:21 +00:00
|
|
|
- '--bitcoin-rpcconnect=bitcoin'
|
|
|
|
- '--bitcoin-rpcuser=${RPC_USER}'
|
|
|
|
- '--bitcoin-rpcpassword=${RPC_PASS}'
|
|
|
|
- '--large-channels'
|
|
|
|
- '--rest-port=3010'
|
|
|
|
- '--rest-host=0.0.0.0'
|
|
|
|
- '--log-file=/home/clightning/.lightning/debug.log'
|
|
|
|
expose:
|
|
|
|
- "9735"
|
|
|
|
ports:
|
|
|
|
- "${STACKER_CLN_REST_PORT}:3010"
|
|
|
|
volumes:
|
2024-11-09 21:52:04 +00:00
|
|
|
- cln:/home/clightning/.lightning
|
2024-11-07 15:03:54 +00:00
|
|
|
- tordata:/home/clightning/.tor
|
2024-04-14 22:34:21 +00:00
|
|
|
labels:
|
2024-11-09 21:52:04 +00:00
|
|
|
TORDIR: "/home/clightning/.tor"
|
|
|
|
CLI: "lightning-cli"
|
|
|
|
CLI_USER: "clightning"
|
|
|
|
CLI_ARGS: "--regtest"
|
2024-04-14 22:34:21 +00:00
|
|
|
ofelia.enabled: "true"
|
2024-11-09 21:52:04 +00:00
|
|
|
ofelia.job-exec.cln_channel_cron.schedule: "@every 1m"
|
|
|
|
ofelia.job-exec.cln_channel_cron.command: >
|
2024-04-14 22:34:21 +00:00
|
|
|
su clightning -c bash -c "
|
|
|
|
if [ $$(lightning-cli --regtest getinfo | jq '.num_active_channels + .num_pending_channels') -ge 3 ]; then
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
lightning-cli --regtest connect $LND_PUBKEY@sn_lnd:9735
|
|
|
|
lightning-cli --regtest fundchannel id=$LND_PUBKEY feerate=1000perkb \\
|
|
|
|
amount=1000000000 push_msat=500000000000 minconf=0
|
|
|
|
fi
|
|
|
|
"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_MODERATE}"
|
2024-03-13 14:04:09 +00:00
|
|
|
channdler:
|
|
|
|
image: mcuadros/ofelia:latest
|
|
|
|
container_name: channdler
|
2024-03-18 01:43:34 +00:00
|
|
|
profiles:
|
|
|
|
- payments
|
2024-03-13 14:04:09 +00:00
|
|
|
depends_on:
|
|
|
|
- bitcoin
|
|
|
|
- sn_lnd
|
2024-11-09 21:52:04 +00:00
|
|
|
- lnd
|
|
|
|
- cln
|
2024-03-13 14:04:09 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
command: daemon --docker -f label=com.docker.compose.project=${COMPOSE_PROJECT_NAME}
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2024-03-20 21:41:25 +00:00
|
|
|
mailhog:
|
|
|
|
image: mailhog/mailhog:latest
|
|
|
|
container_name: mailhog
|
2024-03-21 12:16:29 +00:00
|
|
|
profiles:
|
|
|
|
- email
|
2024-03-20 21:41:25 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
2024-04-17 18:46:18 +00:00
|
|
|
<<: *healthcheck
|
2024-03-25 12:26:45 +00:00
|
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8025"]
|
2024-03-20 21:41:25 +00:00
|
|
|
ports:
|
|
|
|
- "8025:8025"
|
|
|
|
- "1025:1025"
|
|
|
|
links:
|
|
|
|
- app
|
2024-05-04 23:06:15 +00:00
|
|
|
labels:
|
|
|
|
CONNECT: "localhost:8025"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2024-10-01 14:14:29 +00:00
|
|
|
nwc_send:
|
2024-10-05 18:57:55 +00:00
|
|
|
image: ghcr.io/benthecarman/nostr-wallet-connect-lnd:master
|
2024-10-01 14:14:29 +00:00
|
|
|
container_name: nwc_send
|
2024-05-15 15:10:24 +00:00
|
|
|
profiles:
|
2024-07-09 16:37:55 +00:00
|
|
|
- wallets
|
2024-05-15 15:10:24 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
2024-11-09 21:52:04 +00:00
|
|
|
lnd:
|
2024-05-15 15:10:24 +00:00
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
|
|
|
volumes:
|
2024-10-05 18:57:55 +00:00
|
|
|
- nwc_send:/app
|
2024-11-09 21:52:04 +00:00
|
|
|
- lnd:/app/.lnd
|
2024-05-15 15:10:24 +00:00
|
|
|
environment:
|
|
|
|
- RUST_LOG=info
|
|
|
|
entrypoint:
|
2024-10-05 18:57:55 +00:00
|
|
|
- './nostr-wallet-connect-lnd'
|
2024-05-15 15:10:24 +00:00
|
|
|
- '--relay'
|
2024-08-28 14:32:29 +00:00
|
|
|
- 'wss://relay.primal.net'
|
2024-10-05 18:57:55 +00:00
|
|
|
- '--macaroon-file'
|
2024-11-07 15:03:54 +00:00
|
|
|
- '/app/.lnd/data/chain/bitcoin/regtest/admin.macaroon'
|
2024-05-15 15:10:24 +00:00
|
|
|
- '--cert-file'
|
2024-10-05 18:57:55 +00:00
|
|
|
- '/app/.lnd/tls.cert'
|
2024-05-15 15:10:24 +00:00
|
|
|
- '--lnd-host'
|
2024-11-09 21:52:04 +00:00
|
|
|
- 'lnd'
|
2024-05-15 15:10:24 +00:00
|
|
|
- '--lnd-port'
|
|
|
|
- '10009'
|
2024-06-12 13:34:24 +00:00
|
|
|
- '--max-amount'
|
|
|
|
- '0'
|
|
|
|
- '--daily-limit'
|
|
|
|
- '0'
|
2024-10-01 14:14:29 +00:00
|
|
|
- '--keys-file'
|
2024-10-05 18:57:55 +00:00
|
|
|
- 'keys-file.json'
|
2024-10-01 14:14:29 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
|
|
|
nwc_recv:
|
2024-10-05 18:57:55 +00:00
|
|
|
image: ghcr.io/benthecarman/nostr-wallet-connect-lnd:master
|
2024-10-01 14:14:29 +00:00
|
|
|
container_name: nwc_recv
|
|
|
|
profiles:
|
|
|
|
- wallets
|
|
|
|
restart: unless-stopped
|
|
|
|
depends_on:
|
2024-11-09 21:52:04 +00:00
|
|
|
lnd:
|
2024-10-01 14:14:29 +00:00
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
|
|
|
volumes:
|
2024-10-05 18:57:55 +00:00
|
|
|
- nwc_recv:/app
|
2024-11-09 21:52:04 +00:00
|
|
|
- lnd:/app/.lnd
|
2024-10-01 14:14:29 +00:00
|
|
|
environment:
|
|
|
|
- RUST_LOG=info
|
|
|
|
entrypoint:
|
2024-10-05 18:57:55 +00:00
|
|
|
- './nostr-wallet-connect-lnd'
|
2024-10-01 14:14:29 +00:00
|
|
|
- '--relay'
|
|
|
|
- 'wss://relay.primal.net'
|
|
|
|
- '--invoice-macaroon-file'
|
2024-11-07 15:03:54 +00:00
|
|
|
- '/app/.lnd/data/chain/bitcoin/regtest/invoice.macaroon'
|
2024-10-01 14:14:29 +00:00
|
|
|
- '--cert-file'
|
2024-10-05 18:57:55 +00:00
|
|
|
- '/app/.lnd/tls.cert'
|
2024-10-01 14:14:29 +00:00
|
|
|
- '--lnd-host'
|
2024-11-09 21:52:04 +00:00
|
|
|
- 'lnd'
|
2024-10-01 14:14:29 +00:00
|
|
|
- '--lnd-port'
|
|
|
|
- '10009'
|
|
|
|
- '--max-amount'
|
|
|
|
- '0'
|
|
|
|
- '--daily-limit'
|
|
|
|
- '0'
|
|
|
|
- '--keys-file'
|
2024-10-05 18:57:55 +00:00
|
|
|
- 'keys-file.json'
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2024-05-15 15:09:15 +00:00
|
|
|
lnbits:
|
2024-10-01 01:53:24 +00:00
|
|
|
build:
|
|
|
|
context: ./docker/lnbits
|
2024-05-15 15:09:15 +00:00
|
|
|
container_name: lnbits
|
|
|
|
profiles:
|
2024-07-09 16:37:55 +00:00
|
|
|
- wallets
|
2024-05-15 15:09:15 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- "${LNBITS_WEB_PORT}:5000"
|
|
|
|
depends_on:
|
2024-11-07 15:03:54 +00:00
|
|
|
tor:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
2024-11-09 21:52:04 +00:00
|
|
|
lnd:
|
2024-11-07 15:03:54 +00:00
|
|
|
condition: service_healthy
|
|
|
|
restart: true
|
2024-05-15 15:09:15 +00:00
|
|
|
environment:
|
2024-10-01 01:53:24 +00:00
|
|
|
- LNBITS_ADMIN_UI=true
|
2024-05-15 15:09:15 +00:00
|
|
|
- LNBITS_BACKEND_WALLET_CLASS=LndWallet
|
2024-11-09 21:52:04 +00:00
|
|
|
- LND_GRPC_ENDPOINT=lnd
|
2024-05-15 15:09:15 +00:00
|
|
|
- LND_GRPC_PORT=10009
|
|
|
|
- LND_GRPC_CERT=/app/.lnd/tls.cert
|
2024-11-07 15:03:54 +00:00
|
|
|
- LND_GRPC_MACAROON=/app/.lnd/data/chain/bitcoin/regtest/admin.macaroon
|
2024-05-15 15:09:15 +00:00
|
|
|
volumes:
|
2024-11-09 21:52:04 +00:00
|
|
|
- lnd:/app/.lnd
|
2024-11-07 15:03:54 +00:00
|
|
|
- tordata:/app/.tor
|
2024-08-12 22:23:39 +00:00
|
|
|
labels:
|
|
|
|
CONNECT: "localhost:${LNBITS_WEB_PORT}"
|
2024-11-09 21:52:04 +00:00
|
|
|
TORDIR: "/app/.tor"
|
2024-08-11 21:29:46 +00:00
|
|
|
cpu_shares: "${CPU_SHARES_LOW}"
|
2023-06-13 01:22:10 +00:00
|
|
|
volumes:
|
2023-09-24 23:24:04 +00:00
|
|
|
db:
|
|
|
|
os:
|
2024-03-13 14:04:09 +00:00
|
|
|
bitcoin:
|
|
|
|
sn_lnd:
|
2024-11-09 21:52:04 +00:00
|
|
|
lnd:
|
|
|
|
cln:
|
2024-03-13 14:04:09 +00:00
|
|
|
s3:
|
2024-10-05 18:57:55 +00:00
|
|
|
nwc_send:
|
|
|
|
nwc_recv:
|
2024-11-07 15:03:54 +00:00
|
|
|
tordata:
|