Skip to content

Instantly share code, notes, and snippets.

@olegbuevich
Created July 21, 2017 14:06
Show Gist options
  • Save olegbuevich/0013c12988c4e9fdd3cb1ec2ad053069 to your computer and use it in GitHub Desktop.
Save olegbuevich/0013c12988c4e9fdd3cb1ec2ad053069 to your computer and use it in GitHub Desktop.
upstart config for Rocket.Chat (work in Centos 6)
description "rocketchat application server"
# Wait for mongod before starting rocketchat app··
start on (started mongod)
stop on runlevel [!2345]
# Automatically attempt to restart with finite limits
respawn
respawn limit 99 5
# Export necessary variables and start the Applications / Services
script
export MONGO_URL="mongodb://user:password@localhost:27017/rocketchat"
export ROOT_URL="https://rocketchat.example.com"
export PORT=3000
exec su -m -c "/usr/bin/node /opt/Rocket.Chat/main.js" rocketchat
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment