Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
set -e
echo "Going to App directory"
APP_DIR=/path/to/lagom-service
cd $APP_DIR
echo "Building Lagom dist"
sbt "project lagom-impl" "clean" "dist"
APP_UNIVERSAL=$APP_DIR/lagom-service/lagom-impl/target/universal
rm -rf $APP_UNIVERSAL/lagom-impl-0.1-SNAPSHOT
unzip $APP_UNIVERSAL/lagom-impl-0.1-SNAPSHOT.zip -d $APP_UNIVERSAL
echo "Setting configurations"
APP_LIB=$APP_UNIVERSAL/lagom-impl-0.1-SNAPSHOT/lib
APP_CLASSPATH=$APP_LIB/*
JAVA_OPTS=""
JMX_CONFIG=""
PLAY_SECRET=none
CONFIG_FILE=/path/to/application.conf
CONFIG="-Dplay.crypto.secret=$PLAY_SECRET -Dlagom.cluster.join-self=off -Dorg.xerial.snappy.use.systemlib=true -Dconfig.file=$CONFIG_FILE"
PLAY_SERVER_START="play.core.server.ProdServerStart"
exec java -cp "$APP_CLASSPATH" $JAVA_OPTS $JMX_CONFIG $CONFIG $PLAY_SERVER_START
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment