I’m just looking to run a ring server on bootup. I’m using ubuntu 12.04 and was wondering how other people deployed their apps.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The upstart cookbook was pretty daunting… but it was easier than I thought. The upstart script is actually quite straight forward to write.
Here are the steps I took to get it working:
(1) In your project.clj, put a
:mainkeyword pointing to the class to run. eg:(2) Then in the class, add a
:gen-classdirective to the namespace as well as a-mainfunction:(3) Use lein uberjar in to generate the jar file:
(4) Make sure that the
.jarfile runs:and also test it outside of your project directory because there may be problems with files in your
resourcesdirectory that you may not be aware of:(5) If everything works, the upstart file is placed in /etc/init/.conf.
My script was 5 lines:
(6) Test to see if the service works: