create home and tmp directories in compile dir
This commit is contained in:
@@ -53,9 +53,12 @@ module.exports = CompileManager = {
|
||||
}
|
||||
const compileDir = getCompileDir(request.project_id, request.user_id)
|
||||
const lockFile = Path.join(compileDir, '.project-lock')
|
||||
// create local home and tmp directories in the compile dir
|
||||
const homeDir = Path.join(compileDir, '.project-home')
|
||||
const tmpDir = Path.join(compileDir, '.project-tmp')
|
||||
// use a .project-lock file in the compile directory to prevent
|
||||
// simultaneous compiles
|
||||
return fse.ensureDir(compileDir, function(error) {
|
||||
async.each([compileDir, homeDir, tmpDir], fse.ensureDir, function (error) {
|
||||
if (error != null) {
|
||||
return callback(error)
|
||||
}
|
||||
|
||||
@@ -71,7 +71,8 @@ if (process.env.DOCKER_RUNNER) {
|
||||
image:
|
||||
process.env.TEXLIVE_IMAGE || 'quay.io/sharelatex/texlive-full:2017.1',
|
||||
env: {
|
||||
HOME: '/tmp'
|
||||
HOME: process.env.TEXLIVE_HOME || '/tmp',
|
||||
TMPDIR: process.env.TEXLIVE_TMPDIR || '/tmp'
|
||||
},
|
||||
socketPath: '/var/run/docker.sock',
|
||||
user: process.env.TEXLIVE_IMAGE_USER || 'tex'
|
||||
|
||||
Reference in New Issue
Block a user