Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update overleaf #22

Open
wants to merge 78 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
97d82a7
Fixed syntex
mserranom Jun 25, 2020
b842348
Merge pull request #757 from overleaf/msm-hotfix-2.3.1
mserranom Jun 29, 2020
8c2b3c0
[bin/compile-services] all services are decaffeinated now
das7pad Jul 8, 2020
02098ca
Merge pull request #760 from overleaf/jpa-post-decaff
das7pad Jul 8, 2020
881bbde
Hotfix 2.4.1
mserranom Aug 19, 2020
7c9ec6c
Merge pull request #768 from overleaf/msm-hotfix-2-4-1
mserranom Aug 19, 2020
ccb05e0
[misc] add the dependabot config of the buildscripts
das7pad Sep 4, 2020
28f326f
Merge pull request #776 from overleaf/jpa-dependabot-config
das7pad Sep 4, 2020
cfbd5c3
Hotfix 2.4.2 - fix anon read/write sharing
mserranom Sep 29, 2020
884bdc5
using original single patch
mserranom Oct 1, 2020
057956c
added patch to fix left footer with html links
mserranom Oct 1, 2020
78b57fc
[misc] keep up with web changes -- add waitForDb wrapper for tasks
das7pad Oct 5, 2020
f3fc0e9
Merge pull request #792 from overleaf/msm-hotfix-2-4-2
mserranom Oct 5, 2020
d7a05d3
Merge pull request #797 from overleaf/jpa-wait-for-db
das7pad Oct 6, 2020
9de5edc
Fix typo in settings `templates`->`template`
mserranom Oct 9, 2020
994bdd6
removed <div> from email footer
mserranom Oct 9, 2020
1d02dd5
Merge pull request #798 from overleaf/msm-fix-email-custom-footer
mserranom Oct 21, 2020
65c1a97
added support for COMPILE_TIMEOUT env
mserranom Oct 22, 2020
0f724a2
updated nginx timeout to 4m
mserranom Oct 22, 2020
8c99bfe
addressed PR feedback
mserranom Oct 22, 2020
d8d6dbf
added radix to parseInt() call
mserranom Oct 23, 2020
937e4b3
Merge pull request #805 from overleaf/msm-compile-timeout-env
mserranom Oct 23, 2020
e48bc5e
added radix to parseInt() calls and make them fail fast (#806)
mserranom Oct 26, 2020
284a6e9
Updated mongo to 4.0 for release 2.5.0 (#815)
mserranom Nov 19, 2020
b229cbb
[runit] fix the cycling of logs for the contacts service
das7pad Jan 12, 2021
df1b823
[init_scripts] delete old logs of the contacts service
das7pad Jan 12, 2021
8647127
Merge pull request #826 from overleaf/jpa-fix-contacts-logging
das7pad Jan 12, 2021
3ca5d71
msm-change-logrotate-permissions (#827)
mserranom Jan 14, 2021
79b7315
[hotfix] produce version 2.5.1 with fixes for log rotation
das7pad Jan 14, 2021
3a35397
Merge pull request #828 from overleaf/jpa-hotfix-2-5-1
das7pad Jan 14, 2021
e03b320
Hotfix 2.5.2 (#831)
mserranom Jan 25, 2021
231456f
Fix spelling errors (#823)
jsoref Mar 2, 2021
3199fd3
Added configurable AWS region to email settings (#847)
mserranom Mar 2, 2021
dd874dd
Update passport-saml URLs
mans0954 Mar 19, 2021
10204cf
Merge pull request #861 from overleaf/csh-update-passport-saml-urls
mans0954 Mar 22, 2021
b39f2ba
Added `SHARELATEX_SAML_DECRYPTION_CERT` environment variable (#860)
mserranom Mar 31, 2021
d674a12
Variables in Nginx configuration (#853)
Apr 7, 2021
cb944a8
Expose new smtp vars: 'name', and 'logger' (#854)
Apr 7, 2021
9fecfbe
Add the new `outputDir` setting for CLSI (#862)
Apr 7, 2021
abd5017
Updated base image to Node 12 (#865)
mserranom Apr 7, 2021
3f794b6
[migrations] open source newly added indexes (#870)
das7pad Apr 13, 2021
0c8d1a1
[migrations] fix index creation (#871)
das7pad Apr 14, 2021
20c3d7a
hotfix 2.6.1 (#875)
mserranom Apr 21, 2021
0cb9e53
Make it clear that the screenshot is Server Pro
jdleesmiller May 13, 2021
dcbe211
Hotfix 2.6.2 (#888)
mserranom May 20, 2021
4a8f88c
Fix some old README links
jdleesmiller Jun 14, 2021
3547797
fix redis config (#895)
Rainshaw Jun 15, 2021
c4ead8f
fix nginx conf (#896)
Rainshaw Jun 24, 2021
8a52906
[perf] use docker layer caching from previous build
das7pad Jul 7, 2021
6988aa9
[perf] use npm ci
das7pad Jul 7, 2021
3b63e1c
[perf] use npm ci --only=production for all but web
das7pad Jul 7, 2021
d65a7fe
Merge pull request #903 from overleaf/jpa-faster-install
das7pad Jul 8, 2021
04219b1
Remove migrations
Jul 8, 2021
8858f05
[misc] setup eslint and prettier and fix any errors
das7pad Jul 7, 2021
24fee2f
decaffeinate: Rename coffee files from .coffee to .js
das7pad Jul 7, 2021
7eeb455
decaffeinate: Convert coffee files to JS
das7pad Jul 7, 2021
c0dd3df
decaffeinate: Run post-processing cleanups on coffee files
das7pad Jul 7, 2021
1b63336
[misc] run format:fix
das7pad Jul 7, 2021
00c14ee
[misc] delete commented ProjectSize task
das7pad Jul 7, 2021
58b0de0
[misc] do not set SHARELATEX_CONFIG in run scripts
das7pad Jul 7, 2021
d36eb37
[misc] update references to decaffeinated coffee-script files
das7pad Jul 7, 2021
2be3a81
[misc] upgrade settings module to v2
das7pad Jul 7, 2021
430c284
[misc] drop coffee-script imports
das7pad Jul 7, 2021
36c03b1
[misc] fix listing of services for bin/ scripts
das7pad Jul 7, 2021
ff0fc57
Renamed SAML setting `privateCert` -> `privateKey`
mserranom Jul 9, 2021
baccf2e
Merge pull request #910 from overleaf/sk-remove-migrations-1
das7pad Jul 12, 2021
153f0f5
Merge pull request #911 from overleaf/jpa-decaff-and-config-cleanup
das7pad Jul 12, 2021
72f1cd4
Merge pull request #912 from overleaf/msm-renamed-private-cert-saml
das7pad Jul 12, 2021
6b4854f
[misc] goodbye grunt
das7pad Jul 12, 2021
44e78fc
[misc] work around broken 'npm ci --only=production'
das7pad Jul 13, 2021
2b5fb67
[misc] move server-ce scripts into a module in web
das7pad Jul 13, 2021
470d539
Merge pull request #913 from overleaf/jpa-goodbye-grunt
das7pad Jul 14, 2021
1687637
Add init script to run migrations from web
Jul 15, 2021
4f6a3a6
[misc] bin/grunt: keep up with changes to create-admin script
das7pad Jul 15, 2021
34a1a8b
[misc] bring back old schema of revision.txt
das7pad Jul 16, 2021
1a845d3
Merge pull request #918 from overleaf/jpa-fix-revision.txt
das7pad Jul 20, 2021
df1b7a0
Merge pull request #917 from overleaf/jpa-create-user
das7pad Jul 20, 2021
245fc12
Merge pull request #916 from overleaf/sk-new-migrations
Jul 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": [
"eslint:recommended",
"standard",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2018
},
"env": {
"node": true
},
"rules": {
// Do not allow importing of implicit dependencies.
"import/no-extraneous-dependencies": "error"
}
}
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"

pull-request-branch-name:
# Separate sections of the branch name with a hyphen
# Docker images use the branch name and do not support slashes in tags
# https://github.com/overleaf/google-ops/issues/822
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#pull-request-branch-nameseparator
separator: "-"

# Block informal upgrades -- security upgrades use a separate queue.
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#open-pull-requests-limit
open-pull-requests-limit: 0
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"useTabs": false
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributing to ShareLaTeX
Thank you for reading this! If you'd like to report a bug or join in the development
of ShareLaTeX, then here are some notes on how to do that.

*Note that ShareLaTeX is actually made up of many seperate repositories (a list is available
*Note that ShareLaTeX is actually made up of many separate repositories (a list is available
[here](https://github.com/sharelatex/sharelatex/blob/master/README.md#other-repositories)).*

Reporting bugs and opening issues
Expand Down
60 changes: 21 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,34 @@
ARG SHARELATEX_BASE_TAG=sharelatex/sharelatex-base:latest
FROM $SHARELATEX_BASE_TAG

ENV SHARELATEX_CONFIG /etc/sharelatex/settings.coffee

WORKDIR /var/www/sharelatex

# Add required source files
# -------------------------
ADD ${baseDir}/bin /var/www/sharelatex/bin
ADD ${baseDir}/doc /var/www/sharelatex/doc
ADD ${baseDir}/migrations /var/www/sharelatex/migrations
ADD ${baseDir}/tasks /var/www/sharelatex/tasks
ADD ${baseDir}/Gruntfile.coffee /var/www/sharelatex/Gruntfile.coffee
ADD ${baseDir}/package.json /var/www/sharelatex/package.json
ADD ${baseDir}/npm-shrinkwrap.json /var/www/sharelatex/npm-shrinkwrap.json
ADD ${baseDir}/services.js /var/www/sharelatex/config/services.js


# Copy build dependencies
# -----------------------
ADD ${baseDir}/git-revision.sh /var/www/git-revision.sh
ADD ${baseDir}/services.js /var/www/sharelatex/config/services.js

ADD ${baseDir}/genScript.js /var/www/sharelatex/genScript.js
ADD ${baseDir}/services.js /var/www/sharelatex/services.js

# Checkout services
# -----------------
RUN cd /var/www/sharelatex \
&& npm install \
&& grunt install \
RUN node genScript checkout | bash \
\
# Cleanup not needed artifacts
# ----------------------------
&& rm -rf /root/.cache /root/.npm $(find /tmp/ -mindepth 1 -maxdepth 1) \
# Stores the version installed for each service
# Store the revision for each service
# ---------------------------------------------
&& cd /var/www \
&& ./git-revision.sh > revisions.txt \
&& node genScript revisions | bash > /var/www/revisions.txt \
\
# Cleanup the git history
# -------------------
&& rm -rf $(find /var/www/sharelatex -name .git)
&& node genScript cleanup-git | bash

# Install npm dependencies
# ------------------------
RUN cd /var/www/sharelatex \
&& bash ./bin/install-services \
\
# Cleanup not needed artifacts
# ----------------------------
&& rm -rf /root/.cache /root/.npm $(find /tmp/ -mindepth 1 -maxdepth 1)
RUN node genScript install | bash

# Compile CoffeeScript
# Compile
# --------------------
RUN cd /var/www/sharelatex \
&& bash ./bin/compile-services
RUN node genScript compile | bash

# Links CLSI sycntex to its default location
# Links CLSI synctex to its default location
# ------------------------------------------
RUN ln -s /var/www/sharelatex/clsi/bin/synctex /opt/synctex

Expand All @@ -70,13 +44,14 @@ ADD ${baseDir}/runit /etc/service

# Configure nginx
# ---------------
ADD ${baseDir}/nginx/nginx.conf /etc/nginx/nginx.conf
ADD ${baseDir}/nginx/nginx.conf.template /etc/nginx/templates/nginx.conf.template
ADD ${baseDir}/nginx/sharelatex.conf /etc/nginx/sites-enabled/sharelatex.conf


# Configure log rotation
# ----------------------
ADD ${baseDir}/logrotate/sharelatex /etc/logrotate.d/sharelatex
RUN chmod 644 /etc/logrotate.d/sharelatex


# Copy Phusion Image startup scripts to its location
Expand All @@ -85,10 +60,17 @@ COPY ${baseDir}/init_scripts/ /etc/my_init.d/

# Copy app settings files
# -----------------------
COPY ${baseDir}/settings.coffee /etc/sharelatex/settings.coffee
COPY ${baseDir}/settings.js /etc/sharelatex/settings.js

# Copy grunt thin wrapper
# -----------------------
ADD ${baseDir}/bin/grunt /usr/local/bin/grunt
RUN chmod +x /usr/local/bin/grunt

# Set Environment Variables
# --------------------------------
ENV SHARELATEX_CONFIG /etc/sharelatex/settings.js

ENV WEB_API_USER "sharelatex"

ENV SHARELATEX_APP_NAME "Overleaf Community Edition"
Expand Down
13 changes: 6 additions & 7 deletions Dockerfile-base
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN apt-get update \
qpdf \
aspell aspell-en aspell-af aspell-am aspell-ar aspell-ar-large aspell-bg aspell-bn aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-gu aspell-he aspell-hi aspell-hr aspell-hsb aspell-hu aspell-hy aspell-id aspell-is aspell-it aspell-kk aspell-kn aspell-ku aspell-lt aspell-lv aspell-ml aspell-mr aspell-nl aspell-nr aspell-ns aspell-pa aspell-pl aspell-pt aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-ss aspell-st aspell-sv aspell-tl aspell-tn aspell-ts aspell-uk aspell-uz aspell-xh aspell-zu \
\
# install Node.JS 10
&& curl -sSL https://deb.nodesource.com/setup_10.x | bash - \
# install Node.JS 12
&& curl -sSL https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get install -y nodejs \
\
&& rm -rf \
Expand All @@ -30,11 +30,10 @@ RUN apt-get update \
/etc/nginx/sites-enabled/default \
/var/lib/apt/lists/*

# Install Grunt
# Add envsubst
# ------------
RUN npm install -g \
grunt-cli \
&& rm -rf /root/.npm
ADD ./vendor/envsubst /usr/bin/envsubst
RUN chmod +x /usr/bin/envsubst

# Install TexLive
# ---------------
Expand All @@ -46,7 +45,7 @@ RUN npm install -g \
# -f Dockerfile-base -t sharelatex/sharelatex-base .
ARG TEXLIVE_MIRROR=http://mirror.ctan.org/systems/texlive/tlnet

ENV PATH "${PATH}:/usr/local/texlive/2020/bin/x86_64-linux"
ENV PATH "${PATH}:/usr/local/texlive/2021/bin/x86_64-linux"

RUN mkdir /install-tl-unx \
&& curl -sSL \
Expand Down
Loading