mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add allowedImageNames setting from ENV vars (#718)
Uses `ALL_TEX_LIVE_DOCKER_IMAGES` (required) and `ALL_TEX_LIVE_DOCKER_IMAGE_NAMES` (optional) to add the `allowedImageNames` setting, allowing users to change a project's Tex Live version.
This commit is contained in:
parent
11e7f7d60e
commit
27cd838c2a
1 changed files with 12 additions and 0 deletions
|
@ -537,6 +537,18 @@ if process.env["SHARELATEX_ELASTICSEARCH_URL"]?
|
||||||
settings.references.elasticsearch =
|
settings.references.elasticsearch =
|
||||||
host: process.env["SHARELATEX_ELASTICSEARCH_URL"]
|
host: process.env["SHARELATEX_ELASTICSEARCH_URL"]
|
||||||
|
|
||||||
|
# TeX Live Images
|
||||||
|
# -----------
|
||||||
|
if process.env["ALL_TEX_LIVE_DOCKER_IMAGES"]?
|
||||||
|
allTexLiveDockerImages = process.env["ALL_TEX_LIVE_DOCKER_IMAGES"].split(',')
|
||||||
|
if process.env["ALL_TEX_LIVE_DOCKER_IMAGE_NAMES"]?
|
||||||
|
allTexLiveDockerImageNames = process.env["ALL_TEX_LIVE_DOCKER_IMAGE_NAMES"].split(',')
|
||||||
|
if allTexLiveDockerImages?
|
||||||
|
settings.allowedImageNames = []
|
||||||
|
for fullImageName, index in allTexLiveDockerImages
|
||||||
|
imageName = Path.basename(fullImageName)
|
||||||
|
imageDesc = if allTexLiveDockerImageNames? then allTexLiveDockerImageNames[index] else imageName
|
||||||
|
settings.allowedImageNames.push({ imageName, imageDesc })
|
||||||
|
|
||||||
# With lots of incoming and outgoing HTTP connections to different services,
|
# With lots of incoming and outgoing HTTP connections to different services,
|
||||||
# sometimes long running, it is a good idea to increase the default number
|
# sometimes long running, it is a good idea to increase the default number
|
||||||
|
|
Loading…
Reference in a new issue