Skip to content

Instantly share code, notes, and snippets.

@grahamoregan
Created July 22, 2016 10:27
Show Gist options
  • Save grahamoregan/8224e83eab7a54e6c9a632fd1ac886b4 to your computer and use it in GitHub Desktop.
Save grahamoregan/8224e83eab7a54e6c9a632fd1ac886b4 to your computer and use it in GitHub Desktop.
description "backend"
start on stopped cloud-final
stop on runlevel [06]
respawn
# limit respawning to 30 times in 2 minutes
respawn limit 30 120
# Prevent OOM killer from killing this process
oom never
# time in seconds
kill timeout 10
limit nofile 65536 65536
setgid ubuntu
setuid ubuntu
pre-stop script
echo "Stopping backend"
end script
script
chdir /opt/deploy
exec java -jar backend.jar server config.yml
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment