mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 02:45:40 +08:00
sample ubuntu upstart config file
This commit is contained in:
parent
08550bf625
commit
58eec31351
31
config/discourse.config.sample
Normal file
31
config/discourse.config.sample
Normal file
@ -0,0 +1,31 @@
|
||||
# this is a sample Discourse upstart script that can be used in Ubuntu
|
||||
# To use ensure you create wrappers for both bundler and bluepill using:
|
||||
#
|
||||
# rvm wrapper $(rvm current) bootup bluepill
|
||||
# rvm wrapper $(rvm current) bootup bundle
|
||||
#
|
||||
|
||||
description "Discoure process"
|
||||
setuid discourse
|
||||
respawn
|
||||
respawn limit 3 30
|
||||
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [06]
|
||||
|
||||
env RUBY_GC_MALLOC_LIMIT=90000000
|
||||
env RAILS_ROOT=/var/www/discourse
|
||||
env RAILS_ENV=production
|
||||
env NUM_WEBS=4
|
||||
env HOME=/home/discourse
|
||||
env USER=discourse
|
||||
env GROUP=discourse
|
||||
|
||||
script
|
||||
# runs in sh, move it to bash so we can source rvm
|
||||
exec /bin/bash <<EOT
|
||||
source /home/discourse/.rvm/scripts/rvm
|
||||
cd /var/www/discourse
|
||||
exec /home/discourse/.rvm/bin/bootup_bluepill --no-privileged load /var/www/discourse/config/discourse.pill
|
||||
EOT
|
||||
end script
|
Loading…
x
Reference in New Issue
Block a user