diff --git a/services/clsi/.dockerignore b/services/clsi/.dockerignore index ba1c3442de..35f8905ec5 100644 --- a/services/clsi/.dockerignore +++ b/services/clsi/.dockerignore @@ -5,3 +5,4 @@ gitrev .npm .nvmrc nodemon.json +db/ diff --git a/services/clsi/Dockerfile b/services/clsi/Dockerfile index 27158b5d6a..3fbae08b32 100644 --- a/services/clsi/Dockerfile +++ b/services/clsi/Dockerfile @@ -24,5 +24,7 @@ COPY . /app FROM base COPY --from=app /app /app +RUN mkdir -p db \ +&& chown node:node db CMD ["node", "--expose-gc", "app.js"] diff --git a/services/clsi/buildscript.txt b/services/clsi/buildscript.txt index 1f0893492f..72b0f6a3d6 100644 --- a/services/clsi/buildscript.txt +++ b/services/clsi/buildscript.txt @@ -1,5 +1,6 @@ clsi --acceptance-creds=None +--data-dirs=db --dependencies= --docker-repos=gcr.io/overleaf-ops --env-add= diff --git a/services/clsi/config/settings.defaults.js b/services/clsi/config/settings.defaults.js index b0fd0cbd35..021c9cd74f 100644 --- a/services/clsi/config/settings.defaults.js +++ b/services/clsi/config/settings.defaults.js @@ -9,7 +9,7 @@ module.exports = { username: 'clsi', dialect: 'sqlite', storage: - process.env.SQLITE_PATH || Path.resolve(__dirname + '/../db.sqlite'), + process.env.SQLITE_PATH || Path.resolve(__dirname + '/../db/db.sqlite'), pool: { max: 1, min: 1 @@ -65,8 +65,7 @@ if (process.env.DOCKER_RUNNER) { dockerRunner: process.env.DOCKER_RUNNER === 'true', docker: { image: - process.env.TEXLIVE_IMAGE || - 'quay.io/sharelatex/texlive-full:2017.1', + process.env.TEXLIVE_IMAGE || 'quay.io/sharelatex/texlive-full:2017.1', env: { HOME: '/tmp' }, @@ -93,8 +92,7 @@ if (process.env.DOCKER_RUNNER) { module.exports.path.synctexBaseDir = () => '/compile' - module.exports.path.sandboxedCompilesHostDir = - process.env.COMPILES_HOST_DIR + module.exports.path.sandboxedCompilesHostDir = process.env.COMPILES_HOST_DIR module.exports.path.synctexBinHostPath = process.env.SYNCTEX_BIN_HOST_PATH } diff --git a/services/clsi/db/.gitignore b/services/clsi/db/.gitignore new file mode 100644 index 0000000000..d6b7ef32c8 --- /dev/null +++ b/services/clsi/db/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore