Created
September 3, 2013 20:35
-
-
Save mveitas/6429190 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Dropwizard Service - <%= @service_name %> | |
# | |
# <%= @service_description %> | |
description "<%= @service_name %>" | |
start on filesystem | |
stop on runlevel S | |
respawn | |
respawn limit 10 5 | |
oom never | |
kill timeout 86400 #If it's given a stop order, this is how long it will take to stop. | |
limit nofile 1048576 1048576 | |
setgid <%= node['dropwizard']['group'] %> | |
setuid <%= node['dropwizard']['user']['name'] %> | |
# The sed script below will remote the comments from the .jvm.conf | |
script | |
exec /usr/bin/java \ | |
$(sed -e '/^[ ]*\/\//d' -e 's|[ ]*//.*| |' -e 's|^| |' <%= node['dropwizard']['service']['path'] %>/<%= @service_name %>.jvm.conf | tr -d "\n") \ | |
-jar <%= node['dropwizard']['service']['path'] %>/<%= node['dropwizard']['service']['jar_file'] %>.jar server <%= node['dropwizard']['service']['path'] %>/config.yml >> /var/log/<%= @service_name %>/sysout.log 2>&1 | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment