From 4ab7f7212de4431385b0fbae27c541eab6d3f34c Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 29 Dec 2017 08:16:04 +0000 Subject: [PATCH 1/2] Provide hosts as environment settings and add npm run start script --- services/spelling/config/settings.defaults.coffee | 8 ++++---- services/spelling/package.json | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/spelling/config/settings.defaults.coffee b/services/spelling/config/settings.defaults.coffee index ab13f5429f..6f587b541f 100644 --- a/services/spelling/config/settings.defaults.coffee +++ b/services/spelling/config/settings.defaults.coffee @@ -4,15 +4,15 @@ module.exports = Settings = internal: spelling: port: 3005 - host: "localhost" + host: process.env["LISTEN_ADDRESS"] or "localhost" redis: - port:6379 - host:"127.0.0.1" + port: 6379 + host: process.env["REDIS_HOST"] or "localhost" password:"" mongo: - url : 'mongodb://127.0.0.1/sharelatex' + url : "mongodb://#{process.env["MONGO_HOST"] or "localhost"}/sharelatex" cacheDir: Path.resolve "cache" diff --git a/services/spelling/package.json b/services/spelling/package.json index b20de9d184..7f12b103a8 100644 --- a/services/spelling/package.json +++ b/services/spelling/package.json @@ -6,6 +6,10 @@ "type": "git", "url": "https://github.com/sharelatex/spelling-sharelatex.git" }, + "scripts": { + "compile:app": "coffee -o app/js -c app/coffee && coffee -c app.coffee", + "start": "npm run compile:app && node app.js" + }, "version": "0.1.4", "dependencies": { "async": "0.1.22", From b2ca5c993fe6675114fd08d2a6a415494fc91b84 Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 29 Dec 2017 08:16:19 +0000 Subject: [PATCH 2/2] Add custom Dockerfile with aspell packages --- services/spelling/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 services/spelling/Dockerfile diff --git a/services/spelling/Dockerfile b/services/spelling/Dockerfile new file mode 100644 index 0000000000..afda623b72 --- /dev/null +++ b/services/spelling/Dockerfile @@ -0,0 +1,4 @@ +FROM node:6.9.5 + +RUN apt-get update +RUN apt-get install -y aspell aspell-en aspell-am aspell-ar aspell-ar-large aspell-bg aspell-bn aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-alt aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-gu aspell-he aspell-hi aspell-hr aspell-hsb aspell-hu aspell-hy aspell-is aspell-it aspell-kk aspell-kn aspell-ku aspell-lt aspell-lv aspell-ml aspell-mr aspell-nl aspell-no aspell-or aspell-pa aspell-pl aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-sv aspell-ta aspell-te aspell-tl aspell-uk aspell-uz \ No newline at end of file