That's what I'm doing:
description "meteor app server" start on runlevel [2345] stop on runlevel [06] respawn respawn limit 10 5 pre-start script set -e rm -f /path/to/your/app/.meteor/local/db/mongod.lock end script exec /bin/su - ec2-user -c '/path/to/your/app/meteor_server.sh' post-stop script pkill -f meteor end script
meteor_server.sh script contains:
cd /path/to/your/app/; meteor run -p 3000 --production
Make sure chmod +x meteor_server.sh script and change the path to your application in three places. The script also kills all meteor tasks when it is stopped, so it works to run a single meteorite application only on your server. I got a meteorite app that starts quickly using nginx, but node seems to be consuming a lot of memory.
radtek
source share