Skip to content

trepidacious/openshift-cartridge-scala

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenShift scala Cartridge

Use it

In OpenShift, choose a downloaded cartridge, with the following URL : http://cartreflect-claytondev.rhcloud.com/reflect?github=trepidacious/openshift-cartridge-scala

On git push, sbt compile will be called, then the script start.sh at the root of your repo will be called.

Example of start.sh script:

#!/bin/bash
sbt run com.example.Boot.main

Make sure start.sh is an executable file: chmod +x start.sh

In your application listen on the environment variable $OPENSHIFT_SCALA_IP:$OPENSHIFT_SCALA_PORT

interface = System.getenv("OPENSHIFT_SCALA_IP")
port = System.getenv("OPENSHIFT_SCALA_PORT").toInt

This cartidge embed a spray example, but you could use any framework as long as sbt is used for compilation.

About

WIP: compilation is killed before the end

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 54.3%
  • Shell 45.1%
  • HTML 0.6%