feat(docker): add --machine flag to launch ATM with dev.sh up
Usage: ./dev.sh up --fund --machine Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
bf8f9c3a22
commit
9a4dc759f8
1 changed files with 12 additions and 0 deletions
|
|
@ -11,6 +11,8 @@
|
||||||
# ./dev.sh up # Start everything
|
# ./dev.sh up # Start everything
|
||||||
# ./dev.sh up --fund # Start and auto-fund ATM with 100k sats
|
# ./dev.sh up --fund # Start and auto-fund ATM with 100k sats
|
||||||
# ./dev.sh up --fund=50000 # Start and auto-fund with specific amount
|
# ./dev.sh up --fund=50000 # Start and auto-fund with specific amount
|
||||||
|
# ./dev.sh up --machine # Start and launch ATM app
|
||||||
|
# ./dev.sh up --fund --machine # Start, fund, and launch ATM
|
||||||
# ./dev.sh up --worktree ~/path/to/lp # Build Lightning.Pub from worktree
|
# ./dev.sh up --worktree ~/path/to/lp # Build Lightning.Pub from worktree
|
||||||
# ./dev.sh up --image myimage:tag # Use specific Docker image
|
# ./dev.sh up --image myimage:tag # Use specific Docker image
|
||||||
# ./dev.sh down # Stop everything
|
# ./dev.sh down # Stop everything
|
||||||
|
|
@ -362,6 +364,7 @@ cmd_up() {
|
||||||
local skip_regtest=false
|
local skip_regtest=false
|
||||||
local auto_fund=false
|
local auto_fund=false
|
||||||
local fund_amount="$DEFAULT_FUNDING_SATS"
|
local fund_amount="$DEFAULT_FUNDING_SATS"
|
||||||
|
local launch_machine=false
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
|
|
@ -371,6 +374,7 @@ cmd_up() {
|
||||||
--skip-regtest) skip_regtest=true; shift ;;
|
--skip-regtest) skip_regtest=true; shift ;;
|
||||||
--fund) auto_fund=true; shift ;;
|
--fund) auto_fund=true; shift ;;
|
||||||
--fund=*) auto_fund=true; fund_amount="${1#*=}"; shift ;;
|
--fund=*) auto_fund=true; fund_amount="${1#*=}"; shift ;;
|
||||||
|
--machine|--atm) launch_machine=true; shift ;;
|
||||||
*) shift ;;
|
*) shift ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
@ -439,6 +443,12 @@ cmd_up() {
|
||||||
|
|
||||||
# 10. Show status
|
# 10. Show status
|
||||||
show_status
|
show_status
|
||||||
|
|
||||||
|
# 11. Launch ATM if requested
|
||||||
|
if [[ "$launch_machine" == "true" ]]; then
|
||||||
|
echo ""
|
||||||
|
cmd_atm
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_down() {
|
cmd_down() {
|
||||||
|
|
@ -641,10 +651,12 @@ case "${1:-help}" in
|
||||||
echo " --skip-regtest Don't auto-start regtest"
|
echo " --skip-regtest Don't auto-start regtest"
|
||||||
echo " --fund Auto-fund ATM with 100k sats after startup"
|
echo " --fund Auto-fund ATM with 100k sats after startup"
|
||||||
echo " --fund=<sats> Auto-fund ATM with specific amount"
|
echo " --fund=<sats> Auto-fund ATM with specific amount"
|
||||||
|
echo " --machine Launch ATM app after startup"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Examples:"
|
echo "Examples:"
|
||||||
echo " $0 up # Start with default image"
|
echo " $0 up # Start with default image"
|
||||||
echo " $0 up --fund # Start and fund ATM"
|
echo " $0 up --fund # Start and fund ATM"
|
||||||
|
echo " $0 up --fund --machine # Start, fund, and launch ATM"
|
||||||
echo " $0 up --fund=50000 # Start and fund with 50k sats"
|
echo " $0 up --fund=50000 # Start and fund with 50k sats"
|
||||||
echo " $0 up --worktree ~/dev/lightning-pub/withdraw"
|
echo " $0 up --worktree ~/dev/lightning-pub/withdraw"
|
||||||
echo " $0 atm # Launch ATM app"
|
echo " $0 atm # Launch ATM app"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue