Skip to content
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

Map localhost:<port> to lnbits:5000 on server #1444

Merged
merged 2 commits into from
Oct 20, 2024
Merged

Conversation

ekzyis
Copy link
Member

@ekzyis ekzyis commented Oct 1, 2024

This enables attaching LNbits locally by using the host network for app and worker.

I also setup a LNbits superuser and made it persistent.

Thanks to this persistent superuser, we now also have a persistent wallet which we can use for attaching with fixed keys.

However, that wallet is not funded yet but that's for another PR when deemed valuable enough.

@huumn
Copy link
Member

huumn commented Oct 1, 2024

Did you check the ATTACH instructions for other containers? I suspect this impacts some of those too.

I'm a bit worried this might impact other services as well like our mock s3 and imgproxy.

@huumn huumn marked this pull request as draft October 3, 2024 15:36
@ekzyis
Copy link
Member Author

ekzyis commented Oct 7, 2024

Oh no, I didn't. Will check ATTACH instructions and impact on other services. I thought that only app and worker load these env vars but I am no longer sure.

@ekzyis ekzyis force-pushed the local-dev-lnbits-recv branch 2 times, most recently from 759374c to 7f29794 Compare October 12, 2024 13:17
@ekzyis ekzyis changed the title Enable local lnbits recv using network_mode: host Allow multiple URLs for LNbits using String.prototype.split Oct 12, 2024
@ekzyis
Copy link
Member Author

ekzyis commented Oct 12, 2024

Instead of using network_mode: "host", I have decided to simply allow to enter multiple URLs separated by ; during local dev. This avoids impact on other services caused by network_mode: "host".

QA: 8. I was able to attach send+recv using http://localhost:5001;http://lnbits:5000 as the URL. I then made sure that payments from LNbits and autowithdrawals to LNbits still work.

@ekzyis ekzyis marked this pull request as ready for review October 12, 2024 13:33
* persistent lnbits db with lnbits superuser
* map localhost:5001 -> lnbits:5000 in local dev for LNbits receives
* updated ATTACH.md
@ekzyis ekzyis changed the title Allow multiple URLs for LNbits using String.prototype.split Map localhost:<port> to lnbits:5000 on server Oct 17, 2024
@ekzyis
Copy link
Member Author

ekzyis commented Oct 17, 2024

As discussed on Monday, 75051f1 now uses a simple if to map to lnbits:5000 on the server for LNbits receives during local development.

@huumn huumn merged commit e307573 into master Oct 20, 2024
6 checks passed
@huumn huumn deleted the local-dev-lnbits-recv branch October 20, 2024 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants