dokku / dokku

A docker-powered PaaS that helps you build and manage the lifecycle of applications
https://dokku.com
MIT License
29.37k stars 1.92k forks source link

cat: /app/Procfile: No such file or directory #2341

Closed madshargreave closed 8 years ago

madshargreave commented 8 years ago

Description of problem:

I am no longer able to deploy my Elixir/Phoenix app using Dokku on a DigitalOcean Linux droplet, as I get the following error every time.

Buildpacks:

https://github.com/HashNuke/heroku-buildpack-elixir.git
https://github.com/madshargreave/geo_buildpack.git

No Dockerfile or Procfile

I am not sure if related, but the problem seemed to occur around the time I added a docker-options--restart=always`, I tried removing it, but it does not help

--- {}
-----> Discovering process types
-----> Releasing staging (dokku/staging:latest)...
-----> Deploying staging (dokku/staging:latest)...
-----> DOKKU_SCALE file found (/home/dokku/staging/DOKKU_SCALE)
=====> web=1
-----> Running pre-flight checks
       For more efficient zero downtime deployments, create a file CHECKS.
       See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
       CHECKS file not found in container: Running simple container check...
-----> Waiting for 10 seconds ...

f2a2447804bf47219c1d8b4e82ee2208e1985de7c0ddd4776f0e78c4d2bacd4b
remote: App container failed to start!!
=====> staging container output:
cat: /app/Procfile: No such file or directory
       setuidgid: usage: setuidgid account child
       cat: /app/Procfile: No such file or directory
       setuidgid: usage: setuidgid account child
       cat: /app/Procfile: No such file or directory
       setuidgid: usage: setuidgid account child
       cat: /app/Procfile: No such file or directory
       setuidgid: usage: setuidgid account child
       cat: /app/Procfile: No such file or directory
       setuidgid: usage: setuidgid account child
       cat: /app/Procfile: No such file or directory
       setuidgid: usage: setuidgid account child
       cat: /app/Procfile: No such file or directory
setuidgid: usage: setuidgid account child
=====> end staging container output
remote: Error response from daemon: Cannot kill container f2a2447804bf47219c1d8b4e82ee2208e1985de7c0ddd4776f0e78c4d2bacd4b: Container f2a2447804bf47219c1d8b4e82ee2208e1985de7c0ddd4776f0e78c4d2bacd4b is not running

Output of the following commands

Server: Version: 1.11.0 API version: 1.23 Go version: go1.5.4 Git commit: 4dc5990 Built: Wed Apr 13 18:34:23 2016 OS/Arch: linux/amd64

josegonzalez commented 8 years ago

Can you include all of the information we ask for in our issue template? It is helpful for debugging problems. Thanks.

madshargreave commented 8 years ago

Sorry about that, updated with as much info/outputs as I could

michaelshobbs commented 8 years ago

I'm guessing those buildpacks don't spit out a .release file that is usable by herokuish. I wonder, does this app works on Heroku?

The quickest probable fix is to define a Procfile with a web proc type that runs your app as expected. https://devcenter.heroku.com/articles/procfile

josegonzalez commented 8 years ago

When Heroku writes the .release file, it doesn't "merge" the .release files, and your last buildpack doesn't write a proper .release file. Since you don't have a Procfile, neither Dokku nor Heroku will run a command.

Here is the relevant logging output from Heroku:

remote: -----> Discovering process types
remote:        Procfile declares types -> (none)

Dokku/Herokuish just doesn't output that nothing was detected:

-----> Discovering process types

App confirmed not to work on Dokku or Heroku without the following Procfile:

web: mix run --no-halt

Closing as we're following what Heroku does here and it's clear that this is an app issue. If you reverse the order of the buildpacks, everything should start fine.