chore: In gnodev, add option web-help-remote, use it in gnoweb
gnodev starts gnoweb which can show a help page with the gnokey command for each function. The help for the gnokey command includes -remote which is the same as the gnodev listening address. But the gnokey command is meant to be used from a different computer, and the address which gnodev listens on can be different than the address to connect from outside. (In our use case, gnodev runs in a docker container behind a reverse proxy.)
The gnoweb command already has an option -help-remote which is used on the help page. When gnodev starts gnoweb, it gives its own listening address. This PR adds a gnodev command line option -web-help-remote . If supplied, this overrides and is used when starting gnoweb.
Codecov Report
Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
Project coverage is 54.60%. Comparing base (
25aabf9) to head (0e6e6a7). Report is 4 commits behind head on master.
| Files | Patch % | Lines |
|---|---|---|
| contribs/gnodev/cmd/gnodev/main.go | 0.00% | 7 Missing :warning: |
| contribs/gnodev/cmd/gnodev/setup_web.go | 0.00% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #2135 +/- ##
==========================================
- Coverage 54.61% 54.60% -0.01%
==========================================
Files 579 579
Lines 77899 77907 +8
==========================================
+ Hits 42542 42544 +2
- Misses 32185 32192 +7
+ Partials 3172 3171 -1
| Flag | Coverage Δ | |
|---|---|---|
| contribs/gnodev | 23.81% <0.00%> (-0.15%) |
:arrow_down: |
| contribs/gnofaucet | 15.31% <ø> (+0.85%) |
:arrow_up: |
| contribs/gnokeykc | 0.00% <ø> (ø) |
|
| contribs/gnomd | 0.00% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thinking more about this, I'm not really sure about adding this. I don't want to have to duplicate every flag of gnoweb into gnodev. What do you think about simply running a separate instance of gnoweb on the side targeting your gnodev instance?
@gfanton, I don't see an option in gnodev to not start gnoweb. What should we do if we run gnoweb separately?
don't see an option in gnodev to not start gnoweb.
I think will should probably add an option to disable gnoweb in gnodev
What should we do if we run gnoweb separately?
If you run gnoweb separately, you can use the -help-remote, -remote, and -bind flags to correctly achieve what you want. Assuming you're running gnodev within a Docker container or behind a reverse proxy, it should be easy to not expose gnoweb on gnodev (even if it's actually running) and run it on another instance.
Thanks. Sounds good. Do you want me to change this PR to "Add an option to disable gnoweb in gnodev" ?
What should the gnodev option be? There is already an option -web-listener . Should we allow -web-listener none ?
If I can argue, I think gnodev should handle every service for us, like a hub. So it would stay simple for us to deploy the services through gnodev.
I don't see what would be the problem to recreate each option in gnodev for each services. So for us (devs), we would have a central configuration for all services. It would be great. If you categorize the options list in gnodev --help, it would be easy to find them. No matter if there are 100 options. The more there are, the more gnodev would be useful.
It's my opinion.
Gnodev should be the go-to tool for developers to work locally and showcase their projects. Running multiple manual containers should be considered advanced, while using gnodev in Docker can be a standard method to isolate multiple services on a server. Therefore, I recommend enabling gnodev to configure gnoweb accordingly.
People developing or running standalone Gnoweb should be experienced individuals or actual Gnoweb developers, in my opinion.
@moul I've discussed with @jefft0 and I agree we can include those flags in gnodev as it doesn't cost much yet. I just want to avoid duplicating a lot of documentation/code and reaching a point where we have to maintain it symmetrically.