enonic / cli-enonic

GNU General Public License v3.0
41 stars 2 forks source link

Support port other than 8080 #233

Closed rymsha closed 3 years ago

rymsha commented 4 years ago

Currently CLI checks if 8080 port is available and refuse to start if is is not available

Port 8080 occupied...

Enonic version: 1.3.0 OS: Linux

Hello. I am trying to get Enonic XP up and running on port 9000. Initial problem is that XP_HOME is set to /srv/enonic but is seems not to acknowledge that /srv/enonic/config and contains files:

enonic sandbox start

Port 8080 is not available, stop the app using it first!

sigdestad commented 4 years ago

Maybe CLI could parse config files (or in some other way) detect or set the main port for XP. Supporting multiple sandbox instances would also be nice, but then a series of ports need to be overridden I guess?

rymsha commented 4 years ago

We could provide a simple thing --http.port argument. This would cover 99% of use-cases.

alansemenov commented 4 years ago

It's not just 1 port but 5 that are in use. Is this to specify only http port?

rymsha commented 4 years ago

Yes. CLI doesn't check other ports before starting XP. Only 8080 --http.port would de-hardcode this check to a custom port, but would not to start XP on this specified port.

It sounds confusing, but this is how this are now: CLI "guess" port is always 8080 regardless of XP config. If XP starts on a different port - CLI won't notice it.

Of course to be complete CLI should parse config files and know how to interpret them correctly - but this is not that easy: we support variable substitution and property dependencies in config.

So providing a flag that covers 99% of use cases looks like a simple alternative.

alansemenov commented 4 years ago

Ok, moving this to Ready