Want to hear about the pain I went through today and how I lost another 4 hours because of #Parmanode (easy AF #Bitcoin node for desktop computers), and my desire to get #BTCPay running easily with a few clicks?
It's related to a BTCPay docker build from scratch, because why not?
For the life of me, I couldn't figure out why I couldn't get BTCpay to connect to the block explorer in the background...
I isolated it to the script not fulfilling the command:
docker exec -it btcpay bash -c "/home/foo/run.sh"
evvvVVVENTUALLY...
when I looked inside this damn http://run.sh script (http://run.sh is by btcpay server, I didn't write it), I saw it was running a NBXplorer file, but it was a relative path.
FFS, when executing this script using the absolute path /home/foo/run.sh , it was not locating the target in the script. FLM, hours lost...
But the plot thickens...
Thinking I found the problem and overcome it by:
cd /home/foo && ./run.sh
I though for sure this would work.
FAIL. NBXplorer not running...
I can manually copy and paste the contents of the docker exec command in the container and get it running, but not when executing it from the script.
The other docker exec command, http://run.sh, for btcpay was working fine. Why the issue? Can you guess?...
The second exec command, for nbxplorer, needed to be delayed by a few seconds with a sleep 4 command. Then it works. Fuck. It was almost by chance as this "trick" worked with something else previously.
I suppose the code proceeds before docker is ready to run the next command in the container, IDK, but narrowing the problem down took ages.
Onwards!
The good news is that BTCPay for #Pamanode is only days away.
