34 Commits

Author SHA1 Message Date
Tao Chen
51dff8c20a Git Bridge: support git-bridge configuration via env in nginx
- generate overleaf.conf dynamically
- support GIT_BRIDGE_HOST and GIT_BRIDGE_PORT
- configure client_max_body_size for /git using GIT_BRIDGE_REPOSTORE_MAX_FILE_SIZE
2026-05-19 15:51:37 +02:00
Rudy ERCEK
e9b5931cad Add MAX_UPLOAD_SIZE environment variable 2026-05-19 15:49:21 +02:00
Evelyn
b5654c5a01 fix: chown /var/lib/overleaf mount point to www-data (#33764)
The init script chowns all subdirectories but not the mount point
itself. When the host volume is owned by a non-www-data user with
restrictive permissions (e.g. 770), the web process cannot traverse
the directory and crashes with EACCES, causing a 502.

Fixes #1325 and #1465

COPYBARA_INTEGRATE_REVIEW=https://github.com/overleaf/overleaf/pull/1475 from ev-not-eve:patch-1 269a80500ff38f584a2cdef7df07a9fc0ea9408d

Co-authored-by: Evelyn <evansvevelyn@gmail.com>
GitOrigin-RevId: 959051861246c9f3958e56861821b92d84167926
2026-05-19 08:04:55 +00:00
Anna Claire Fields
0d64a88a46 Yarn 4 Migration (#32253)
Migrates the Overleaf monorepo package manager from npm (v11) to Yarn 4 (v4.9.1) using node-modules linker mode.

GitOrigin-RevId: 50d32ab01955c15e29679eff9e9e9cfb897fab2d
2026-04-28 08:52:37 +00:00
Brian Gough
729e0f5ac9 move migrations to shared location (#28306)
* fix: correct typedef for Document in helpers.mjs

* add move-migrations codemod

* update migration paths to use shared migrations directory

* move migrations to shared location

* fix: update Dockerfile and docker-compose.ci.yml to include migrations directory

* feat: add migrations tool to workspaces in package.json

* [monorepo] Fix order of docker ignore rules

* [web] remove unused docker ignore file

* [monorepo] replace old references to migrations folder

* [server-ce] copy migrations from new place

* [migrations] Inline web scripts

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] move three web scripts over

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] add missing collection

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] remove lodash dependency

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] avoid mongodb-legacy dependency

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [monorepo] run migrations from tools/migrations

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [migrations] simplify migration for adding gitBridge feature to users

* [monorepo] run migrations from tests in all the services

* [migrations] add Jenkins pipeline for linting/formatting

* [monorepo] fixup running web migrations everywhere

* [monorepo] trigger Jenkins builds on changes to mongo migrations

* [migrations] add Jenkins pipeline for linting/formatting

* [monorepo] build scripts: update devDependencies before deps scanning

* [monorepo] build scripts: formerly depend on tools/migrations

* [monorepo] run eslint on .mjs files

* [migrations] enable more eslint rules and fix all the errors

