...I would probably simply push out an uberjar
with lein which I would run with Java via an init script--for example,
if using Ubuntu:
http://upstart.ubuntu.com/cookbook/#run-a-java-application
I want to try this but I still cannot put the pieces together about how to do it. Can you give more details? Let's say I created the uberjar with lein uberjar, then how do I tell nginx to run that?
server {listen 80;location / {proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header Host $http_host;proxy_redirect off;proxy_pass http://127.0.0.1:4000;}}
cd /etc/nginx/sites-enabled
ln -s <app-name> ../sites-available/<app-name>
description "<description of server>"author "<your name>"start on startupstop on shutdown
setuid deploychdir /deployconsole log
env PORT=4000exec java -jar <name of uberjar file>.jar
reload nginx
start <app-name>
java -jar myapp-0.1.0-SNAPSHOT-standalone.jar
I have found in the past I needed to reload-configuration of initctl. Maybe try that?
Mark
Sent from my mobile doohickey