diff --git a/services/clsi/config/settings.defaults.coffee b/services/clsi/config/settings.defaults.coffee index 4b391789c1..fb02c412ea 100644 --- a/services/clsi/config/settings.defaults.coffee +++ b/services/clsi/config/settings.defaults.coffee @@ -16,21 +16,10 @@ module.exports = clsiCacheDir: Path.resolve(__dirname + "/../cache") synctexBaseDir: (project_id) -> Path.join(@compilesDir, project_id) -# clsi: -# commandRunner: "docker-runner-sharelatex" -# docker: -# image: "quay.io/sharelatex/texlive-full:2017.1" -# env: -# HOME: "/tmp" -# socketPath: "/var/run/docker.sock" -# user: "tex" -# expireProjectAfterIdleMs: 24 * 60 * 60 * 1000 -# checkProjectsIntervalMs: 10 * 60 * 1000 - internal: clsi: port: 3013 - host: "localhost" + host: process.env["LISTEN_ADDRESS"] or "localhost" apis: @@ -40,3 +29,16 @@ module.exports = smokeTest: false project_cache_length_ms: 1000 * 60 * 60 * 24 parallelFileDownloads:1 + +if process.env["COMMAND_RUNNER"] + module.exports.clsi = + commandRunner: process.env["COMMAND_RUNNER"] + docker: + image: process.env["TEXLIVE_IMAGE"] or "quay.io/sharelatex/texlive-full:2017.1" + env: + HOME: "/tmp" + socketPath: "/var/run/docker.sock" + user: "tex" + expireProjectAfterIdleMs: 24 * 60 * 60 * 1000 + checkProjectsIntervalMs: 10 * 60 * 1000 + module.exports.path.sandboxedCompilesHostDir = process.env["COMPILES_HOST_DIR"] diff --git a/services/clsi/package.json b/services/clsi/package.json index 71711be1a7..867bdf2391 100644 --- a/services/clsi/package.json +++ b/services/clsi/package.json @@ -6,6 +6,10 @@ "type": "git", "url": "https://github.com/sharelatex/clsi-sharelatex.git" }, + "scripts": { + "compile:app": "coffee -o app/js -c app/coffee && coffee -c app.coffee", + "start": "npm run compile:app && node app.js" + }, "author": "James Allen ", "dependencies": { "async": "0.2.9",