Skip to content
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

Configuration via environment variables doesn't work except GOTTY_CONFIG #122

Closed
oneumyvakin opened this issue Oct 12, 2016 · 0 comments · Fixed by #155
Closed

Configuration via environment variables doesn't work except GOTTY_CONFIG #122

oneumyvakin opened this issue Oct 12, 2016 · 0 comments · Fixed by #155

Comments

@oneumyvakin
Copy link

oneumyvakin commented Oct 12, 2016

gotty version 0.0.13

Linux debian8 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) x86_64 GNU/Linux
GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu)

Set some environment variables:

root@:~# env | grep GOTTY
GOTTY_ADDRESS=127.0.0.2
GOTTY_PORT=9000

Run and see that configuration is not applied:

root@:~# ./gotty -w /bin/bash
2016/10/12 05:52:01 Permitting clients to write input to the PTY.
2016/10/12 05:52:01 Server is starting with command: /bin/bash
2016/10/12 05:52:01 URL: http://127.0.0.1:8080/
2016/10/12 05:52:01 URL: http://[::1]:8080/
2016/10/12 05:52:01 URL: http://192.168.0.120:8080/
2016/10/12 05:52:01 URL: http://[fe80::20c:29ff:fefd:8ba3]:8080/

But GOTTY_CONFIG is working:

root@:~# export GOTTY_CONFIG=notexists
root@:~# ./gotty -w /bin/bash
stat notexists: no such file or directory
gurjeet added a commit to gurjeet/gotty-cf-bash that referenced this issue Nov 1, 2016
Added a manifest file that is used by default by Cloud Foundry's cli
`cf push` command. This manifest causes GoTTY to launch bash and allow
it to accept keystrokes. We do not use GoTTY's -c parameter to force use
of credentials, because that requires that the user update the manifest
file before `cf push`, and also have the utilities to generate secure
password on her machine. We use the alternative method to obscure the
access to this app by recommending (in README) to use the --random-route
option.

Updated code to listen on environment variable PORT. This overrides
logic that purportedly supports choosing a different port via environment
variable GOTTY_PORT. But since that doesn't really work (see issue yudai#122)
it's okay for us to hack this to support Cloud Foundry.
yudai added a commit that referenced this issue Aug 8, 2017
To fix #122.
IsSet() doesn't return true even when env variables are set.
@yudai yudai closed this as completed in #155 Aug 8, 2017
yudai added a commit that referenced this issue Aug 8, 2017
To fix #122.
IsSet() doesn't return true even when env variables are set.
@yudai yudai modified the milestones: v1.0.1, v2.0.0 Aug 8, 2017
yudai added a commit that referenced this issue Aug 8, 2017
This release is bug fixes.

Fixes
-----

* #118: gotty.js clears browser's Local Storage
* #122: Configuration via environment variables doesn't work except GOTTY_CONFIGklllll
* #136: max-connections reporting wrong count
yudai added a commit that referenced this issue Aug 8, 2017
This release is bug fixes.

Fixes
-----

* #118: gotty.js clears browser's Local Storage
* #122: Configuration via environment variables doesn't work except GOTTY_CONFIGklllll
* #136: max-connections reporting wrong count
yudai added a commit that referenced this issue Aug 8, 2017
This release is bug fixes.

Fixes
-----

* #118: gotty.js clears browser's Local Storage
* #122: Configuration via environment variables doesn't work except GOTTY_CONFIGklllll
* #136: max-connections reporting wrong count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants