Deploy Java app from GitLab, GitHub or BitBucket repository.

In addition to deployment via Git, NodeChef also supports deploying Python projects by uploading from the dashboard or using the NodeChef CLI. See the menu on your left hand side on how to deploy by uploading your project folder from the dashboard.

NodeChef cloud supports deploying your Java projects together with a MongoDB, MySQL or PostgreSQL database if required with a few clicks. We automatically build your project and run it in Docker containers on bare metal servers for the best performanodechefe.

More details on NodeChef Java cloud hosting and what features are supported.

We support integrations with GitLab, GitHub or BitBucket making it easy to deploy code living in your repository to your app containers running on NodeChef.

To deploy, follow the below three steps and your Java app will be up and running in the cloud in no time. After deployment, you can proceed to add your custom domain.

Notes on Java projects.

Deploying Java, JVM applications from source

When the NodeChef runtime detects either one of these file types ("pom.xml", "pom.atom", "pom.clj", "pom.groovy", "pom.rb", "pom.scala", "pom.yaml", "pom.yml") in your project directory, it uses the open source Heroku Java buildpack to build your application. More details on this buildpack can be found here: https://github.com/heroku/heroku-buildpack-java

When the NodeChef runtime detects either one of these file types (gradlew, build.gradle, settings.gradle) in your project directory it uses the open source Heroku gradule buildpack. More details on this buildpack can be found here: https://github.com/heroku/heroku-buildpack-gradle

When the NodeChef runtime detects a project/build.properties file in your project directory and either a file ending with .sbt or .scala, it uses the open source Heroku scala buildpack. More details on this buildpack can be found here: https://github.com/heroku/heroku-buildpack-scala


Deploying JVM build artifact

You can build your application locally and simply deploy the .jar, .war, .zip file to NodeChef. In this case, NodeChef uses the CloudFoundry buildpack to create the application executable. More details on the CloudFoundry Java, JVM buildpack can be found here: http://docs.cloudfoundry.org/buildpacks/java/index.html


Example deploying Grails

// Build the application into a .war file ./grailsw war // Deploy the .war file to your server. nodechef deploy -i myapp -l target/grails-application-0.1.war

Example deploying Groovy

The Java Buildpack can run Groovy applications written with the Ratpack framework and from raw .groovy files (no pre-compilation).

nodechef deploy -i myapp

Example deploying Java Main

The Java Buildpack can run Java applications with a main() method provided that they are packaged as self-executable JARs

// building with Gradle example: gradle build // Or building with Maven example: mvn package // Finally deploy the JAR to your server and run it: nodechef deploy -i myapp -l target/java-main-application-1.0.0.BUILD-SNAPSHOT.jar

Example deploying Play framework

// bundle using play dist and deploy play dist nodechef deploy -i myapp -l target/universal/play-application-1.0-SNAPSHOT.zip // bundle using play stage and deploy play stage nodechef deploy -i myapp -l target/universal/stage

Example deploying Servlet packaged as a WAR file

gradle build nodechef deploy -i myapp -l build/libs/web-servlet-2-application-1.0.0.BUILD-SNAPSHOT.war

Example deploying Spring Boot CLI

// using spring grab spring grab *.groovy nodechef deploy -i myapp // using spring jar spring jar spring-boot-cli-application-1.0.0.BUILD-SNAPSHOT.jar *.groovy nodechef deploy -i myapp -l spring-boot-cli-application-1.0.0.BUILD-SNAPSHOT.jar

You can configure GitLab, GitHub or BitBucket integration from the NodeChef Dashboard. This integration makes it easy to deploy code living on GitHub, BitBucket or GitLab to your app containers running on NodeChef.

In the below example, we demonstrate deploying the application from source instead of an already built artifact. To deploy prebuilt artifacts, you will have to use the CLI or upload the ".jar", ".war", ".zip" file from the dashboard.