Docker compatibility 馃馃檹 #429

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@glushchenko

No description provided.

@glushchenko glushchenko Update Main.hs
Docker compatibility 馃馃檹
ab25ed2
@simonmichael
Owner

Thanks. If I understand rightly, this makes hledger-web also respond to incoming requests to any IP address configured for this machine, rather than just local requests from this machine ? Any comments on #432 which goes the other way ?

Is it cross-platform ? http://serverfault.com/a/300410 says "ping 0.0.0.0 on a Windows system results in an error message".

@simonmichael
Owner

For hledger-web and hledger-api, I am thinking it's best to be consistent, to listen only on localhost by default, and to add a --host option which would allow 0.0.0.0 or other address to be configured.

@simonmichael
Owner

OR (devil's advocate): we can prioritise just-works over secure-by-default, keep things simple, and assume that people starting a web service should expect that it will serve web requests.

@glushchenko

--host argument is a good idea

@mhansen
mhansen commented Nov 20, 2016

+1 to a --host option (secure-by-default) now that there's a use case for the option :-)

@simonmichael simonmichael added a commit that referenced this pull request Nov 21, 2016
@simonmichael web: add --host, rename --server to --serve (#429)
This came up in the context of Docker, but it seems it wasn't possible
for hledger-web to serve remote clients directly (without a proxy)
because of 127.0.0.1 being hardcoded ? Now that can be
changed with --host=IPADDR. The default base url also
uses this address, rather than "localhost" being hardcoded.

Also, the --server flag sounded too close in meaning to --host so
I've renamed it to --serve. The old spelling is still accepted,
at least through the next major release I suppose.
1bcc091
@simonmichael
Owner

hledger-web --host IPADDR should work now. (I feel it should accept hostnames too, +1 to anyone who fixes that.)

@mstksg mstksg added a commit to mstksg/hledger that referenced this pull request Feb 3, 2017
@simonmichael @mstksg + mstksg web: add --host, rename --server to --serve (#429)
This came up in the context of Docker, but it seems it wasn't possible
for hledger-web to serve remote clients directly (without a proxy)
because of 127.0.0.1 being hardcoded ? Now that can be
changed with --host=IPADDR. The default base url also
uses this address, rather than "localhost" being hardcoded.

Also, the --server flag sounded too close in meaning to --host so
I've renamed it to --serve. The old spelling is still accepted,
at least through the next major release I suppose.
48c2416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment