herokuish: Cannot execute any Procfile commands

For some reason I can run herokuish test just fine, however herokuish procfile start web is failing and not printing any kind of message. It just exits with code 8. I also tried playing around interactively and didn’t have any luck. herokuish procfile exec echo test or any other command will exit with code 8 as well.

docker-compose.yml

version: '2'
services:
  web:
    image: gliderlabs/herokuish
    volumes:
      - .:/tmp/app
    ports:
      - 3000:3000
    entrypoint: ["/bin/herokuish"]
    # command: ["test"]
    # command: ["procfile", "start", "web"]

Procfile

web: bin/rails server -p $PORT

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

The readme doesn’t say it, but you are supposed to specify $USER environment variable. That variable controls the non-privileged user that will run your app.

This is optional and not required ☝️

This is the normal usage of herokuish to build and run an app 👇

$ docker run -ti -v ${PWD}/buildpacks/buildpack-nodejs/tests/nodejs-express:/tmp/app gliderlabs/herokuish:latest /build

-----> Node.js app detected

-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true

-----> Installing binaries
       engines.node (package.json):  0.10.x
       engines.npm (package.json):   1.2.x
....
$  docker ps -a | grep herokuish
8dd7fe05d726    gliderlabs/herokuish:latest    "/build"    44 seconds ago    Exited (0) 25 seconds ago 
   optimistic_kare
$ docker commit 8dd7fe05d726 nodeapp:latest
$ docker run -ti -p5000:5000 nodeapp:latest /start web
Could not determine a reasonable value for WEB_CONCURRENCY.
This is likely due to running the Heroku NodeJS buildpack on a non-Heroku
platform.

WEB_CONCURRENCY has been set to 1. Please review whether this value is
appropriate for your application.

Server listening on port 5000 in production mode

The build command will take your app repo from the /tmp/app mount and move the built product to /app in the resulting container image. You must then commit that to a local tag and run /start web (replacing web with whatever the appropriate Procfile key you’ve defined)

The mistake in your flow was that you were attempting to run your app from the gliderlabs/herokuish image instead of the output of the /build container.

We would definitely accept a PR that made this flow more clear in the README.

  • dokku relys on buildpacks to build as a specific App (ex: python Django app).

If it show gunicorn not found means this app is not detected as a Python app. For my case, I also encountered this error since I installed npm . Because it is detected as a node.js. Thus, it installed heroku-nodejs-plugin and node instead of python under path: /app/.heroku.

  • To solve this problem: specify the buildpack using dokku command: dokku buildpacks:set <app name> https://github.com/heroku/heroku-buildpack-python.git And then push code again, it will get fix. Check documentation for setting buildpacks if needed.