eggs icon indicating copy to clipboard operation
eggs copied to clipboard

Add ntfy egg

Open ThnksCJ opened this issue 1 year ago • 24 comments

Description

Ntfy is a simple HTTP-based pub-sub notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, and/or using a REST API.

Closed issue requesting ntfy: #2471

Checklist for all submissions

  • [x] Have you followed the guidelines in our Contributing document?
  • [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • [x] Have you tested and reviewed your changes with confidence that everything works?
  • [x] Did you branch your changes and PR from that branch and not from your master branch?
    • If not, why?:
  • [ ] You verify that the start command applied does not use a shell script
    • [ ] If some script is needed then it is part of a current yolk or a PR to add one
  • [ ] The egg was exported from the panel

New egg Submissions

  1. [x] Does your submission pass tests (server is connectable)?
  2. [ ] Does your egg use a custom docker image?
    • [ ] Have you tried to use a generic image?
    • [ ] Did you PR the necessary changes to make it work?
  3. [x] Have you added the egg to the main README.md and any other README files in subdirectories of the egg (e.g /game_eggs) according to the alphabetical order?
  4. [x] Have you added a unique README.md for the egg you are adding according to the alphabetical order?
  5. [x] You verify that the start command applied does not use a shell script
    • [ ] If some script is needed then it is part of a current yolk or a PR to add one
  6. [x] The egg was exported from the panel

ThnksCJ avatar Dec 01 '23 16:12 ThnksCJ

@QuintenQVD0 Ive added the changes you suggested could you look over it again?

ThnksCJ avatar Dec 01 '23 19:12 ThnksCJ

looks fine to me, just have to test it.

QuintenQVD0 avatar Dec 01 '23 20:12 QuintenQVD0

@ThnksCJ How to we use this as the issue was closed because you like need to change the startup off the egg. so how does this egg handle this as I do not know this aplication

QuintenQVD0 avatar Dec 03 '23 10:12 QuintenQVD0

You can configure the server.yml file that gets created and it's already pre-configured with a working config on the default allocation host and port. You can configure it to add a proxy host and such but you would need to look through the docs for that. If you span up an instance and visited it on http then it would all be working as a basic thing

ThnksCJ avatar Dec 03 '23 11:12 ThnksCJ

@QuintenQVD0 I changed the way the config is made to make it hopefully a bit more user friendly, could you look over it? Thanks 👍🏻

ThnksCJ avatar Dec 08 '23 17:12 ThnksCJ

how do you manage users if the startup command is hard coded? (to manage users and permissions it's ntfy user ... and ntfy access ...

Stef-00012 avatar Jan 02 '24 16:01 Stef-00012

how do you manage users if the startup command is hard coded? (to manage users and permissions it's ntfy user ... and ntfy access ...

change the startup in the egg or server, when you are admin?

gOOvER avatar Jan 02 '24 16:01 gOOvER

how do you manage users if the startup command is hard coded? (to manage users and permissions it's ntfy user ... and ntfy access ...

change the startup in the egg or server, when you are admin?

why? it would be enough to make the startup like ntfy {{ARGS}} and make an env variable where the user can type user add xxx etc.

Stef-00012 avatar Jan 02 '24 18:01 Stef-00012

I thought users could be added using the web UI and it work the same as using a cmd to do it

ThnksCJ avatar Jan 02 '24 18:01 ThnksCJ

it should indeed, as the user will never be allowed to change the startup themselves in offical eggs.

QuintenQVD0 avatar Jan 03 '24 09:01 QuintenQVD0

I thought users could be added using the web UI and it work the same as using a cmd to do it

how? in the web UI the add user button is only a way to log into users made with ntfy user add ..., and in the web UI there's no way to manage permissions (ntfy access ...)

Stef-00012 avatar Jan 03 '24 14:01 Stef-00012

if that is true, this egg likely will be closed as uses are not allowed to self edit the startup

QuintenQVD0 avatar Jan 03 '24 14:01 QuintenQVD0

I thought users could be added using the web UI and it work the same as using a cmd to do it

how? in the web UI the add user button is only a way to log into users made with ntfy user add ..., and in the web UI there's no way to manage permissions (ntfy access ...)

I must have overlooked this fact, mabye ntfy won't work as an egg after all

ThnksCJ avatar Jan 03 '24 15:01 ThnksCJ

if that is true, this egg likely will be closed as uses are not allowed to self edit the startup

can't it be done like so? like ntfy ${OPTIONS} where OPTIONS is a user_editable variable

Stef-00012 avatar Jan 04 '24 02:01 Stef-00012

if that is true, this egg likely will be closed as uses are not allowed to self edit the startup

can't it be done like so? like ntfy ${OPTIONS} where OPTIONS is a user_editable variable

That would be better but is almost the same as just giving the user direct startup asses as you put a ; and the command and the panel will run it.

QuintenQVD0 avatar Jan 04 '24 08:01 QuintenQVD0

Doesn't the nodejs egg do something like that to start the main file? Wouldn't you be able to put a ; and it escape too

ThnksCJ avatar Jan 04 '24 08:01 ThnksCJ

Doesn't the nodejs egg do something like that to start the main file? Wouldn't you be able to put a ; and it escape too

yes technically yes, but that variable is locked to a max of 64 char and should (it is not) be locked with alpha_dash rule what as it sas only allows letters and _ and not symbols.

QuintenQVD0 avatar Jan 04 '24 08:01 QuintenQVD0

Then could you not do the same on this egg? Or would that raise password security issues

ThnksCJ avatar Jan 04 '24 08:01 ThnksCJ

Then could you not do the same on this egg? Or would that raise password security issues

Problem is it does not allow for - so many things (that's wy for node it is not set) will not work. Even uppercase char are not allowed in alpha_dash. so I guess then indeed just lock it to 64 length and do it that way.

QuintenQVD0 avatar Jan 04 '24 08:01 QuintenQVD0

@ThnksCJ Can an admin used create other users on the web interface or is it all command line interface, else we just create 1 stock user.

seems like larvel 10 allowed - so alpha_dashshould be the way to go

QuintenQVD0 avatar Jan 04 '24 08:01 QuintenQVD0

From what i have read it all has to be done using the cli which is an issue, that is to create specific channels locked behind authentication. Not sure how we could overcome this issue without making a custom image that has a shell to accept commands or somehting

ThnksCJ avatar Jan 04 '24 21:01 ThnksCJ

From what i have read it all has to be done using the cli which is an issue, that is to create specific channels locked behind authentication. Not sure how we could overcome this issue without making a custom image that has a shell to accept commands or somehting

That wont be happening.

QuintenQVD0 avatar Jan 05 '24 07:01 QuintenQVD0

found out in the server.yml file you can add these 3 settings

enable-signup: true # anyone can create an account through the web ui
enable-login: true # anyone can login into accounts through the web ui using user and pass
enable-reservations: true # anyone can reserve topics for themselves

only limit is you can't choose who can make accounts and who can't, or who can reserve and who can't

however technically you can if you enable these settings only when you want to create an account or manage reserved topics and disable when you don't need to

Stef-00012 avatar Jan 05 '24 14:01 Stef-00012

found out in the server.yml file you can add these 3 settings

enable-signup: true # anyone can create an account through the web ui
enable-login: true # anyone can login into accounts through the web ui using user and pass
enable-reservations: true # anyone can reserve topics for themselves

only limit is you can't choose who can make accounts and who can't, or who can reserve and who can't

however technically you can if you enable these settings only when you want to create an account or manage reserved topics and disable when you don't need to

its even yaml so you could add variable for those nad let the config parser turn them on and off

QuintenQVD0 avatar Jan 05 '24 15:01 QuintenQVD0