-
Notifications
You must be signed in to change notification settings - Fork 397
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: Phantombot #1608
base: master
Are you sure you want to change the base?
Conversation
Custom AppStore: https://github.com/kriakiku/umbrel-app-store |
🎉 Linting finished with no errors or warnings 🎉Thank you for your submission! This is an automated linter that checks for common issues in pull requests to the Umbrel App Store. Please review the linting results below and make any necessary changes to your submission. Linting Results
Legend
|
@nmfretz Hi! Is there anything else required from me for the approval of this merge request? |
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.
Thanks for submitting PhantomBot @kriakiku. This looks like a fantastic addition!
Really sorry for the delay in reviewing this. I'll try and be more prompt in follow-ups here, but sometimes I'll have my focus elsewhere.
I've left a review below. Once addressed I can give the app a test. Let me know if anything is confusing or if I've misunderstood something and I can take another look.
@@ -0,0 +1,14 @@ | |||
services: |
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.
Umbrel's app proxy service should be added here as the first service, which can then point to the phantombot_server_1
container and default port 25000
. That way you can remove the port mapping in your server
service and then PhantomBot will running behind our transparent proxy and inherit the security properties of our umbrel auth:
firefox example to follow
umbrel-apps/firefox/docker-compose.yml
Lines 3 to 7 in 2dbb418
services: | |
app_proxy: | |
environment: | |
APP_HOST: firefox_server_1 | |
APP_PORT: 3000 |
- By default, we only let requests through the proxy if the user already has a valid auth cookie from the Umbrel homescreen. So if the PhantomBot dashboard has no auth of its own, it will still be protected by ours. This gives a good UX because there's zero friction for Umbrel users... they can just access the dashboard without re-entering any credentials if they are already logged in to their Umbrel.
- It also has the benefit of inheriting other security properties of Umbrel auth, such as 2FA if they have it enabled on their Umbrel. They would then get 2FA security for all apps behind the auth proxy too.
- And then if you need to allow external connections to PhantomBot running on port 25000 (e.g., not to the UI but to the api or something), you can whitelist certain routes, so that the web UI is protected by auth, but something like /api/* isn't:
e.g., adding this env var to the proxy container
PROXY_AUTH_WHITELIST: "/api/*"
- You can also disable the auth portion of the app proxy container entirely with this env var:
PROXY_AUTH_ADD: "false"
services: | ||
server: | ||
image: ghcr.io/phantombot/phantombot:3.14.1.0@sha256:dbec9818e40f967ac5aee3abcac5a1857481cbbe6b35400f9a2fa8f1dc638df0 | ||
user: 0:900 |
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.
If possible, we want to avoid running services as root
. I haven't looked at the phantombot Dockerfile to see how they build the image so we might be stuck with this. But we should check if it is possible to run this non-root as the umbrel user (1000:1000
).
volumes: | ||
- ${APP_DATA_DIR}/data:/opt/PhantomBot_data | ||
ports: | ||
- "${APP_PHANTOM_SERVER_PORT}:${APP_PHANTOM_SERVER_PORT}" |
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.
This ports
section can be removed entirely once the app proxy service is added
ports: | ||
- "${APP_PHANTOM_SERVER_PORT}:${APP_PHANTOM_SERVER_PORT}" | ||
environment: | ||
PHANTOMBOT_USEHTTPS: "true" |
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 haven't tested this submission yet, but I'd imagine this forces user to use https, so they'd click the app and go to https://umbrel.local:25000, is that right? If so they'll be met with the big scary insecure warning that we shouldn't be teaching the average umbrel user to just click through.
We can set this to false, so the user is accessing over http on their local network.
PHANTOMBOT_USEHTTPS: "true" | ||
PHANTOMBOT_PANELUSER: umbrel | ||
PHANTOMBOT_PANELPASSWORD: $APP_PASSWORD | ||
PHANTOMBOT_BASEPORT: $APP_PHANTOM_SERVER_PORT |
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.
if this is the default port that phantombot runs on, then this can be removed entirely #1608 (comment)
@@ -0,0 +1 @@ | |||
export APP_PHANTOM_SERVER_PORT="25000" |
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.
If this is the default port, then this entire exports.sh should be removed for simplicity
name: PhantomBot | ||
version: "3.14.1.0" | ||
tagline: PhantomBot is a Twitch chat bot powered by Java | ||
icon: "" |
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.
This entire icon
line can be removed. We'll host the icon here: https://github.com/getumbrel/umbrel-apps-gallery
And the icon rendering logic in umbrelOS will grab the correct icon.
🛠️ Set-Up Instructions | ||
Required! If you don't perform the initial setup, you will encounter an error when connecting to the control panel! | ||
|
||
1. Connect Your Twitch Account | ||
Using the instructions on the page https://umbrel.local:25000/oauth/, create oauth app and connect your Twitch account. | ||
|
||
2. Fill Chanel Configuration Fields | ||
Complete the channel and owner fields on the configuration page https://umbrel.local:25000/setup/. | ||
|
||
3. Log In | ||
Done! You can log in to the control panel at https://umbrel.local:25000/panel/login using the default credentials. |
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.
Awesome work adding these!
If users can navigate to these links by clicking things within the UI, then I would suggest making these instructions more generic. For example, telling the user to "navigate to the oauth settings" instead of providing a specific link.
My reasoning here is that:
-
These links may change in future app updates and it will be difficult to remember to update the app description
-
It's possible that the user accesses their umbrel at a different hostname than
umbrel.local
. For example, they may access their umbrel via local IP address, or by Tailscale, or if they have multiple Umbrel devices they may be using umbrel-2.local
Hey! I’ll try to make the changes in the coming days. |
Converting to draft for now to keep things organized. @kriakiku ping me as soon as you're ready for me to test! |
App Submission
App name
Phantombot
Disclamer
256x256 SVG icon
https://svgshare.com/i/1BJ0.svg
Gallery images
1.png:
1.png (original):
2.png:
3.png:
4.png:
5.png:
I have tested my app on: