Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ labels = {
'40swapd-carol',
'40swap-backend',
],

'grafana': [
'grafana',
],
}

for (label, services) in labels.items():
Expand All @@ -50,5 +54,7 @@ for (label, services) in labels.items():
dc_resource(s, auto_init=False, labels = [label])
elif label == '40swap':
dc_resource(s, auto_init=False, labels = [label])
elif label == 'grafana':
dc_resource(s, auto_init=False, labels = [label])
else:
dc_resource(s, labels = [label])
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ include:
- ./docker/loop/docker-compose.yml
- ./docker/mempool/docker-compose.yml
- ./docker/40swap/docker-compose.yml
- ./docker/grafana/docker-compose.yml
15 changes: 15 additions & 0 deletions docker/bitcoin/.justfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,18 @@ addinvoice amount:
payinvoice invoice:
just lncli payinvoice {{invoice}} -f

# Generate payments from Alice to Carol via Bob every 5s
generate-payments:
#!/usr/bin/env bash
echo "Generating payments: Alice → Bob → Carol every 5s (Ctrl+C to stop)"
while true; do
INVOICE=$(docker exec polar-n1-carol lncli --network regtest -lnddir /root/.lnd/ addinvoice --amt 1000 | jq -r .payment_request)
if [ -n "$INVOICE" ] && [ "$INVOICE" != "null" ]; then
echo "$(date): Paying 1000 sats Alice → Carol via Bob"
docker exec polar-n1-alice lncli --network regtest -lnddir /root/.lnd/ payinvoice --force "$INVOICE"
else
echo "$(date): Failed to create invoice on Carol, retrying..."
fi
sleep 5
done

2 changes: 1 addition & 1 deletion docker/bitcoin/docker-compose.polar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: polar

x-lnd-node: &lnd-node
profiles: [polar]
image: lightninglabs/lndinit:v0.1.28-beta-lnd-v0.19.0-beta
image: lightninglabs/lndinit:v0.1.34-beta-lnd-v0.20.1-beta
environment:
USERID: ${USERID:-1000}
GROUPID: ${GROUPID:-1000}
Expand Down
8 changes: 5 additions & 3 deletions docker/bitcoin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ lncli $ALICE openchannel --connect $BOB:9735 $BOB_PUBKEY --local_amt 16000000 --
echo "Opening a channel from Bob to Carol"
lncli $BOB openchannel --connect $CAROL:9735 $CAROL_PUBKEY --local_amt 16000000 --push_amt 8000000

echo "Opening a channel from Carol to Alice"
lncli $CAROL openchannel --connect $ALICE:9735 $ALICE_PUBKEY --local_amt 16000000 --push_amt 8000000

echo "Confirming channels"
bitcoin_cli -generate 6 > /dev/null

echo "Setting inbound fees on Bob's channels"


lncli $BOB updatechanpolicy --base_fee_msat 0 --fee_rate_ppm 1000 --time_lock_delta 40 --inbound_fee_rate_ppm -1000 --inbound_base_fee_msat 0
21 changes: 21 additions & 0 deletions docker/grafana/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: grafana

services:
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
volumes:
- grafana_data:/var/lib/grafana
- ./provisioning:/etc/grafana/provisioning

volumes:
grafana_data:
11 changes: 11 additions & 0 deletions docker/grafana/provisioning/dashboards/dashboards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: 1

providers:
- name: 'NodeGuard Dashboards'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /etc/grafana/provisioning/dashboards
Loading
Loading