Proxy-only mode: allowing processes with no commands, + default port
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 @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
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?
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 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.
Any chance this will get merged? I would use this in a heartbeat.
I'd love to have that feature too
/cc @kgrz