invoker icon indicating copy to clipboard operation
invoker copied to clipboard

Proxy-only mode: allowing processes with no commands, + default port

Open rchampourlier opened this issue 10 years ago • 7 comments

In some cases, you want to run your processes manually instead of relying on Invoker. These (minor) changes allow Invoker to be started with a config file defining such processes. In this case, no processes get spawn by Invoker but the DNS / port-proxying part works as expected.

Example of a now valid config file:

[ruby-app]
port = 3000

[some-node-app]
port = 9001

You may also add a default config which will redirect any domain.dev to the specified port:

[default]
port = 3000

rchampourlier avatar Mar 13 '16 16:03 rchampourlier

@rchampourlier @gnufied Any updates on this? I have an application that configures themes based on hostname and this would provide a way to make invoker start a single rails process plus multiple "hostnames" for that same process in the following way:

[myapp]
command = bundle exec rails server -b 0.0.0.0 --port 8081
port = 8081

[customer1]
port = 8081

[customer2]
port = 8081

I can provide an updated Pull Request if there's interest in this feature

juanger avatar Jul 13 '16 13:07 juanger

Couldn't you just use invoker add_http <process_name> <port> syntax to add a service which was started externally to invoker DNS/proxy?

But then may be this feature provides a way of doing this without using invoker add_http command? If there is enough demand for this - we can implement this feature. @rchampourlier can you rebase this branch against master?

gnufied avatar Aug 07 '16 03:08 gnufied

Hi,

@gnufied:

Yes, using invoker add_http <process_name> <port> was an option, but it requires you have an Invoker process started. And this requires to have at least one process to start through Invoker.

This PR allows to have no process started by Invoker at all, only using it for proxying.

I've rebased the PR from master 😄

@juanger: I'm not sure what needs to be changed on this PR for your use case. Feel free to complete it!

Sadly, I'm not using Invoker anymore, I've switched to manual /etc/hosts and Nginx, because Invoker stopped working some times ago (maybe due to my Docker native install). I just tested it while rebasing, it seems to work again, maybe I'll come back!

Best,

rchampourlier avatar Sep 04 '16 14:09 rchampourlier

@rchampourlier cool. Which OS you use it on btw? Linux or OSX ? Please file a bug report, I would love to debug and fix.

Also, looking into the PR. thank you for opening this.

gnufied avatar Oct 14 '16 15:10 gnufied

Any chance this will get merged? I would use this in a heartbeat.

etherbob avatar May 09 '17 16:05 etherbob

I'd love to have that feature too

wkrsz avatar May 15 '18 14:05 wkrsz

/cc @kgrz

iffyuva avatar May 15 '18 15:05 iffyuva