Skip to content

Conversation

@gnufied
Copy link
Contributor

@gnufied gnufied commented Apr 2, 2015

This implements #116 building on top of work done in #117

The net result is:

chat.app.dev: node chat.js
app.dev: bundle exec rails s

EDIT: Actually since . is not allowed in Procfile labels, above will not work with Procfiles.

or in ini Format:

[chat.app]
command = node chat.js
directory = .

[app]
command = bundle exec rails s
directory = .

And the chat.app.dev will point to chat app and app.dev will point to Rails app as expected. Any other subdomains over app.dev will still go to the Rails app and hence foo.app.dev will go to Rails app.

gnufied pushed a commit that referenced this pull request Apr 2, 2015
@gnufied gnufied merged commit 5011519 into master Apr 2, 2015
@gnufied gnufied deleted the tjlivesey-master branch April 2, 2015 11:55
@localredhead
Copy link

I tried pulling down master and building/installing the gem locally - though I was not very successful in adding things to my Procfile that contain a period in the service name. i.e. www.app.dev or www.app

I'll wait for the gem update.

@gnufied
Copy link
Contributor Author

gnufied commented Apr 2, 2015

I think thats because Procfile specs do not allow . in process labels, https://github.com/ddollar/foreman/blob/master/lib/foreman/procfile.rb

So, foo.bar: bundle exec rails s is a not parsed correctly. I suppose, we can extend the Procfile syntax to support . in the name but I am hesitant to deviate from official specs.

@localredhead
Copy link

That is a shame but IMHO its best not to stray from the the procfile spec if its a format that will be supported.

What if invoker used symlinks for HTTP services like POW, and then procfiles and INI's for everything else?

I apologize if this has already been asked before. I cringe at making the suggestion, but I have a few reasons why I ask:

  1. It would allow Procfiles and INI's to have parallel functionality. I think this is really important.
  2. The symlinks are very flexible in terms of naming
  3. It could, perhaps, be easier to support things like www.app and app.dev and admin.app.dev
  4. It seperates concerns. For example ~/.invoker/http/ could contain all symlinks mimmicking POW, and the Procfiles and INI's can be for configuring the services that are linked.
  5. The invoker add_http command could actually persist the value as a symlink.

Again, I am sorry if this suggestion is offensive to the directions or decisions that have been made previously. I feel like POW is a bit more usable because of its ability to support subdomains with a simple symlink and I think if Invoker had the same paradigm it would be easier to adopt.

Thoughts?

@gnufied
Copy link
Contributor Author

gnufied commented Apr 3, 2015

Well, Pow can only manage http only programs whereas Invoker is a generic process supervisor which can manage pretty much anything.

I am not keen on supporting symlink feature for Invoker. I spoke with Foreman author though and apparently not allowing . in process labels was a minor oversight. There is no particular reason Procfiles can't support that. So I am looking forward to update Procfile specs so as . is allowed in Procfile names, so as Invoker can support it too.

@localredhead
Copy link

Even better 👍

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.

3 participants