I have a Ratpack application which I am attempting to deploy on Heroku. I am deploying through snap-ci, this says passed when I click to deploy to Heroku. However in my error logs I get this error:
2017-02-12T15:41:19.016616+00:00 app[web.1]: bash:
build/install/Football-Prototype/bin/Football-Prototype: No such file
or directory 2017-02-12T15:41:19.117897+00:00 heroku[web.1]: State
changed from starting to crashed
My procfile file is as follows:
web: build/install/Football-Prototype/bin/Football-Prototype/
And this is my project structure.
Am I doing something wrong in my Procfile file? I followed the Ratpack instructions from their website. The react files get built into a JS and CSS file and included in the resources of my Ratpack project so I don't think this will have an effect.
Related
I'm having trouble deploying my app to Heroku. I don't have this issue with an app I started several months ago so I think it must be something wrong with the lastest Angular Fullstack. After several hours of trouble shooting I decided to start from scratch just to see if AngularFullstack would deploy if you create a completely fresh app in an empty directory.
I created the app in the terminal with:
yo angular-fullstack
Without doing anything else I deployed the app to Heroku by typing this in the terminal:
yo angular-fullstack:heroku
Finally I went to the Heroku webaddress and I get the following "Application Error":
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
When I look at the Heroku logs I get the exact same error I was getting in my finished project:
Error: ENOENT, no such file or directory '/app/dist/public/favicon.ico'
I've tried putting this file everywhere in my directory structure. There is no 'dist' in directory structure of the new app. I put this directory in the old app with grunt serve:dist but that doesn't fix the problem of locating favicon.ico even though it is there in the public folder. There is no 'app' directory at the top however and it begins looking all the way in my Mac 'User' path. I think this part of the problem that I don't know how to fix.
I created a app for Angular manually, his structure and all stuff.
To run it locally I'm using http-server.
How can I deploy it to Heroku in order to inform what server to run (probably in Procfile)?
Create a Procfile just called Procfile (no extension) in the root of your app. Within that file use web: to tell heroku what to run. For example:
web: coffee server.coffee
Has anyone tried deploying a Revel app using Dokku?
I tried "https://www.digitalocean.com/community/tutorials/how-to-use-the-dokku-one-click-digitalocean-image-to-run-a-go-app" and it deployed successfully.
However, when I try a new Revel app, it gives me this error
remote: mv: cannot stat `/build/app/.heroku/g/bin/*': No such file or directory
This is the .godir that I created:
myappname
This is the Procfile:
myappname
What am I doing wrong?
Thanks
Since Revel is a web app (receiving incoming HTTP traffic), you need to declare a web process type in your Procfile, i.e.:
web: myappname ## Procfile requires a Unix process declaration
This tells Dokku what command to run to start the web process on the server -- in this case myappname.go in your project root.
Leave off the .go file extension in the Procfile.
Dokku is a "Docker powered mini-Heroku" so Heroku's support docs are relevant:
The unix process model is a simple and powerful abstraction for running server-side programs. Applied to web apps, the process model gives us a unique way to think about dividing our workloads and scaling up over time. The Heroku Cedar stack uses the process model for web, worker and all other types of dynos.
-- from Process Types and the Procfile - Heroku Dev Center
Note that the standard Go Buildpack for Heroku/Dokku needs either a Godeps directory, or the deprecated method of including a .godir file.
You need to use the revel buildpack instead of the Go one. The buildpack will generate the Procfile for you.
Be sure to:
Add a .env file with this in your project: BUILDPACK_URL=https://github.com/revel/heroku-buildpack-go-revel.
Add a .godir file with the argument you use to run your app, e.g. github.com/yourcompany/yourrepo.
I'm following through this tutorial when finally deploying to Heroku via git push heroku master, and visiting the webpage, it fails with an Application Error. heroku logs has the following:
2013-12-18T18:27:30.109623+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=${PORT} -DapplyEvolutions.default=true -Ddb.default.url=${DATABASE_URL} -Ddb.default.driver=org.postgresql.Driver`
2013-12-18T18:27:31.051319+00:00 app[web.1]: bash: target/start: No such file or directory
Indeed, there's no target/start file at all. How do I fix this?
Change Procfile to:
web: target/universal/stage/bin/play ...
The location of play has changed
I am following this blog to upload a Dart app to Heroku and run it. I have gotten to the point where the app is successfully deployed to Heroku, but the app is not running. The following is from the Heroku logs:
2012-12-20T18:04:57+00:00 heroku[web.1]: Starting process with command `dart TestApp.dart`
2012-12-20T18:04:57+00:00 app[web.1]: bash: dart: command not found
2012-12-20T18:04:58+00:00 heroku[web.1]: Process exited with status 127
2012-12-20T18:04:58+00:00 heroku[web.1]: State changed from starting to crashed
The following is the contents of my Procfile
web: dart TestApp.dart
Can anyone point me towards a solution to this error?
You should have forgotten to add the buildpack to the config. See the getting started of Heroku Buildpack for Dart.
Basically, you have to use the following commands :
$> heroku create myapp_name -s cedar
$> heroku config:add BUILDPACK_URL=https://github.com/igrigorik/heroku-buildpack-dart.git
WARNING : With the last version of buildpack it seems dart command is no more in the PATH. A workaround is to use the full path in Procfile:
web: ./dart-sdk/bin/dart TestApp.dart