- 
                Notifications
    You must be signed in to change notification settings 
- Fork 20
Add docker #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add docker #71
Conversation
| 👋 Thanks for assigning @tnull as a reviewer! | 
5d4ec81    to
    61851cb      
    Compare
  
    | 🔔 1st Reminder Hey @wpaulino! This PR has been waiting for your review. | 
| 🔔 1st Reminder Hey @tnull! This PR has been waiting for your review. | 
| 🔔 2nd Reminder Hey @tnull! This PR has been waiting for your review. | 
| 🔔 3rd Reminder Hey @tnull! This PR has been waiting for your review. | 
| 🔔 4th Reminder Hey @tnull! This PR has been waiting for your review. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Pretty much looks good to me!
One minor nit: please rewrite your commit messages to wrap at 72 characters. In general, feel free to consult https://cbea.ms/git-commit/ for guidance on how to write good commit messages.
| network = "regtest" # Bitcoin network to use | ||
| listening_address = "localhost:3001" # Lightning node listening address | ||
| rest_service_address = "127.0.0.1:3002" # LDK Server REST address | ||
| rest_service_address = "127.0.0.1:3000" # LDK Server REST address | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the motivation of changing this?
I think it could make sense as 3002 might conflict with an Esplora instance running on the same host, IIRC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main motivation is that ldk-server-cli defaults to port 3000 for the RPC. If this config file uses 3002, users would always need to manually pass -b localhost:3002, which isn’t convenient, especially when running it through Docker where the config file is used directly. I believe 3002 was originally chosen because 3000 conflicted with Polar, which uses it by default, but using 3002 could also cause conflicts with Esplora in the future once support for it is added.
|  | ||
| bitcoin: | ||
| container_name: ldk-server-bitcoin | ||
| image: blockstream/bitcoind:29.1@sha256:9fcffa83feed0fc382dfb2f26990ca07656d150ba49434096a5aeedac6695a01 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be cool to go for v30 directly here, just pinged somebody from Blockstream to check if they intend to upgrade the Docker image soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, let’s wait for their feedback then.
| - ldk-server | ||
| # Example command: lightning-cli --network=regtest getinfo | ||
|  | ||
| rabbitmq: | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not entirely convinced we need this right now, but maybe better to have it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this command example to make it easier for anyone working with these containers, so they don’t have to look up the basic commands each time and everything stays consistent with the config.
Implements multi-stage build to produce a small final image by discarding build dependencies. Supports optional BUILD_FEATURES for additional features, with cached compilation in builder stage.
introduces docker-compose.yml with Bitcoin Core, CLN, and LND for Lightning testing. The default profile runs these services; the 'ldk-server' profile adds the LDK server; the 'rabbitmq' profile includes RabbitMQ for events.
61851cb    to
    ccdefcd      
    Compare
  
    
Adds Docker support for building and testing LDK Server. Includes a multi-stage Dockerfile for optimized builds and a docker-compose.yml for a full testing environment with Bitcoin Core, CLN, and LND.
BUILD_FEATURES) and final stage for runtime. Exposes ports 3000 and 3001 for REST and Lightning connectivity.docker compose up).docker compose --profile ldk-server up).docker compose --profile rabbitmq up).this pr depends on #69