-
Notifications
You must be signed in to change notification settings - Fork 51
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
Enhance docs of 'sourced init' and 'web' subcommands #115
Conversation
I think this would also be useful to have in the CLI help output. |
Imo it should be even more useful to print after init or during the init (because browser most probably will be open over terminal). |
The purpose of this PR is only to enhance the docs. Should it be hinted after the |
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 a lot for the fast reply and great work! Just a couple of questions
docs/usage/commands.md
Outdated
@@ -22,6 +22,11 @@ It can work over a local repository or a list of GitHub organizations. | |||
|
|||
**source{d} CE** will download and install Docker images on demand. Therefore, the first time you run some of these commands, they might take a bit of time to start up. Subsequent runs will be faster. | |||
|
|||
Once **source{d} CE** has been initialized, it will automatically open the web UI. | |||
If the UI is not opened automatically, you can use [`sourced web`](#sourced-web) command, or visit http://localhost:8088. |
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.
Should it be 127.0.0.1
? #116
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.
Btw - it would be nice to have --no-browser
option. I forgot to mention in friction log that this command launched a browser without tab localhost:8088
- so I had to copy-paste it anyway.
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 noticing that it should use 127.0.0.1
instead of localhost
About the second comment, it should be handled on a separate issue, but:
- what would be the use case of
--no-browser
? when would you want to avoid opening the UI? - is the browser always opened without url? which browsers do you have? which OS? what happens if you run
xdg-open http://127.0.0.1:8088
in your Linux (oropen http://127.0.0.1:8088
in Darwin)?
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.
what would be the use case of --no-browser? when would you want to avoid opening the UI?
Like jupyter
- some kind of server application - you launch it, expose port, so external people can connect.
is the browser always opened without url?
- Yes, somehow something is misconfigured on my PC
which browsers do you have?
- Chromium
Version 74.0.3729.169 (Official Build) (64-bit)
which OS?
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
what happens if you run xdg-open http://127.0.0.1:8088 in your Linux (or open http://127.0.0.1:8088 in Darwin)?
- browser is opened with empty tab
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.
So that is the problem. sourced web
relies on xdg-open
, which is not working in your PC, maybe because of a misconfigured Chrome as explained by https://askubuntu.com/questions/499200/xdg-open-opens-chrome-but-does-not-load-the-url
Could you confirm?
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.
Yes, it was misconfigured. Thank you for fix!
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.
👍
Why? this is such a small PR, and the requested changes are very very related, it makes sense to keep in sync the docs and the CLI help messages
I'd say it's ok to output the "default" password and not try to parse the compose file. |
. |
@carlosms @smacker your suggestion was added by 627e345 $ sourced web --help
Usage:
sourced [OPTIONS] web [web-OPTIONS]
Open the web interface in your browser, by default at: http://127.0.0.1:8088 user:admin pass:admin
$ sourced init local
docker-compose working directory set to /projects/github.com/src-d/sourced-ce
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_metadatadb_1 ... done
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_redis_1 ... done
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_bblfsh_1 ... done
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_postgres_1 ... done
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_ghsync_1 ... done
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_bblfsh-web_1 ... done
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_gitbase_1 ... done
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_gitcollector_1 ... done
Starting srcd-093c09ad4231381f4891a517a6ab5a7a41021519_sourced-ui_1 ... done
Once source{d} is fully initialized, the UI will be available, by default at:
http://127.0.0.1:8088
user:admin
pass:admin
Initializing source{d}... ⠸
$ sourced start
Starting bblfsh ... done
Starting gitbase ... done
Starting bblfsh-web ... done
Starting redis ... done
Starting postgres ... done
Starting gitcollector ... done
Starting metadatadb ... done
Starting ghsync ... done
Starting sourced-ui ... done
Once source{d} is fully initialized, the UI will be available, by default at:
http://127.0.0.1:8088
user:admin
pass:admin
Initializing source{d}... ⠹
$ sourced web
Once source{d} is fully initialized, the UI will be available, by default at:
http://127.0.0.1:8088
user:admin
pass:admin
|
Signed-off-by: David Pordomingo <[email protected]>
Signed-off-by: David Pordomingo <[email protected]>
As proposed by https://github.com/src-d/empathy-sessions/issues/41