Created
April 8, 2018 15:22
-
-
Save gupta-himanshu/628fb98c68b0fabc1fd64dacc66a3f93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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