Heroku Deploy War with Jetty Runner - heroku

I'm looking for the way to deploy my app in Heroku with Jetty Runner. By not using Heroku Git (Deploy your application to Heroku
) as way of deployment.
heroku war:deploy <path_to_war_file> --app <app_name>
Will run the war with Tomcat Web Runner according to this documentation Deployment with the Heroku CLI.
The Heroku CLI Deploy Plugin deploys a local WAR file to Heroku and
runs it with Tomcat Webapp-Runner
I would like to know if there's a Jetty Runner equivalent.

Here is the one from heroku devcenter.
Ensure you have your Procfile created as mentioned in the article
Optinally ensure to run heroku ps:scale web=1 to allocate a dyno to your project

Related

How can i deploy my spring boot application to github actions self hosted runner?

I want to deploy my application to my internal host machine.
This host has been added as my github runner.
In the github action step, I am running ./gradlew bootRun for my github runner. The application starts, but after the github actions workflow run, it is killed by a cleanup.
Terminate orphan process: pid (11111) (java)
Is github runners only for running a workflow. Should i be able to deploy my application such way?
Whats the right way to deploy my spring boot applcation to my internal host machine?

How do you deploy Maven project from Github to Heroku automatically?

So I have a Maven project and I'd like to deploy it on Heroku via Github. To be more precise I want to use automatic deployments where when I push to my master branch only then is it deployed. The only thing I found for Maven is that I add a dependency and it would deploy to Heroku from my machine (which I essentially don't want).
I really don't know what else to say as I had 0 progress. For now I am just pushing my target as well and then just running the target jar file. But I'd like to just send over my source code and for Heroku to build the project.
Alright, so I found my solution.
I saw an example (I can't find it now, no luck) for Heroku that build the project with a thing called mvnw script which is a Maven wrapper when it's not installed on the system. I added it and the .mvn directory but it didn't start by itself like how it is written on Heroku (it should run it when it's detected), no problem really.
I then edited my Procfile and instead of:
web: java -jar target/my-file.jar
I am using:
web: ./mvnw clean package; java -jar target/my-file.jar
And everything works well!
You only need to integrate your GitHub repository on Heroku, and define the automated deployment of the master branch (each push will trigger a deployment).
Heroku will build the JAR and take care of the deployment, you need though to define the Java version in a system.properties and create an Uber-Jar (ie including all dependencies).

Grails GraphQL plugin - controller not running when deployed to Heroku

I have a simple Grails-React app using the React profile that works fine locally but has an issue with the GraphQL plugin not being loaded when deploying to Heroku, it uses:
Grails 3.3.10
JDK 8
Gradle 4.4 (locally) remote on Heroku? I don't know.
Grails React profile
GraphQL plugin 1.0.3.BUILD-SNAPSHOT
The code is here: https://github.com/wellsst/grails3-react-diceware
Running locally with server:bootRun and heroku local -f ProcfileLocal the log entry appears:
INFO --- [ main] g.plugins.DefaultGrailsPluginManager : Grails plug-in [gormGraphql] with version [1.0.3.BUILD-SNAPSHOT] loaded successfully
But remotely on Heroku no errors are shown nor is any logging for GraphQL.
Hitting the "application" controller I see nothing GraphQL and only 1 controller:
{"message":"Welcome to Grails!","environment":"production","appversion":"1","grailsversion":"3.3.10","appprofile":"react","groovyversion":"2.4.17","jvmversion":"1.8.0_222-heroku","reloadingagentenabled":false,"artefacts":{"controllers":1,"domains":1,"services":0},"controllers":[{"name":"grails3.react.diceware.ApplicationController","logicalPropertyName":"application"}],"plugins":[{"name":"i18n","version":"3.3.10"},{"name":"dataBinding","version":"3.3.10"},{"name":"restResponder","version":"3.3.10"},{"name":"jsonView","version":"1.2.9"},{"name":"eventBus","version":"3.3.2"},{"name":"core","version":"3.3.10"},{"name":"dataSource","version":"3.3.10"},{"name":"codecs","version":"3.3.10"},{"name":"controllers","version":"3.3.10"},{"name":"urlMappings","version":"3.3.10"},{"name":"mimeTypes","version":"3.3.10"},{"name":"domainClass","version":"3.3.10"},{"name":"converters","version":"3.3.10"},{"name":"controllersAsync","version":"3.3.2"},{"name":"hibernate","version":"6.1.12"},{"name":"services","version":"3.3.10"},{"name":"interceptors","version":"3.3.10"},{"name":"cache","version":"4.0.1"}]}
I am suspecting it is the version of gradle on Heroku or something about how the GraphQL plugin is configured. Ideas?
My fudge around for this was to deploy to Cloud Foundry, no issues. I suspect it around the different versions of gradle (locally vs remote)

Heroku deployment of Gradle application: pom.xml missing

I have an existing Maven based application on Heroku that I want to replace with a JHipster generated, Gradle based one. The steps I took were:
Develop the new Gradle based application using JHipster
run jhipster heroku
git merge heroku --strategy ours
git push heroku
Most of the deployment succeeds (Node.js app detected, webpack logging), but then I get an error:
Could not find a pom.xml file! Please check that it exists and is committed to Git.
It is correct that there is no pom.xml, because now it is a Gradle application. But apparently, Heroku still expects a Maven based one. Where is this knowledge stored and how can I reset it?
Already found out. You have to run this command, to remove the Maven build pack:
heroku buildpacks:clear
Additionally, in my case I also had to set:
heroku buildpacks:set heroku/nodejs
Or Heroku didn't know whether to run as Gradle or NodeJS. The latter is needed for JHipster based applications.

CircleCI and Heroku automatic deployment

I'm trying to configure automatic deploy on Heroku integrated with CircleCI.
On Heroku Dashboard, at the Deploy tab, I have the option to configure an automatic deploy for a specific branch and there is an option "Wait for CI to pass before deploy". What happens when I have both this and the circle.yml configured for an automated deploy on Heroku? Will the app be deployed twice?
Yes it will.
CircleCi and Heroku will trigger building and deploying process at the same time

Resources