Server Pro fixes (#109)

This commit is contained in:
Miguel Serrano 2019-08-22 16:57:26 +02:00 committed by GitHub
parent 1df1f17fc6
commit f100877eb7
5 changed files with 27 additions and 154 deletions

3
server-ce/.dockerignore Normal file
View file

@ -0,0 +1,3 @@
.DS_Store
.git/
node_modules/

View file

@ -1,3 +1,4 @@
.DS_Store
node_modules/ node_modules/
api-data api-data
versions/ versions/

View file

@ -1,5 +1,5 @@
# -------------------------------------------------- # --------------------------------------------------
# Sharelatex Base Image (sharelatex/sharelatex-base) # Overleaf Base Image (sharelatex/sharelatex-base)
# -------------------------------------------------- # --------------------------------------------------
FROM phusion/baseimage:0.11 FROM phusion/baseimage:0.11
@ -44,6 +44,16 @@ RUN wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \
tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1 tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1
RUN echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile && \ RUN echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile && \
/install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile
# CTAN mirrors occasionally fail, in that case install TexLive against an
# specific server, for example http://ctan.crest.fr
# RUN wget http://ctan.crest.fr/tex-archive/systems/texlive/tlnet/install-tl-unx.tar.gz && \
# mkdir /install-tl-unx && \
# tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1
# RUN echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile && \
# /install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile \
# -repository http://ctan.crest.fr/tex-archive/systems/texlive/tlnet/
RUN rm -r /install-tl-unx; \ RUN rm -r /install-tl-unx; \
rm install-tl-unx.tar.gz rm install-tl-unx.tar.gz
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2019/bin/x86_64-linux/ ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2019/bin/x86_64-linux/

View file

@ -1,11 +1,11 @@
# ShareLaTeX Docker Image # Overleaf Docker Image
This is the source for building the sharelatex community-edition docker image. This is the source for building the Overleaf community-edition docker image.
## End-User Install ## End-User Install
Please see the [offical wiki for install Please see the [offical wiki for install
guides](https://github.com/sharelatex/sharelatex/wiki/Production-Installation-Instructions) guides](https://github.com/overleaf/overleaf/wiki)
## Development ## Development
@ -18,27 +18,26 @@ The Base image generally contains the basic dependencies like `wget` and
`aspell`, plus `texlive`. We split this out because it's a pretty heavy set of `aspell`, plus `texlive`. We split this out because it's a pretty heavy set of
dependencies, and it's nice to not have to rebuild all of that every time. dependencies, and it's nice to not have to rebuild all of that every time.
The Sharelatex image extends the base image and adds the actual sharelatex code The `sharelatex/sharelatex` image extends the base image and adds the actual Overleaf code
and services. and services.
Use `make build-base` and `make build-community` to build these images. Use `make build-base` and `make build-community` to build these images.
### How the Sharelatex code gets here ### How the Overleaf code gets here
This repo uses [the public Sharelatex This repo uses [the public Overleaf
repository](https://github.com/sharelatex/sharelatex), which used to be the main repository](https://github.com/overleaf/overleaf), which used to be the main
public source for the sharelatex system. public source for the Overleaf system.
That repo is cloned down into the docker image, and a script then installs all That repo is cloned down into the docker image, and a script then installs all
the services. This way of doing things predates the new dev-env, and isn't the services.
currently tested.
### How services run inside the container ### How services run inside the container
We use the [Phusion base-image](https://github.com/phusion/baseimage-docker) We use the [Phusion base-image](https://github.com/phusion/baseimage-docker)
(which is extended by our `base` image) to provide us with a VM-like container (which is extended by our `base` image) to provide us with a VM-like container
in which to run the sharelatex services. Baseimage uses the `runit` service in which to run the Overleaf services. Baseimage uses the `runit` service
manager to manage services, and we add our init-scripts from the `./runit` manager to manage services, and we add our init-scripts from the `./runit`
folder. folder.

View file

@ -193,146 +193,6 @@ settings =
www: {lngCode:process.env["SHARELATEX_SITE_LANGUAGE"] or "en", url: siteUrl} www: {lngCode:process.env["SHARELATEX_SITE_LANGUAGE"] or "en", url: siteUrl}
defaultLng: process.env["SHARELATEX_SITE_LANGUAGE"] or "en" defaultLng: process.env["SHARELATEX_SITE_LANGUAGE"] or "en"
# Spell Check Languages
# ---------------------
#
# You must have the corresponding aspell dictionary installed to
# be able to use a language. Run `grunt check:aspell` to check which
# dictionaries you have installed. These should be set for the `code` for
# each language.
languages: [{
"code":"en", "name":"English (American)"
},{
"code":"en_GB", "name":"English (British)"
},{
"code":"af", "name":"Africaans"
},{
"code":"am", "name":"Amharic"
},{
"code":"ar", "name":"Arabic"
},{
"code":"hy", "name":"Armenian"
},{
"code":"gl", "name":"Galician"
},{
"code":"eu", "name":"Basque"
},{
"code":"bn", "name":"Bengali"
},{
"code":"br", "name":"Breton"
},{
"code":"bg", "name":"Bulgarian"
},{
"code":"ca", "name":"Catalan"
},{
"code":"hr", "name":"Croatian"
},{
"code":"cs", "name":"Czech"
},{
"code":"da", "name":"Danish"
},{
"code":"nl", "name":"Dutch"
},{
"code":"eo", "name":"Esperanto"
},{
"code":"et", "name":"Estonian"
},{
"code":"fo", "name":"Faroese"
},{
"code":"fr", "name":"French"
},{
"code":"de", "name":"German"
},{
"code":"el", "name":"Greek"
},{
"code":"gu", "name":"Gujarati"
},{
"code":"he", "name":"Hebrew"
},{
"code":"hi", "name":"Hindi"
},{
"code":"hu", "name":"Hungarian"
},{
"code":"is", "name":"Icelandic"
},{
"code":"id", "name":"Indonesian"
},{
"code":"ga", "name":"Irish"
},{
"code":"it", "name":"Italian"
},{
"code":"kn", "name":"Kannada"
},{
"code":"kk", "name":"Kazakh"
},{
"code":"ku", "name":"Kurdish"
},{
"code":"lv", "name":"Latvian"
},{
"code":"lt", "name":"Lithuanian"
},{
"code":"ml", "name":"Malayalam"
},{
"code":"mr", "name":"Marathi"
},{
"code":"nr", "name":"Ndebele"
},{
"code":"ns", "name":"Northern Sotho"
},{
"code":"no", "name":"Norwegian"
},{
"code":"or", "name":"Oriya"
},{
"code":"fa", "name":"Persian"
},{
"code":"pl", "name":"Polish"
},{
"code":"pt_BR", "name":"Portuguese (Brazilian)"
},{
"code":"pt_PT", "name":"Portuguese (European)"
},{
"code":"pa", "name":"Punjabi"
},{
"code":"ro", "name":"Romanian"
},{
"code":"ru", "name":"Russian"
},{
"code":"sk", "name":"Slovak"
},{
"code":"sl", "name":"Slovenian"
},{
"code":"st", "name":"Southern Sotho"
},{
"code":"es", "name":"Spanish"
},{
"code":"ss", "name":"Swazi"
},{
"code":"sv", "name":"Swedish"
},{
"code":"tl", "name":"Tagalog"
},{
"code":"ta", "name":"Tamil"
},{
"code":"te", "name":"Telugu"
},{
"code":"ts", "name":"Tsonga"
},{
"code":"tn", "name":"Tswana"
},{
"code":"uk", "name":"Ukrainian"
},{
"code":"hsb", "name":"Upper Sorbian"
},{
"code":"uz", "name":"Uzbek"
},{
"code":"cy", "name":"Welsh"
},{
"code":"xh", "name":"Xhosa"
},{
"code":"zu", "name":"Zulu"
}
]
apis: apis:
web: web:
url: "http://localhost:3000" url: "http://localhost:3000"
@ -628,7 +488,7 @@ if process.env["SHARELATEX_SAML_ENTRYPOINT"]
# -------- # --------
if process.env["SANDBOXED_COMPILES"] == "true" if process.env["SANDBOXED_COMPILES"] == "true"
settings.clsi = settings.clsi =
commandRunner: "docker-runner-sharelatex" dockerRunner: true
docker: docker:
image: process.env["TEX_LIVE_DOCKER_IMAGE"] image: process.env["TEX_LIVE_DOCKER_IMAGE"]
env: env:
@ -640,7 +500,7 @@ if process.env["SANDBOXED_COMPILES"] == "true"
settings.path = {} settings.path = {}
settings.path.synctexBaseDir = () -> "/compile" settings.path.synctexBaseDir = () -> "/compile"
if process.env['SANDBOXED_COMPILES_SIBLING_CONTAINERS'] == 'true' if process.env['SANDBOXED_COMPILES_SIBLING_CONTAINERS'] == 'true'
console.log("Using sibling containers for sandoxed compiles") console.log("Using sibling containers for sandboxed compiles")
if process.env['SANDBOXED_COMPILES_HOST_DIR'] if process.env['SANDBOXED_COMPILES_HOST_DIR']
settings.path.sandboxedCompilesHostDir = process.env['SANDBOXED_COMPILES_HOST_DIR'] settings.path.sandboxedCompilesHostDir = process.env['SANDBOXED_COMPILES_HOST_DIR']
else else