petio-team / petio

Petio Request, Discover, Review
https://petio.tv
MIT License
250 stars 28 forks source link

BaseURL + Interface Setting for semi-unattended installs #256

Closed brettpetch closed 3 years ago

brettpetch commented 3 years ago

Is your feature request related to a problem? Please describe. Unable to define a baseurl and serve on a specific interface from the ubuntu build. This would allow for people to run an easy-to-run script that's built into their seedbox software without needing to modify too many things. Essentially I'm advocating for something as easy as sudo box install petio.

Describe the solution you'd like Both of these features should be added so those using something like quickbox or swizzin can have an easy install that is carried out.

Describe alternatives you've considered Setting up a firewall on the port is a good temporary solution, although for us to deploy this via a script that configures reverse proxy, etc. it makes more sense for us to be able to set the interface and baseurl as flags on startup. Something like --interface="127.0.0.1" --baseurl="/petio" would be perfect.

I was in the discord this afternoon and was told that baseurl can be set, however it was not a great solution, as it still required me to create firewall rules to block port 7777 and more configuration to nginx. It also required me to complete the setup before I could set the baseurl.

Additional context This is in the context of this temporary build script for swizzin installs that I've created.

In this context, we'd ideally be able to setup the basics for the user, and the installer would be still served at https://example.com/petio, just ommiting the parts about baseurl / interface to serve on.

Thanks /b

HarleyL7 commented 3 years ago

This would help me so much

Motophan commented 3 years ago

+1

AshDyson commented 3 years ago

Can you not generate the full config.JSON over CLI? If the config file exists and has a base path set then Petio will skip setup and start on the specified base path and configuration specified.

brettpetch commented 3 years ago

It didn’t really seem clear this was an option — essentially, will it skip over that step in the setup if it’s set in the config @AshDyson? Or does the config need to be complete?

AshDyson commented 3 years ago

It didn’t really seem clear this was an option — essentially, will it skip over that step in the setup if it’s set in the config @AshDyson? Or does the config need to be complete?

It's not a suggested method but it can be used if you're running a specific unattended setup like this. Yes you'll need a complete config with all prefs set correctly. But you could just write this into whatever CLI config you're using and it will just completely bypass the setup wizard

brettpetch commented 3 years ago

It's not a suggested method but it can be used if you're running a specific unattended setup like this. Yes you'll need a complete config with all prefs set correctly. But you could just write this into whatever CLI config you're using and it will just completely bypass the setup wizard

I don't think this really an elegant solution to the issue at hand.

If a blank config could be included prior to installation in the zip file, I think that updating it after user inputs information through your installer would be a more elegant solution; rather than having us add plex logins / tokens / etc, in the cli. Essentially, if it's already in the config, shouldn't the user be able to skip that step?

Sorry if I'm coming across as rude. I'm just trying to figure out the logic behind writing an entire config instead of it being included at least in a partially filled form. I would just use sed or something to target the line I needed to and restart the application if that was possible. But running the full-fat setup in the cli feels like it would just cause issues.

Also, I don't think every user wants to muddle around with UFW or iptables to lock down the software from serving on port 7777 externally. being able to serve only on localhost would be beneficial to those who use reverse proxies and run on baremetal.

AshDyson commented 3 years ago

Hm, I just think personally if you're automating the setup process you should automate the whole process through CLI. Altering our setup process to accommodate this isn't something I'm looking to do. I appreciate the issue but if its a maintained service there is an alternative option as suggested above to manually configure the config.json in your own wizard.