mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
Merge pull request #17 from sharelatex/ja-dockerize-dev
Provide hosts as environment settings and add npm run start script
This commit is contained in:
commit
6d44176ab5
3 changed files with 20 additions and 15 deletions
|
@ -44,7 +44,7 @@ module.exports = RedisManager =
|
|||
docLines = JSON.stringify(docLines)
|
||||
if docLines.indexOf("\u0000") != -1
|
||||
error = new Error("null bytes found in doc lines")
|
||||
logger.error err: error, doc_id: doc_id, docLines: docLines, error.message
|
||||
logger.error {err: error, doc_id: doc_id, docLines: docLines}, error.message
|
||||
return callback(error)
|
||||
docHash = RedisManager._computeHash(docLines)
|
||||
logger.log project_id:project_id, doc_id:doc_id, version: version, hash:docHash, "putting doc in redis"
|
||||
|
@ -216,13 +216,13 @@ module.exports = RedisManager =
|
|||
for op in jsonOps
|
||||
if op.indexOf("\u0000") != -1
|
||||
error = new Error("null bytes found in jsonOps")
|
||||
logger.error err: error, doc_id: doc_id, jsonOps: jsonOps, error.message
|
||||
logger.error {err: error, doc_id: doc_id, jsonOps: jsonOps}, error.message
|
||||
return callback(error)
|
||||
|
||||
newDocLines = JSON.stringify(docLines)
|
||||
if newDocLines.indexOf("\u0000") != -1
|
||||
error = new Error("null bytes found in doc lines")
|
||||
logger.error err: error, doc_id: doc_id, newDocLines: newDocLines, error.message
|
||||
logger.error {err: error, doc_id: doc_id, newDocLines: newDocLines}, error.message
|
||||
return callback(error)
|
||||
newHash = RedisManager._computeHash(newDocLines)
|
||||
|
||||
|
|
|
@ -5,23 +5,24 @@ http.globalAgent.maxSockets = 300
|
|||
module.exports =
|
||||
internal:
|
||||
documentupdater:
|
||||
host: process.env["LISTEN_ADDRESS"] or "localhost"
|
||||
port: 3003
|
||||
|
||||
apis:
|
||||
web:
|
||||
url: "http://localhost:3000"
|
||||
url: "http://#{process.env["WEB_HOST"] or "localhost"}:3000"
|
||||
user: "sharelatex"
|
||||
pass: "password"
|
||||
trackchanges:
|
||||
url: "http://localhost:3015"
|
||||
url: "http://#{process.env["TRACK_CHANGES_HOST"] or "localhost"}:3015"
|
||||
project_history:
|
||||
enabled: process.env.SHARELATEX_ENABLE_PROJECT_HISTORY == 'true'
|
||||
url: "http://localhost:3054"
|
||||
url: "http://#{process.env["PROJECT_HISTORY_HOST"] or "localhost"}:3054"
|
||||
|
||||
redis:
|
||||
realtime:
|
||||
port: "6379"
|
||||
host:"localhost"
|
||||
host: process.env["REDIS_HOST"] or "localhost"
|
||||
password:""
|
||||
key_schema:
|
||||
pendingUpdates: ({doc_id}) -> "PendingUpdates:#{doc_id}"
|
||||
|
@ -33,7 +34,7 @@ module.exports =
|
|||
# pendingUpdates: ({doc_id}) -> "PendingUpdates:{#{doc_id}}"
|
||||
documentupdater:
|
||||
port: "6379"
|
||||
host: "localhost"
|
||||
host: process.env["REDIS_HOST"] or "localhost"
|
||||
password: ""
|
||||
key_schema:
|
||||
blockingKey: ({doc_id}) -> "Blocking:#{doc_id}"
|
||||
|
@ -63,7 +64,7 @@ module.exports =
|
|||
# projectState: ({project_id}) -> "ProjectState:{#{project_id}}"
|
||||
history:
|
||||
port: "6379"
|
||||
host:"localhost"
|
||||
host: process.env["REDIS_HOST"] or "localhost"
|
||||
password:""
|
||||
key_schema:
|
||||
uncompressedHistoryOps: ({doc_id}) -> "UncompressedHistoryOps:#{doc_id}"
|
||||
|
@ -81,7 +82,7 @@ module.exports =
|
|||
# docsWithHistoryOps: ({project_id}) -> "DocsWithHistoryOps:{#{project_id}}"
|
||||
lock:
|
||||
port: "6379"
|
||||
host:"localhost"
|
||||
host: process.env["REDIS_HOST"] or "localhost"
|
||||
password:""
|
||||
key_schema:
|
||||
blockingKey: ({doc_id}) -> "Blocking:#{doc_id}"
|
||||
|
@ -95,4 +96,4 @@ module.exports =
|
|||
max_doc_length: 2 * 1024 * 1024 # 2mb
|
||||
|
||||
mongo:
|
||||
url: 'mongodb://127.0.0.1/sharelatex'
|
||||
url: "mongodb://#{process.env["MONGO_HOST"] or "localhost"}/sharelatex"
|
||||
|
|
|
@ -6,9 +6,13 @@
|
|||
"type": "git",
|
||||
"url": "https://github.com/sharelatex/document-updater-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": {
|
||||
"async": "^2.5.0",
|
||||
"coffee-script": "1.4.0",
|
||||
"coffee-script": "~1.7.0",
|
||||
"express": "3.3.4",
|
||||
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.5.6",
|
||||
"lynx": "0.0.11",
|
||||
|
|
Loading…
Reference in a new issue