Skip to content

Instantly share code, notes, and snippets.

@hpcorona
Last active August 29, 2015 14:22
Show Gist options
  • Save hpcorona/7a1d7749426accd9a22f to your computer and use it in GitHub Desktop.
Save hpcorona/7a1d7749426accd9a22f to your computer and use it in GitHub Desktop.
Play Application Upstart
description "Play Upstart Application"
version "1.0"
env HOME=/path/to/app
env APP=appname
env USER=user
env GROUP=group
env PORT=9000
env ADDRESS=127.0.0.1
env CONFIG=application.conf
env SBTMEM=256
env EXTRA="-Xms128M -Xmx512m -server"
start on runlevel [2345]
stop on runlevel [06]
respawn
respawn limit 10 5
umask 022
expect daemon
exec start-stop-daemon --pidfile ${HOME}/target/universal/stage/RUNNING_PID --chuid $USER:$GROUP --exec ${HOME}/target/universal/stage/bin/${APP}_server --background --start -- -Dconfig.resource=$CONFIG -Dhttp.port=$PORT -Dhttp.address=$ADDRESS $HOME $EXTRA >> /tmp/${APP}.log 2>> /tmp/${APP}.err
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment