drie

drie documentation

Welcome to the drie documentation. You'll find comprehensive guides and documentation to help you start working with drie as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Support

Deploy a Java REST API Server on drie

Quickstart on how to run a simple Java REST API server with the Spark Microframework on drie

This tutorial assumes that you've installed and configured:

1. Get the Java drie starter app

Download the java-drie-starter-app. It has all the drie-specific files you need to add in order to properly deploy an app on drie (.buildpacks, Procfile)

$ git clone https://github.com/mraym/java-drie-starter-app.git

2. Test that the Java Spark Microframework app runs locally

$ cd java-drie-starter-app
$ mvn clean install								# builds the java project
$ export PORT=5000								# need to set a high-number port for dev jetty server
$ java -jar target/helloworld.jar	# runs the jetty server

This should start the app at http://localhost:5000/say-hello-drie (or whichever $PORT env variable is set to).

3. Add and Deploy the app to drie

$ drie app add UNIQUE_APP_NAME		# adds the app to drie. Make sure to use a unique app name.
$ drie app deploy 								# deploys the app on drie 
$ drie app scale 1								# starts the app scaled to 1 instance

At the moment, you will have to periodically run 'drie app show' on the deploy and scale commands and wait for the status to change from 'deploying' to 'deployed'.

4. Confirm that your app is running on drie

$ drie app show
App java-drie-starter-app
=========================
status: deployed
id: 021eb4db-7c58-4ae7-bf94-795c4188eb06
deployed commit: ced4023771aaef5a121403d0a7030d2e034f83b1
build repo: git@github.com:mraym/java-drie-starter-app.git

web address
======
web_UNIQUE_APP_NAME.app.drie.co

processes
======
1 web

config
======
REPO_URI=git@github.com:mraym/java-drie-starter-app.git

After a while, the status of your app will be 'deployed' and the web address will become available:
http://web_UNIQUE_APP_NAME.app.drie.co/say-hello-drie.
Congratulations! Your Java REST API Spark Microframework app is now deployed on drie!

Deploy a Java REST API Server on drie

Quickstart on how to run a simple Java REST API server with the Spark Microframework on drie