Commit 36e334be authored by Sparkf's avatar Sparkf 🏙️
Browse files

some modification from sharelatex v4 to v5

parent e28c3e33
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
FROM sharelatex/sharelatex:4.2.0
FROM sharelatex/sharelatex:5.0.1
# FROM sharelatex/sharelatex:latest
# latest might not be tested 
# e.g. the AuthenticationManager.js script had to be adapted after versions 2.3.1 
@@ -17,7 +17,7 @@ WORKDIR /overleaf/services/web
RUN sed -i s@/archive.ubuntu.com/@/mirrors.sustech.edu.cn/@g /etc/apt/sources.list
RUN sed -i s@/security.ubuntu.com/@/mirrors.sustech.edu.cn/@g /etc/apt/sources.list

RUN tlmgr option repository https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet


    # install latest npm
RUN npm install -g npm --registry=https://registry.npmmirror.com && \
@@ -26,10 +26,8 @@ RUN npm install -g npm --registry=https://registry.npmmirror.com && \
    npm install ldap-escape ldapts-search ldapts@3.2.4 --registry=https://registry.npmmirror.com && \
    # npm install bcrypt@5.0.0 && \
    apt-get update && \
    apt-get -y install libxml-libxslt-perl cpanminus libbtparse2 python-pygments && \
    apt-get -y install libxml-libxslt-perl cpanminus libbtparse2 python3-pygments
    # now install latest texlive2023 from tlmgr
    tlmgr update --self --all  && \
    tlmgr install scheme-full --verify-repo=none

# fonts
RUN apt-get -y install fonts-noto-cjk fonts-noto-cjk-extra fonts-noto-color-emoji xfonts-wqy fonts-font-awesome
@@ -41,9 +39,19 @@ RUN apt-get -y install python3-pip
RUN pip3 config set global.index-url https://mirrors.sustech.edu.cn/pypi/web/simple
RUN pip3 install Pygments

# texlive 2023 to 2024
#RUN mv /usr/local/texlive/2023 /usr/local/texlive/2024
# texlive 2023 to 2024
RUN mv /usr/local/texlive/2023 /usr/local/texlive/2024
ENV PATH="/usr/local/texlive/2024/bin/x86_64-linux:${PATH};"
RUN tlmgr option repository https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet
RUN wget http://mirror.ctan.org/systems/texlive/tlnet/update-tlmgr-latest.sh -O /usr/local/texlive/2024/update-tlmgr-latest.sh
RUN bash /usr/local/texlive/2024/update-tlmgr-latest.sh -- --upgrade
RUN tlmgr option repository https://mirrors.sustech.edu.cn/CTAN/systems/texlive/tlnet
RUN tlmgr update --self --all
RUN tlmgr install scheme-full --verify-repo=none
# latex-bin must be on path to be found in compilation process
# needed for biber epstopdf and others
ENV PATH="/usr/local/texlive/2023/bin/x86_64-linux:${PATH};"

# overwrite some files
COPY sharelatex/AuthenticationManager.js    /overleaf/services/web/app/src/Features/Authentication/
+2 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
>     const state = new Array(6).fill(0).map(() => characters.charAt(Math.floor(Math.random() * characters.length))).join("")
>     req.session.oauth2State = state
> 
>     const redirectURI = encodeURIComponent(`${process.env.SHARELATEX_SITE_URL}/oauth/callback`) 
>     const redirectURI = encodeURIComponent(`${process.env.OVERLEAF_SITE_URL}/oauth/callback`) 
>     const authURL = (
>       process.env.OAUTH2_AUTHORIZATION_URL
>       + `?response_type=code`
@@ -34,7 +34,7 @@
>         client_id: process.env.OAUTH2_CLIENT_ID,
>         client_secret: process.env.OAUTH2_CLIENT_SECRET,
>         code: req.query.code,
>         redirect_uri: `${process.env.SHARELATEX_SITE_URL}/oauth/callback`,
>         redirect_uri: `${process.env.OVERLEAF_SITE_URL}/oauth/callback`,
>       }
>       const body = contentType === 'application/json'
>         ? JSON.stringify(bodyParams)