gogolok / cloudfoundry-buildpack-elixir

Cloud Foundry Buildpack for Elixir
MIT License
11 stars 12 forks source link

Error message: No start command detected #4

Closed joshprice closed 7 years ago

joshprice commented 8 years ago

I get the error

No start command detected; command must be provided at runtime

even though command is set in the manifest.yml:


---
instances: 1
memory: 64M
disk_quota: 256M
buildpack: https://github.com/gogolok/cloudfoundry-buildpack-elixir
command: mix phoenix.server

or set on the command line:

✪ cf push phoenix-test -c "mix phoenix.server"

https://github.com/cloudfoundry-incubator/buildpack_app_lifecycle/blob/master/buildpackrunner/runner.go#L91-L93 is the only reference I could find to this error message, but not sure how to configure this to prevent the error.

/cc @DylanGriffith

joshprice commented 8 years ago

It appears that bin/release is missing the start command configured in the Elixir buildpack

Compare https://github.com/gogolok/cloudfoundry-buildpack-elixir/blob/master/bin/release with https://github.com/HashNuke/heroku-buildpack-elixir/blob/342f1d3e37c4625d54f422c715a8f6d009d23a4e/bin/release#L7-L8

joshprice commented 8 years ago

Looks like this commit removes the start command https://github.com/gogolok/cloudfoundry-buildpack-elixir/commit/dbe52aa119acd845c42319684ba1e3911a8972c4

joshprice commented 8 years ago

Although this error doesn't seem to be a problem by itself if you supply a command parameter, it stumped me for some time because I was having trouble getting an app started and this was the only visible error causing me to think that this was the problem when it wasn't.

joshprice commented 7 years ago

Solution to this is to add a Procfile as described here https://github.com/HashNuke/heroku-buildpack-elixir#other-notes