-
Notifications
You must be signed in to change notification settings - Fork 1
/
wo.conf
51 lines (42 loc) · 2.13 KB
/
wo.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# copy this file to /etc/init/wo.conf
description "Web Observatory"
author "Xin Wang <[email protected]>"
# When to start the service
start on started mongodb and runlevel [2345]
# When to stop the service
stop on shutdown
# Automatically restart process if crashed
respawn
respawn limit 10 5
# we don't use buil-in log because we use a script below
# console log
# drop root proviliges and switch to mymetorapp user
setuid wo
setgid wo
script
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript
# set to home directory of the user Meteor will be running as
export PWD=/home/wo
export HOME=/home/wo
# leave as 127.0.0.1 for security
export BIND_IP=127.0.0.1
# the port nginx is proxying requests to
export PORT=4000
# this allows Meteor to figure out correct IP address of visitors
export HTTP_FORWARDED_COUNT=1
# MongoDB connection string using todos as database name
export MONGO_URL=mongodb://localhost:27017/wo
# The domain name as configured previously as server_name in nginx
export ROOT_URL=https://dev-001.ecs.soton.ac.uk
# optional JSON config - the contents of file specified by passing "--settings" parameter to meteor command in development mode
# export METEOR_SETTINGS= '{"public": {"environment": "prod"}, "github": {"clientId": "", "secret": ""}, "facebook": {"appId": "", "secret": ""} }'
# this is optional: http://docs.meteor.com/#email
# commented out will default to no email being sent
# replace USERNAME and PASS by your username and password there
# export MAIL_URL=smtp://USERNAME:[email protected]
# alternatively install "apt-get install default-mta" and uncomment:
export MAIL_URL=smtp://localhost
exec node /home/wo/bundle/main.js >> /home/wo/wo.log
end script
#One thing to notice in this configuration file is the METEOR_SETTINGS parameter. If you use meteor --settings config.json when launching Meteor's development mode, then you should paste the contents of config.json as a variable in METEOR_SETTINGS.