Provide hosts as environment settings and add npm run start script

This commit is contained in:
James Allen 2017-12-29 08:12:31 +00:00
parent c864cd24bf
commit a4cc02dbc3
3 changed files with 7 additions and 3 deletions

View file

@ -36,5 +36,5 @@ module.exports = RangeManager =
_safeObjectId: (data) ->
try
return ObjectId(data)
catch
catch error
return data

View file

@ -5,10 +5,10 @@ module.exports = Settings =
internal:
docstore:
port: 3016
host: "localhost"
host: process.env['LISTEN_ADDRESS'] or "localhost"
mongo:
url: 'mongodb://127.0.0.1/sharelatex'
url: "mongodb://#{process.env['MONGO_HOST'] or '127.0.0.1'}/sharelatex"
docstore:
healthCheck:

View file

@ -7,6 +7,10 @@
"type": "git",
"url": "https://github.com/sharelatex/docstore-sharelatex.git"
},
"scripts": {
"compile:app": "coffee -o app/js -c app/coffee && coffee -c app.coffee",
"start": "npm run compile:app && node app.js"
},
"dependencies": {
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.4.0",