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.
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
Before you run any of the example commands given below, CD to the directory of your project folder. đ
Example deploying Grails
./grailsw war
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
gradle build
mvn package
nodechef deploy -i myapp -l target/java-main-application-1.0.0.BUILD-SNAPSHOT.jar
Example deploying Play framework
play dist
nodechef deploy -i myapp -l target/universal/play-application-1.0-SNAPSHOT.zip
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
spring grab *.groovy
nodechef deploy -i myapp
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.