* [rake] fix migrations:list task

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 14cf69cc1b9405bbc75adbb9a000e555500e0614
2025-10-16 08:07:37 +00:00
Jakob Ackermann
e05ec0321b [server-pro] extend hotfix 5.5.5: avoid creating user_files directory (#28738)
* [WIP] restore 100_make_overleaf_data_dirs.sh

* [WIP] patch for hotfix 5.5.5

* Revert "[WIP] patch for hotfix 5.5.5"

This reverts commit cc83a526ecd86ed7b1a0e061b074d2fb15d4d672.

* Revert "[WIP] restore 100_make_overleaf_data_dirs.sh"

This reverts commit e9b0597fe8451e9ef1deaf7ed31790f7d7fc996e.

* [server-pro] extend hotfix 5.5.5: avoid creating user_files directory

* [server-ce] run binary files migration in CI

GitOrigin-RevId: ac5bb86df92b441201c69dfac6b302058b501d8e
2025-09-29 08:07:01 +00:00
Jakob Ackermann
bd4130c147 [filestore] remove user files endpoints (#28125)
* [filestore] remove user files endpoints

* [web] remove user files integration for filestore

GitOrigin-RevId: 565fa68a659c07420ee6141d0f276b4e4d2972e0
2025-09-02 08:04:52 +00:00
Jakob Ackermann
678d6809b9 [server-ce] run node scripts as www-data user (#27504)
GitOrigin-RevId: 2fbfe1ae33b42a5a9a696be811d122882093cd49
2025-07-31 08:05:15 +00:00
Antoine Clausse
fe03d8d7fd Add shellcheck to web, server-pro, server-ce (#23823)
* Update shellcheck files to include non ".sh" files having the sh shebang

* Add shellcheck to root Makefile

* `make shellcheck_fix`

* Add shellcheck to server-ce and server-pro

* Exclude SC1091 (Not following) in SP/CE

* Fix errors in SP

* Fix errors in CE

* Update root shellcheck to ignore all failing rules. We can later remove rules one by one.

* Add shellcheck to web

* Add shellcheck step for server-ce and server-pro in cloudbuild.yaml

* Revert "Add shellcheck to root Makefile"

This reverts commit e0fa56f2

* Revert "`make shellcheck_fix`"

This reverts commit eb179245c109a9e742a7fdeeb75a4bdd03963587.

* `make shellcheck_fix` in server-ce

* Fix: Use $(...) notation instead of legacy backticked

```
In init_scripts/100_set_docker_host_ipaddress.sh line 5:
echo "`route -n | awk '/UG[ \t]/{print $2}'` dockerhost" >> /etc/hosts
      ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.

Did you mean:
echo "$(route -n | awk '/UG[ \t]/{print $2}') dockerhost" >> /etc/hosts

For more information:
  https://www.shellcheck.net/wiki/SC2006 -- Use $(...) notation instead of le...
```

* `make shellcheck_fix` in web

* Manual corrections on autofix

* Update SHELLCHECK_FILES to Perl regex so it matches at start of file

GitOrigin-RevId: 815d53f319a3792efa22703beb75570de5977450
2025-02-26 09:05:02 +00:00
Andrew Rumble
813946a693 Merge pull request #22580 from overleaf/ar-migrate-server-ce-scripts
Convert server-ce-scripts module to ES modules

GitOrigin-RevId: 516247b25b5bdbfd89fee4b99a88431097c827de
2025-01-09 09:05:54 +00:00
Miguel Serrano
0346ba2698 [web] CE script to verify TexLive versions on startup (#19653)
* [web] CE script to verify TexLive versions on startup

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: b99001d38468a775991a7284611aa333e956b919
2024-08-22 14:01:07 +00:00
Miguel Serrano
f3ccafee94 [CE/SP] Hotfix 5.0.3 (#18075)
* [CE/SP] Hotfix 5.0.3

* [CE/SP] Apply hotfix changes to init script

There's some divergences in the current state of
910_initiate_doc_version_recovery in server-ce/init_scripts
and 5.0.2 hotfix. With this change we ensure the same content
in server-ce/init_scripts and the current hotfix

* Updated patch for recover_doc_versions.js

GitOrigin-RevId: 175af6b3ac584575764cbd03a5105c6933618c28
2024-04-25 08:04:38 +00:00
Eric Mc Sween
a2d5e030c6 Merge pull request #18041 from overleaf/em-jpa-recovery-script
[history-v1] add doc version recovery script

GitOrigin-RevId: 3f240f313465ce5fa9c53f72a992807f9396ebb4
2024-04-23 08:05:40 +00:00
Jakob Ackermann
2e6e24335c Merge pull request #17239 from overleaf/jpa-sl-cleanup
[misc] remove ShareLaTeX branding from remaining file paths

GitOrigin-RevId: cd47c693ee18a1b5b1c821f2dc5f1be53ae96cc0
2024-02-22 09:04:29 +00:00
Jakob Ackermann
ae3a529d8b Merge pull request #17050 from overleaf/jpa-fix-server-pro-start
[server-pro] fix container startup sequence -- render nginx.conf first

GitOrigin-RevId: 89629ccdc2232f89a204d6ea8be1e650cb78c753
2024-02-13 09:03:51 +00:00
Jakob Ackermann
6d98d6a7c0 Merge pull request #16923 from overleaf/jpa-server-pro-fs-rebranding
[server-pro] remove ShareLaTeX branding from filesystem

GitOrigin-RevId: c1d2c63bdc888d81e03bb1721e44b6ed6f64524b
2024-02-12 09:03:39 +00:00
Jakob Ackermann
12befda220 Merge pull request #16919 from overleaf/jpa-check-env-vars
[server-ce] add script for checking on old ShareLaTeX env vars

GitOrigin-RevId: a60d6f7648d65c336054795affe91a349aa629cf
2024-02-12 09:03:33 +00:00
mserranom
5412e38cb5 Rebranded SHARELATEX_IS_SERVER_PRO env variable
GitOrigin-RevId: 4e728fa7da5ea6b0132452865a3725ef86ed94da
2024-02-09 09:05:50 +00:00
Eric Mc Sween
8ed9144c7d Merge pull request #12422 from overleaf/em-server-pro-history-config
Allow git bridge to communicate with history in Server Pro

GitOrigin-RevId: f6eca0063e582ad73a7db29d06da0018387de444
2023-04-04 12:22:51 +00:00
Tim Down
7c7f8c1573 Merge pull request #11733 from overleaf/msm-close-site-sp-shutdwn
[CE/SP] close site on shutdown before flushing

GitOrigin-RevId: e36c80f2f4c6f10eda3a536319a2fcc5dfda4fa4
2023-02-09 09:07:07 +00:00
Miguel Serrano
b67c3fabaa Merge pull request #11628 from overleaf/msm-history-migration-tmp-path
[CE] move history migration paths to `tmp`

GitOrigin-RevId: e24e1d3d7f3a26fa2f4db9c9abd262745f9e7778
2023-02-02 18:23:16 +00:00
Jakob Ackermann
8d3bc8422e Merge pull request #11597 from overleaf/jpa-server-ce-nginx-keepalive
[server-ce] nginx: make keepalive_timeout configurable

GitOrigin-RevId: 3a0bb049b57f0a4ee065c86463fd6300d97934c7
2023-02-02 18:22:01 +00:00
Miguel Serrano
c3889f8856 Merge pull request #11528 from overleaf/msm-history-data-ce
[CE] Add `path.projectHistories` to `settings.js`

GitOrigin-RevId: 97c249153baed793fff0fd564a9a75efdd6b2d32
2023-01-30 11:32:24 +00:00
Miguel Serrano
4a84922a2f Merge pull request #11346 from overleaf/msm-config-history-v1-sp
Configuration changes for FPH in CE/SP

GitOrigin-RevId: 990eb0fa6158d4815740413da085759d2cc5e231
2023-01-20 14:13:46 +00:00
Jakob Ackermann
48582bcdc9 Merge pull request #8793 from overleaf/jpa-fix-permissions
[server-ce] init: ensure clsi output dir exists with correct ownership

GitOrigin-RevId: ff1c7827c1b44c480dc9027c53a2e67f2527cc7f
2022-07-11 08:04:30 +00:00
Jakob Ackermann
d5dd92c034 Merge pull request #6567 from overleaf/jpa-server-ce-pro-layout
[misc] align directory layout of server-ce/pro with production docker images

GitOrigin-RevId: d3e6b9f8793e83df59f86105d511c6fb87c3eea3
2022-02-02 09:03:33 +00:00
Jakob Ackermann
03b4e02c0f Merge pull request #5381 from overleaf/jpa-sqlite-cleanup
[misc] cleanup some more references following the removal of sqlite

GitOrigin-RevId: db5db9c0e2ba2557b11d64f65fdb5db1dcd2ec74
2021-10-28 08:03:54 +00:00
Shane Kilkelly
510b678dc6 Add init script to run migrations from web 2021-07-15 13:16:53 +01:00
Jakob Ackermann
77cd7690fb [misc] move server-ce scripts into a module in web 2021-07-13 17:03:14 +01:00
Jakob Ackermann
ac1eb8fb50 [misc] goodbye grunt 2021-07-12 17:25:44 +01:00
Shane Kilkelly
c8dcf853bc Remove migrations
These will be replaced by migrations in the web project
2021-07-08 10:08:34 +01:00
Shane Kilkelly
f849b94005 Variables in Nginx configuration (#853)
* Add envsubst binary to image

* Generate nginx.conf from template, with env-vars

* Remove nginx.conf, now generated from template

* Reload nginx config after writing file

Co-authored-by: Shane Kilkelly <shane.kilkelly@overleaf.com>
2021-04-07 15:19:06 +02:00
Jakob Ackermann
89fe7ca11a [init_scripts] delete old logs of the contacts service 2021-01-12 10:16:09 +00:00
mserranom
276281e7e4 moved files from docker-image imported repo to root 2020-02-17 13:56:49 +01:00