-
Notifications
You must be signed in to change notification settings - Fork 355
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
App Submission: Saifa (lnd Invoice manager) #1021
Conversation
first commit try install on umbrel os
Thanks for this app submission @patranakamo! We are currently behind on reviewing app PRs while we work on critical umbrelOS updates. I will review this soon. |
Hi nmfretz great to hear that. |
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.
Hi @patranakamo, thanks for bearing with me. And thanks again for this submission!
I've reviewed and left some packaging suggestions below. Once these are addressed I'll test out the app.
version: "3.7" | ||
|
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.
The app_proxy service needs to be added here. You can take a look at Thunderhub as an example of how to set it up:
https://github.com/getumbrel/umbrel-apps/blob/master/thunderhub/docker-compose.yml
It will be used to proxy port 9989 to your web app. It can also automatically protect your app by requiring the user to enter their Umbrel password when accessing it if they aren't already logged into a session.
If you have in-buiilt authentication in your app then you could choose to remove the authentication layer by using the env varPROXY_AUTH_ADD: "false"
saifa/docker-compose.yml
Outdated
|
||
services: | ||
backend: | ||
image: patranakamo/saifa-be:v1.3.3 |
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.
For each image in this compose file, we need to add the multi-arch digest to make sure that we are locking in a specific image that has been tested for this release. With just the tag, a new image can be pushed to docker hub with the same tag and then a new image would be downloaded by the user just by restarting the app (and of course by fresh installs).
Your image is already multi-arch which is fantastic:
So all you need to do is get the digest by running:
docker pull patranakamo/saifa-be:v1.3.3
and grabbing the digest from the output. In this case I get:
Digest: sha256:a04bbaba219b35d7bb59426665ae813ad2d219cb1b2e0eceed1c79170ede6228
So in this example you would do:
image: patranakamo/saifa-be:v1.3.3@sha256:a04bbaba219b35d7bb59426665ae813ad2d219cb1b2e0eceed1c79170ede6228
services: | ||
backend: | ||
image: patranakamo/saifa-be:v1.3.3 | ||
restart: on-failure |
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.
Perfect. You'll want to add this same restart: on failure
to the frontend and redis services in this compose file as well.
ports: | ||
- "9988:80" |
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.
Do you need this port bound to the host? This would be necessary if external applications are trying to send requests directly to this backend container.
Or is it just your frontend container that is connecting to the backend? If so, then there is no need to bind the port to the host, since your frontend container can resolve the ip of the backend container using Docker's inbuilt dns and communicate on container port 80 directly.
ports: | ||
- "9988:80" | ||
volumes: | ||
- ${APP_DATA_DIR}/data/app:/data |
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.
Can you please add this directory to this repo so that it is created for users when installing the app. If we don't do this then Docker will create the directory when the container is spun up, which has the potential to cause permissions issues.
See the Lightning Node app as an example:
https://github.com/getumbrel/umbrel-apps/tree/master/lightning
You'll want to create a data
directory and then a app
directory inside of that with a .gitkeep
file to make sure the empty directory is committed.
id: saifa | ||
category: finance,development tool | ||
name: Saifa - invoice lightning network manager | ||
version: "1.0.0" |
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.
You can update this to your current version
saifa/umbrel-app.yml
Outdated
@@ -0,0 +1,36 @@ | |||
manifestVersion: 1 | |||
id: saifa | |||
category: finance,development tool |
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.
We currently only support one category (may change in the future). I'd suggest bitcoin
for now so that it will show up with related apps.
saifa/umbrel-app.yml
Outdated
releaseNotes: >- | ||
- Base Project Launch: The foundational framework of our project has been successfully deployed, establishing the core functionalities and setting the stage for future enhancements. | ||
- Webhook System Integration: We've introduced a robust webhook system designed to facilitate seamless updates on invoice statuses. This feature ensures that applications remain synchronized, providing timely notifications to users and other connected applications. | ||
- User Interface for Invoice Management: A user-friendly interface has been implemented, allowing users to effortlessly monitor the status of their invoices. This intuitive UI simplifies the management process, ensuring a smooth and efficient user experience. | ||
- Enhanced Invoice Operations: Users now have the ability to add and cancel invoices directly from the simple UI. This enhancement streamlines the invoice management process, making it more accessible and convenient for our users. |
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.
For the initial release we can just leave these blank, since no one will get an app update notification.
You can change to:
releaseNotes: ""
saifa/umbrel-app.yml
Outdated
email: [email protected] | ||
dependencies: | ||
- bitcoin | ||
- lnd |
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.
the id for lnd is actually lightning
for this.
saifa/umbrel-app.yml
Outdated
description: >- | ||
Saifa is designed to enhance the interoperability and efficiency of applications interacting with the Lightning Network Daemon (LND). | ||
Our project simplifies the integration process, allowing applications to seamlessly connect to LND through an intuitive webhook system. | ||
With Saifa, users can effortlessly create new invoices using a straightforward REST API, cancel invoices, and receive real-time updates on invoice status. | ||
This system is crafted to streamline operations and facilitate a smoother transaction experience on the Lightning Network, | ||
making it an essential tool for developers looking to optimize their applications for better performance and user satisfaction. |
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.
Rendering yaml in the UI makes it a bit finicky to create whitespace. here's what you can do to make sure that the app description looks good in the app store:
If you want a paragraph to show up on a separate line without a blank line above it, then add a single blank line to the yaml
e.g.
description: >-
I am the first block.
I will show up on my own line but directly under the first block.
The above will render like this:
I am the first block.
I will show up on my own line but directly under the first block.
If you want a paragraph to show up on a separate line with a blank line above it, then add two blank lines to the yaml
e.g.
description: >-
I am the first block.
I will show up on my own line with a blank line above.
The above will render like this:
I am the first block.
I will show up on my own line with a blank line above.
HI @nmfretz ERROR: The Compose file '/home/umbrel/umbrel/scripts/support/docker-compose.app_proxy.yml' is invalid because: The system runs normally when I remove and reinstall. (I push it in docker-composer.yml as comment in case you want to see it.) Thanks again. |
No worries at all, I have pushed some commits that resolve a couple issues. The app_proxy is using Docker's DNS to resolve the IP of the frontend container and proxy to port 80 running in the frontend container. The app now installs fine, but the
|
I pushed an update after you helped me fix the frontend port issue. I tested it on my Umbrel-on-Raspberry, and it can be installed normally, with the frontend running smoothly. It should work on your Umbrel too. I just wanted to let you know that I appreciate your help in pushing some fixes. I didn't expect this level of assistance from anyone. |
You're most welcome, glad to help! I have tested and made a couple changes to make sure it runs for both arm64 and x86 users and to show users their default app password. We are pretty much ready to go. Can you please let me know the following:
|
HI again @nmfretz Let me answer your questions: 1 ) Let's keep the app version as 1.0.0, even if it's not the same as the Docker images. The Docker images include the front-end as well, so sometimes they need different versions. 2 ) Yes, I still need to keep that port open. It has a feature for an external API that can call this backend directly (with a token) to create or get invoices without opening the front-end UI. 3 ) Sure, that sounds good. 4 ) For the gallery images, please use the following text: |
Thanks @patranakamo. We'll get the gallery assets ready and then launch on the app store! |
@patranakamo the gallery assets are ready: https://github.com/getumbrel/umbrel-apps-gallery/tree/master/saifa Going live to the app store now. Congratulations! And thanks again for all your hard work bringing Saifa to Umbrel. |
Wow, the app looks great on the App Store! |
App Submission
...
app name (Saifa)
...
256x256 SVG icon
https://svgur.com/i/1452.svg
description:
Saifa is designed to enhance the interoperability and efficiency of applications interacting with the Lightning Network Daemon (LND).
Our project simplifies the integration process, allowing applications to seamlessly connect to LND through an intuitive webhook system.
With Saifa, users can effortlessly create new invoices using a straightforward REST API, cancel invoices, and receive real-time updates on invoice status.
This system is crafted to streamline operations and facilitate a smoother transaction experience on the Lightning Network,
making it an essential tool for developers looking to optimize their applications for better performance and user satisfaction.
...
Gallery images
I have tested my app on:
Umbrel OS on a Raspberry Pi 4