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

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rchampourlier
Copy link

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 rchampourlier changed the title Allowing processes with no commands Proxy-only mode: allowing processes with no commands, + default port Apr 2, 2016
@juanger
Copy link

juanger commented Jul 13, 2016

@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

@gnufied
Copy link
Contributor

gnufied commented Aug 7, 2016

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?

Romain Champourlier added 7 commits September 4, 2016 15:41
Minor changes to allow Invoker to run with a config file defining processes without command. With such config, only the DNS / port-proxying feature of Invoker is used.
- Updated the specs after rebasing on master.
@rchampourlier
Copy link
Author

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,

@gnufied
Copy link
Contributor

gnufied commented Oct 14, 2016

@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.

@etherbob
Copy link

etherbob commented May 9, 2017

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

@wkrsz
Copy link

wkrsz commented May 15, 2018

I'd love to have that feature too

@iffyuva
Copy link
Member

iffyuva commented May 15, 2018

/cc @kgrz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants