From 8cf70ce7f1a298c984a7dc92c73a4f90532976b9 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Thu, 22 Aug 2019 16:57:26 +0200 Subject: [PATCH] Server Pro fixes (#109) --- .dockerignore | 3 + .gitignore | 1 + Dockerfile-base | 12 +++- README.md | 21 ++++--- settings.coffee | 144 +----------------------------------------------- 5 files changed, 27 insertions(+), 154 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..fd3df9c73e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.DS_Store +.git/ +node_modules/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 023b43469e..877b99b865 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store node_modules/ api-data versions/ diff --git a/Dockerfile-base b/Dockerfile-base index aed92b21b8..f56136fd87 100644 --- a/Dockerfile-base +++ b/Dockerfile-base @@ -1,5 +1,5 @@ # -------------------------------------------------- -# Sharelatex Base Image (sharelatex/sharelatex-base) +# Overleaf Base Image (sharelatex/sharelatex-base) # -------------------------------------------------- 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 RUN echo "selected_scheme scheme-basic" >> /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; \ 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/ diff --git a/README.md b/README.md index ed5cd3a91f..c1894afce0 100644 --- a/README.md +++ b/README.md @@ -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 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 @@ -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 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. 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 -repository](https://github.com/sharelatex/sharelatex), which used to be the main -public source for the sharelatex system. +This repo uses [the public Overleaf +repository](https://github.com/overleaf/overleaf), which used to be the main +public source for the Overleaf system. 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 -currently tested. +the services. ### How services run inside the container 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 -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` folder. diff --git a/settings.coffee b/settings.coffee index 92a545eac7..b8259b96ed 100644 --- a/settings.coffee +++ b/settings.coffee @@ -193,146 +193,6 @@ settings = www: {lngCode:process.env["SHARELATEX_SITE_LANGUAGE"] or "en", url: siteUrl} 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: web: url: "http://localhost:3000" @@ -628,7 +488,7 @@ if process.env["SHARELATEX_SAML_ENTRYPOINT"] # -------- if process.env["SANDBOXED_COMPILES"] == "true" settings.clsi = - commandRunner: "docker-runner-sharelatex" + dockerRunner: true docker: image: process.env["TEX_LIVE_DOCKER_IMAGE"] env: @@ -640,7 +500,7 @@ if process.env["SANDBOXED_COMPILES"] == "true" settings.path = {} settings.path.synctexBaseDir = () -> "/compile" 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'] settings.path.sandboxedCompilesHostDir = process.env['SANDBOXED_COMPILES_HOST_DIR'] else