477 Commits

Author SHA1 Message Date
Shane Kilkelly 245fc120e6 Merge pull request #916 from overleaf/sk-new-migrations
Add init script to run migrations from web
2021-07-21 11:54:26 +01:00
Jakob Ackermann df1b7a0598 Merge pull request #917 from overleaf/jpa-create-user
[misc] bin/grunt: keep up with changes to create-admin script
2021-07-20 14:07:27 +02:00
Jakob Ackermann 1a845d36d7 Merge pull request #918 from overleaf/jpa-fix-revision.txt
[misc] bring back old schema of revision.txt
2021-07-20 10:39:31 +02:00
Jakob Ackermann 34a1a8bfc9 [misc] bring back old schema of revision.txt
- store in /var/www/revision.txt
- prefix each line with the services directory
2021-07-16 15:31:53 +01:00
Jakob Ackermann 4f6a3a6193 [misc] bin/grunt: keep up with changes to create-admin script 2021-07-15 15:09:54 +01:00
Shane Kilkelly 16876378c7 Add init script to run migrations from web 2021-07-15 13:16:53 +01:00
Jakob Ackermann 470d539c82 Merge pull request #913 from overleaf/jpa-goodbye-grunt
[misc] goodbye grunt
2021-07-14 17:23:28 +02:00
Jakob Ackermann 2b5fb67461 [misc] move server-ce scripts into a module in web 2021-07-13 17:03:14 +01:00
Jakob Ackermann 44e78fca38 [misc] work around broken 'npm ci --only=production' 2021-07-13 09:13:04 +01:00
Jakob Ackermann 6b4854f34e [misc] goodbye grunt 2021-07-12 17:25:44 +01:00
Jakob Ackermann 72f1cd4bc6 Merge pull request #912 from overleaf/msm-renamed-private-cert-saml
Renamed SAML setting `privateCert` -> `privateKey`
2021-07-12 13:35:27 +02:00
Jakob Ackermann 153f0f5063 Merge pull request #911 from overleaf/jpa-decaff-and-config-cleanup
[misc] decaff and config cleanup
2021-07-12 13:35:14 +02:00
Jakob Ackermann baccf2e0d5 Merge pull request #910 from overleaf/sk-remove-migrations-1
Remove migrations
2021-07-12 13:34:58 +02:00
Miguel Serrano ff0fc5756e Renamed SAML setting privateCert -> privateKey
Required by `passport-saml` update to 3.x
2021-07-09 16:52:26 +02:00
Jakob Ackermann 36c03b11c8 [misc] fix listing of services for bin/ scripts 2021-07-08 11:19:13 +01:00
Jakob Ackermann 430c284492 [misc] drop coffee-script imports 2021-07-08 11:19:13 +01:00
Jakob Ackermann 2be3a8147c [misc] upgrade settings module to v2 2021-07-08 11:19:13 +01:00
Jakob Ackermann d36eb37033 [misc] update references to decaffeinated coffee-script files 2021-07-08 11:19:13 +01:00
Jakob Ackermann 58b0de0af4 [misc] do not set SHARELATEX_CONFIG in run scripts 2021-07-08 11:19:13 +01:00
Jakob Ackermann 00c14ee624 [misc] delete commented ProjectSize task 2021-07-08 11:19:13 +01:00
Jakob Ackermann 1b63336d36 [misc] run format:fix 2021-07-08 11:19:13 +01:00
decaffeinate c0dd3df094 decaffeinate: Run post-processing cleanups on coffee files 2021-07-08 11:19:13 +01:00
decaffeinate 7eeb4557f4 decaffeinate: Convert coffee files to JS 2021-07-08 11:19:00 +01:00
decaffeinate 24fee2faf7 decaffeinate: Rename coffee files from .coffee to .js 2021-07-08 11:18:47 +01:00
Jakob Ackermann 8858f05eaa [misc] setup eslint and prettier and fix any errors 2021-07-08 11:16:04 +01:00
Shane Kilkelly 04219b166f Remove migrations
These will be replaced by migrations in the web project
2021-07-08 10:08:34 +01:00
Jakob Ackermann d65a7fe20d Merge pull request #903 from overleaf/jpa-faster-install
[perf] faster docker image builds
2021-07-08 10:57:26 +02:00
Jakob Ackermann 3b63e1c8fd [perf] use npm ci --only=production for all but web 2021-07-07 14:46:25 +01:00
Jakob Ackermann 6988aa956e [perf] use npm ci 2021-07-07 14:46:20 +01:00
Jakob Ackermann 8a52906432 [perf] use docker layer caching from previous build 2021-07-07 14:46:13 +01:00
Rainshaw c4ead8f9e7 fix nginx conf (#896)
* fix nginx conf
2021-06-24 17:12:46 +02:00
Rainshaw 35477973cf fix redis config (#895)
* fix redis config when using redis on host machine without password auth
2021-06-15 12:51:25 +02:00
John Lees-Miller 4a8f88c4a8 Fix some old README links
Some of these were redirects / inconsistent. Also clarify wording for SP link.
2021-06-14 11:57:40 +01:00
Miguel Serrano dcbe211381 Hotfix 2.6.2 (#888) 2021-05-20 10:59:43 +02:00
John Lees-Miller 0cb9e53051 Make it clear that the screenshot is Server Pro 2021-05-13 15:00:07 +01:00
Miguel Serrano 20c3d7ae71 hotfix 2.6.1 (#875) 2021-04-21 13:13:47 +02:00
Jakob Ackermann 0c8d1a1e8c [migrations] fix index creation (#871) 2021-04-14 12:54:46 +02:00
Jakob Ackermann 3f794b68f9 [migrations] open source newly added indexes (#870) 2021-04-13 21:50:32 +02:00
Miguel Serrano abd501741d Updated base image to Node 12 (#865) 2021-04-07 15:20:51 +02:00
Shane Kilkelly 9fecfbe429 Add the new outputDir setting for CLSI (#862)
Co-authored-by: Shane Kilkelly <shane.kilkelly@overleaf.com>
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
2021-04-07 15:20:19 +02:00
Shane Kilkelly cb944a8996 Expose new smtp vars: 'name', and 'logger' (#854)
Co-authored-by: Shane Kilkelly <shane.kilkelly@overleaf.com>
2021-04-07 15:19:17 +02:00
Shane Kilkelly d674a12167 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
Miguel Serrano b39f2ba107 Added SHARELATEX_SAML_DECRYPTION_CERT environment variable (#860) 2021-03-31 11:11:23 +02:00
Christopher Hoskin 10204cf16d Merge pull request #861 from overleaf/csh-update-passport-saml-urls
Update passport-saml URLs
2021-03-22 17:29:17 +00:00
Christopher Hoskin dd874ddef4 Update passport-saml URLs 2021-03-19 09:53:18 +00:00
Miguel Serrano 3199fd359e Added configurable AWS region to email settings (#847) 2021-03-02 17:29:12 +01:00
Josh Soref 231456f5d7 Fix spelling errors (#823) 2021-03-02 10:35:40 +01:00
Miguel Serrano e03b320961 Hotfix 2.5.2 (#831) 2021-01-25 13:08:04 +01:00
Jakob Ackermann 3a35397b6e Merge pull request #828 from overleaf/jpa-hotfix-2-5-1
[hotfix] produce version 2.5.1 with fixes for log rotation
2021-01-14 11:44:06 +00:00
Jakob Ackermann 79b7315ca5 [hotfix] produce version 2.5.1 with fixes for log rotation 2021-01-14 10:33:37 +00:00
Miguel Serrano 3ca5d71945 msm-change-logrotate-permissions (#827) 2021-01-14 11:23:29 +01:00
Jakob Ackermann 8647127844 Merge pull request #826 from overleaf/jpa-fix-contacts-logging
[misc] fix contacts logging
2021-01-12 11:54:39 +00:00
Jakob Ackermann df1b8235f7 [init_scripts] delete old logs of the contacts service 2021-01-12 10:16:09 +00:00
Jakob Ackermann b229cbb10e [runit] fix the cycling of logs for the contacts service 2021-01-12 10:15:38 +00:00
Miguel Serrano 284a6e910c Updated mongo to 4.0 for release 2.5.0 (#815) 2020-11-19 11:02:21 +01:00
Miguel Serrano e48bc5e03c added radix to parseInt() calls and make them fail fast (#806) 2020-10-26 11:08:00 +01:00
Miguel Serrano 937e4b31b7 Merge pull request #805 from overleaf/msm-compile-timeout-env
Expose COMPILE_TIMEOUT env variable and update nginx timeouts
2020-10-23 12:47:12 +02:00
Miguel Serrano d8d6dbffee added radix to parseInt() call 2020-10-23 11:58:43 +02:00
Miguel Serrano 8c99bfe066 addressed PR feedback 2020-10-22 18:24:40 +02:00
Miguel Serrano 0f724a2041 updated nginx timeout to 4m 2020-10-22 13:38:33 +02:00
Miguel Serrano 65c1a971c7 added support for COMPILE_TIMEOUT env 2020-10-22 13:38:14 +02:00
Miguel Serrano 1d02dd5149 Merge pull request #798 from overleaf/msm-fix-email-custom-footer
Fix email custom footer
2020-10-21 12:05:29 +02:00
Miguel Serrano 994bdd60ab removed <div> from email footer 2020-10-09 11:33:06 +02:00
Miguel Serrano 9de5edcffc Fix typo in settings templates->template 2020-10-09 11:32:45 +02:00
Jakob Ackermann d7a05d3bf7 Merge pull request #797 from overleaf/jpa-wait-for-db
[misc] keep up with web changes -- add waitForDb wrapper for tasks
2020-10-06 14:02:26 +02:00
Miguel Serrano f3fc0e93e9 Merge pull request #792 from overleaf/msm-hotfix-2-4-2
Hotfix 2.4.2 - fix anon read/write sharing
2020-10-05 17:50:47 +02:00
Jakob Ackermann 78b57fcf66 [misc] keep up with web changes -- add waitForDb wrapper for tasks 2020-10-05 09:45:43 +01:00
Miguel Serrano 057956c9dd added patch to fix left footer with html links 2020-10-01 12:46:11 +02:00
Miguel Serrano 884bdc58f8 using original single patch 2020-10-01 11:53:11 +02:00
Miguel Serrano cfbd5c3bd4 Hotfix 2.4.2 - fix anon read/write sharing 2020-09-29 10:30:20 +02:00
Jakob Ackermann 28f326fd98 Merge pull request #776 from overleaf/jpa-dependabot-config
[misc] add the dependabot config of the buildscripts
2020-09-04 10:47:31 +02:00
Jakob Ackermann ccb05e09c1 [misc] add the dependabot config of the buildscripts
See inline docs for rationals of each (non-trivial) option.
2020-09-04 09:23:20 +01:00
Miguel Serrano 7c9ec6c638 Merge pull request #768 from overleaf/msm-hotfix-2-4-1
Hotfix 2.4.1
2020-08-19 11:00:53 +02:00
Miguel Serrano 881bbde0a5 Hotfix 2.4.1 2020-08-19 10:56:03 +02:00
Jakob Ackermann 02098ca23b Merge pull request #760 from overleaf/jpa-post-decaff
[bin/compile-services] all services are decaffeinated now
2020-07-08 13:17:03 +02:00
Jakob Ackermann 8c2b3c0896 [bin/compile-services] all services are decaffeinated now 2020-07-08 11:18:47 +01:00
Miguel Serrano b842348215 Merge pull request #757 from overleaf/msm-hotfix-2.3.1
Hotfix 2.3.1: Fixed synctex
2020-06-29 17:10:26 +02:00
Miguel Serrano 97d82a7277 Fixed syntex 2020-06-25 12:29:29 +02:00
Miguel Serrano 8839b473a7 Merge pull request #748 from overleaf/msm-change-redist-tag-5
Set tag '5' for redis image
2020-05-29 20:41:43 +02:00
Miguel Serrano 7d70401693 Set tag '5' for redis image 2020-05-29 15:07:51 +02:00
Miguel Serrano 422001d16d Merge pull request #744 from overleaf/msm-remove-tags
Removed tags service
2020-05-26 11:17:52 +02:00
Miguel Serrano 21b05f7a12 Merge pull request #745 from overleaf/msm-remove-privileged
Removed privileged mode from docker-compose.yml
2020-05-25 17:24:12 +02:00
Miguel Serrano 561aff34b9 Removed privileged mode from docker-compose.yml 2020-05-25 16:54:38 +02:00
Miguel Serrano 886e5f1054 removed tags service 2020-05-25 16:46:25 +02:00
Miguel Serrano 857e5620c5 Set TEXMFVAR to a writable location (#739) 2020-05-25 15:16:18 +02:00
Miguel Serrano e2f6f670ef Merge pull request #740 from overleaf/msm-expose-env-var-pdf-optimisation
added 'OPTIMISE_PDF' environment variable
2020-05-20 20:26:44 +02:00
Miguel Serrano 9fd72d4e7b added 'OPTIMISE_PDF' environment variable 2020-05-20 07:49:44 +02:00
Miguel Serrano 6d14c182cd Merge pull request #737 from Soptq/patch-2
Restrict Redis version to 5.0.0
2020-05-18 15:41:13 +02:00
Soptq d203478a51 Update docker-compose.yml
Restrict redis version to 5.0.0
2020-05-09 14:36:59 +08:00
Christopher Hoskin 4faadc77f2 Merge pull request #733 from overleaf/csh-issue-2578-add-base-tag-arg
Try making the base image tag specifiable
2020-05-06 14:21:23 +01:00
Miguel Serrano b697794b2b Merge pull request #732 from overleaf/msm-remove-doc-updater-compilation
Remove compilation step from document-updater
2020-05-06 14:42:18 +02:00
Miguel Serrano 9875106760 Remove compilation step from document-updater 2020-05-06 14:32:53 +02:00
Christopher Hoskin 626b555cd1 Try making the base image tag specifiable 2020-05-06 11:59:42 +01:00
Jakob Ackermann 0a21775489 Merge pull request #726 from overleaf/jpa-temporary-fix-for-lualatex
[docker-compose] add a temporary fix for LuaLatex compiles
2020-04-22 11:02:40 +02:00
Jakob Ackermann b085b9931a [docker-compose] add a temporary fix for LuaLatex compiles 2020-04-22 10:34:47 +02:00
Miguel Serrano 863cb04062 Added pull request template (#723) 2020-04-16 12:08:37 +02:00
Christopher Hoskin 903893bc7d Merge pull request #724 from overleaf/csh-issue-2578-server-pro-cloud-build
Use variables for Makefile tagging
2020-04-16 09:59:06 +01:00
Christopher Hoskin 53f9071a1f Use variables for Makefile tagging 2020-04-15 15:11:31 +01:00
zefyrr 810a5163e5 updated texlive dir for path env variable (#719)
Co-authored-by: Omer Kareem <okareem@omerk.local>
2020-04-15 13:15:10 +02:00
Timothée Alby 13a6a9ae89 add allowedImageNames setting from ENV vars (#718)
Uses `ALL_TEX_LIVE_DOCKER_IMAGES` (required) and
`ALL_TEX_LIVE_DOCKER_IMAGE_NAMES` (optional) to add the
`allowedImageNames` setting, allowing users to change a project's Tex
Live version.
2020-04-14 12:08:59 +02:00
Miguel Serrano abc031efd0 Fixed compile scripts for non-coffee modules (#717) 2020-04-07 16:17:51 +02:00
Miguel Serrano 7b2238ae58 Added 'currentImageName' setting plus migration (#701) 2020-03-09 13:15:40 +01:00
Shane Kilkelly dd4f78cca1 Merge pull request #699 from overleaf/sk-not-mount-docker-socket-by-default
Comment out the docker socket mount
2020-02-20 15:10:16 +00:00
Shane Kilkelly 09bf71f2b2 Comment out the docker socket mount
And add a note for server-pro users to un-comment the line if they want to use sibling containers.
2020-02-20 15:09:00 +00:00
Miguel Serrano 42431d01ba Merge pull request #696 from overleaf/msm-monorepo-merge
Merge docker-image repository
2020-02-19 10:24:42 +01:00
mserranom dc53803a7e Updated dockerfile and build script with monorepo changes 2020-02-17 14:58:47 +01:00
mserranom f316ebde98 merged services.js 2020-02-17 14:00:29 +01:00
mserranom f7ec9dfced merged .gitignore 2020-02-17 13:58:48 +01:00
mserranom aad5df5168 merged README.md 2020-02-17 13:57:53 +01:00
mserranom 93dce40328 moved files from docker-image imported repo to root 2020-02-17 13:56:49 +01:00
mserranom 731b0d5918 Merging docker-image to master 2020-02-17 13:50:21 +01:00
Jakob Ackermann ebd31737a5 [misc] minimize the main stage (#122)
- cleanup git history
- do not install not needed npm packages
  - The Gruntfile was removed in
    REF: 27dd97ecc5

  - The simple-git package is not used since
    REF: df2d46df82
- cleanup npm cache
- cleanup node-gyp build cache
- cleanup /tmp
- move copying of the settings defaults after the installation

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-02-13 16:38:58 +01:00
Jakob Ackermann e83b7856c3 [init] bail out in case the db access fails (#123)
* [init] bail out in case the db access fails

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [misc] bail out in case any command in an init_script failed

NOTE: sh does not support `-o pipefail`.

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-02-13 13:33:55 +01:00
Jakob Ackermann 47e51a2075 [misc] minimize base image (#120)
* [docker] drop sudo

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker] install qpdf in a single stage

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker] install texlive and additional tlmgr packages in a single stage

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker] drop the apt package lists

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker] pull the package lists only once

move the installation of nodejs into the dependencies install section

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker] delete the default nginx configuration files immediately

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker] skip the downloading and storage of unused texlive artifacts

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker] drop the npm download cache

Signed-off-by: Jakob Ackermann <das7pad@outlook.com>

* [docker] apply review feedback

- install qpdf as ubuntu package
- add a comment on the nginx config removal
- add back and update a note on changing the texlive mirror
2020-02-13 12:00:03 +01:00
Jakob Ackermann e422c20e74 [nginx] simplify the root specification for sendfile (#121)
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-02-13 11:59:20 +01:00
Jakob Ackermann 5e0f94f404 [settings] produce a consistent redis config for every service (#124)
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-02-13 11:56:03 +01:00
Timothée Alby f02d62d3a1 Merge pull request #692 from overleaf/msm-fixed-mailing-list-link
Fixed mailing list link in README
2020-02-12 08:39:05 -05:00
Miguel Serrano e8bdb6b0e6 Fixed mailing list link in README 2020-02-10 12:08:54 +01:00
Miguel Serrano 5c9a56d906 Removed node6 and updated modules to Node 10 (#135) 2020-02-06 11:19:15 +01:00
Jakob Ackermann f2ee880549 [misc] narrow down the rw accessible directories for the run user (#119) 2020-01-29 12:14:32 +01:00
Miguel Serrano 3781585862 Set CRYPTO_RANDOM as environment variable at startup time (#134) 2020-01-28 07:16:23 +01:00
Jakob Ackermann 7a481d0d1d Merge pull request #133 from overleaf/jpa-dump-all-git-shas
[misc] export all git repository revisions
2020-01-23 15:37:48 +01:00
Jakob Ackermann df2d46df82 [misc] export all git repository revisions
There is a multi purpose shell script for the gathering of git revisions
 now.
It will extract all revisions that can be found in traversing of the
 current working directory. This effectively includes the
 overleaf/overleaf repo and any others that may be added downstream.
2020-01-23 10:57:36 +01:00
Miguel Serrano 689104d93e Removed compile:all from filestore and notifications services (#688) 2020-01-22 14:41:31 +01:00
Miguel Serrano bb3485016e Added missing recaptcha configuration (#132) 2020-01-21 12:37:40 +01:00
Miguel Serrano 9d6cf19d35 Updated location of synctex path in docker-compose.yml (#680) 2020-01-09 15:56:19 +01:00
Miguel Serrano 17bfbee183 Added environment variables for web-api user/pass (#131) 2020-01-09 15:55:57 +01:00
Miguel Serrano c05da63e84 Add environment variable to disable email confirmation banner (#676) 2020-01-08 10:03:59 +01:00
Miguel Serrano 5e17a4c928 Hotfix 2.0.2 (#130) 2019-12-10 15:06:40 +01:00
theunbound bb87d0af1c Remove make targets in web (#670) 2019-12-09 18:02:52 +01:00
Shane Kilkelly 54f444e0ba Merge pull request #667 from overleaf/ShaneKilkelly-patch-1
Update docker-compose.yml
2019-11-22 14:24:12 +00:00
Shane Kilkelly 3d96aba203 Update docker-compose.yml 2019-11-22 13:03:59 +00:00
Miguel Serrano ef8f099b10 Copy synctex executable to docker host (#129) 2019-11-22 10:12:33 +01:00
Miguel Serrano 550acd6531 Add SYNCTEX_BIN_HOST_PATH environment variable (#664) 2019-11-21 12:16:29 +01:00
Miguel Serrano f92c6c27b0 Remove overriden v1 settings (#128) 2019-11-21 11:52:02 +01:00
Shane Kilkelly d09b6149e1 Update ISSUE_TEMPLATE.md 2019-11-07 15:17:39 +00:00
Shane Kilkelly 429cbca95d Create ISSUE_TEMPLATE.md 2019-11-07 09:30:55 +00:00
Miguel Serrano f9b00c3dfa Added webpack compilation scripts (#651) 2019-10-23 10:20:39 +02:00
Miguel Serrano 12c18f76fd Overleaf CE Hotfix 2.0.1 (#126) 2019-10-21 11:48:01 +02:00
Miguel Serrano ad0355bcde Added explicit reference to Server Pro image in docker-compose (#649) 2019-10-18 15:41:28 +02:00
Miguel Serrano deb1ca3639 Fix token creation on admin registration (#648) 2019-10-18 10:03:05 +02:00
Miguel Serrano 1c57b1deab Disable project-history via settings (#125) 2019-10-15 11:00:38 +02:00
Miguel Serrano fe5cdef39c Linked CLSI synctext to /opts/synctex (#118) 2019-10-08 12:47:08 +02:00
Matthieu Simonin 431aa43b63 Fix the paths in grunt tasks (#643) 2019-10-08 12:46:53 +02:00
Miguel Serrano 4b0ea96b55 Delete aggregated error log (#117) 2019-10-08 11:54:49 +02:00
Shane Kilkelly 6f5ea89677 Merge pull request #116 from overleaf/sk-server-pro-set-socket-permissions
Copy logic from clsi entrypoint, to set permissions on docker.sock
2019-09-24 12:01:39 +01:00
Shane Kilkelly 41ba0063bc Copy logic from clsi entrypoint, to set permissions on docker.sock 2019-09-24 11:52:38 +01:00
Shane Kilkelly 66c8f0a14c Merge pull request #642 from overleaf/sk-add-token-prefix-migration
Add migration for token prefix
2019-09-23 09:13:37 +01:00
Shane Kilkelly f5bccb2e93 Add migration for token prefix 2019-09-20 13:20:44 +01:00
Miguel Serrano 76a6ff8ff1 Fixed misspelling in migration script (#641) 2019-09-18 14:11:34 +02:00
Miguel Serrano 0206c39082 README beautification (#640) 2019-09-13 16:21:59 +02:00
Miguel Serrano 2576675662 Added migration script for User.emails (#639) 2019-09-13 13:57:37 +02:00
Miguel Serrano c23c2f3447 Added mongo healthcheck to docker-compose (#636) 2019-09-11 14:07:26 +02:00
Miguel Serrano f3e1f01a97 Added ENABLE_CONVERSIONS environment variable (#635) 2019-09-11 13:08:02 +02:00
Miguel Serrano 4b19fab616 Added docker compose override file for debugging (#634) 2019-09-10 17:13:25 +02:00
Miguel Serrano ece429d9b0 Added debugging support to services (#113) 2019-09-10 17:13:17 +02:00
Miguel Serrano 51e08643ea Updated docker-compose.yml with new and missing properties for ServerPro 2.0 (#632) 2019-09-06 10:47:14 +02:00
Miguel Serrano 6cc98a8039 Override v1.url setting with "" instead of null (#112) 2019-09-06 10:37:03 +02:00
Miguel Serrano 38291a364e Updated settings with several fixes (#111) 2019-09-04 16:39:47 +02:00
Miguel Serrano ad6d81a8cc Updated settings to serve minified assets (#110) 2019-09-03 11:36:39 +02:00
Miguel Serrano 3950f45612 Added minification to web compile script (#631) 2019-09-03 11:36:10 +02:00
Miguel Serrano 8cf70ce7f1 Server Pro fixes (#109) 2019-08-22 16:57:26 +02:00
Miguel Serrano f4d0e0a47d Run filestore with node6 (#108) 2019-08-20 10:50:23 +02:00
John Lees-Miller 304e4a7c36 Update mailing list link 2019-08-15 10:55:25 +01:00
Miguel Serrano c8285484aa Merge pull request #107 from overleaf/msm-revive-overleaf-community
Revive overleaf community
2019-08-13 10:51:31 +02:00
Miguel Serrano 0424a71b47 Merge pull request #629 from overleaf/msm-fix-build
Fix install-services scripts
2019-08-12 13:31:24 +02:00
mserranom 30cb8e06d5 reverted minification for web 2019-08-12 09:32:54 +00:00
mserranom b03804e1b2 added minification for web 2019-08-08 16:11:43 +00:00
mserranom 52a6e46cdd addressed PR comments 2019-08-08 10:44:14 +00:00
mserranom 5a4669acbc added missing aspell languages 2019-08-07 08:52:55 +00:00
mserranom 32cb10a602 Revive overleaf community 2019-08-07 08:47:05 +00:00
mserranom adeed75758 removed nvm 2019-08-06 12:00:55 +00:00
mserranom dad81fab3d removed -x option in bash command 2019-08-06 12:00:43 +00:00
mserranom e4df6be87e fixed install-services and split install and compilation 2019-07-23 12:56:49 +00:00
mserranom 7970532241 updated node version 2019-07-23 12:56:25 +00:00
Henry Oswald 584060027c Update docker-compose.yml 2019-05-31 10:27:15 +01:00
Tim Alby 7f13fd20af update README
- change app name
- update copyright notice
- update links
- change authors
2019-05-07 19:29:46 +02:00
John Lees-Miller 6f2a9ff24c Merge pull request #615 from sharelatex/cla-link
Update CLA and other links
2019-04-10 16:50:10 +01:00
John Lees-Miller 63240d1a72 Update CLA and other links 2019-04-10 16:15:41 +01:00
James Allen 998d370362 Merge pull request #612 from sharelatex/remove-travis-icons
Remove travis build status icons
2019-04-01 10:30:08 +01:00
John Lees-Miller 6457732be7 Remove travis build status icons 2019-04-01 08:25:50 +01:00
Shane Kilkelly e448cad7ce Merge pull request #98 from sharelatex/sk-update-readme
Update the readme with a short explanation of how this code works
2019-03-01 11:16:32 +00:00
Shane Kilkelly e359037958 remove bit from readme 2019-03-01 11:16:12 +00:00
Shane Kilkelly 03d6d80fdb Update the readme with a short explanation of how this code works 2019-02-19 10:22:40 +00:00
Shane Kilkelly 808da2a580 Merge pull request #570 from sharelatex/sk-unlisted-projects
add migration for token-based access indexes
2018-08-02 10:11:13 +01:00
Shane Kilkelly 6825f5d279 Fix whitespace 2018-08-02 10:10:19 +01:00
Henry Oswald f11ef9dcc2 added example sandbox compiles mount 2018-05-02 16:07:23 +01:00
James Allen 765ad89fa4 Update CONTRIBUTING.md 2018-04-26 09:43:07 +01:00
Henry Oswald 5064b4cb3a updated the docker compose file with working ldap example 2018-02-27 10:15:42 +00:00
Shane Kilkelly b830a7d837 Merge branch 'master' of github.com:sharelatex/sharelatex-docker-image 2018-02-06 10:26:50 +00:00
Shane Kilkelly 3c4866a710 Change launchpad location to github 2018-02-06 10:26:29 +00:00
Henry Oswald 9f590b940f lockk down to latest versions of mongodb 2018-01-31 11:28:50 +00:00
Henry Oswald aa3d45eb5a added npm shrinkwrap to fix mongodb native version change 2018-01-31 11:19:05 +00:00
Henry Oswald b3c130c268 fix mongo connect issue, .connect no longer exists on mongojs 2018-01-31 11:04:58 +00:00
Henry Oswald 7b5b60ce39 added track changes migration in again, we didn't add the setting
as a default before so needs 2nd migration
2018-01-26 09:46:35 +00:00
Henry Oswald f18a0498a9 added trackChanges into features 2018-01-26 09:43:43 +00:00
Henry Oswald 563b9bfe3f Update docker-compose.yml 2018-01-25 11:34:29 +00:00
Shane Kilkelly d5338b5719 Pin version of simple-git 2018-01-22 14:47:00 +00:00
Shane Kilkelly 16b5c5dd1a Chown the sharelatex directory to www-data 2018-01-08 16:21:18 +00:00
Shane Kilkelly 2761615440 Pin contacts to branch 'sk-update-mongojs' 2017-12-06 11:21:54 +00:00
Shane Kilkelly 51d59f20b0 move contacts run file 2017-12-05 09:48:05 +00:00
Shane Kilkelly 9cb19535bb Merge pull request #83 from sharelatex/sk-bypass-percentage-rollouts
add option to bypass percentage-based rollouts
2017-11-10 15:32:52 +00:00
Shane Kilkelly 16285366db add option to bypass percentage-based rollouts 2017-11-10 14:15:22 +00:00
Shane Kilkelly c7e8d29e09 Merge branch 'sk-unlisted-projects' 2017-11-10 14:13:17 +00:00
Shane Kilkelly 2e82ac99bd Add token-access-refs indexes 2017-11-08 11:55:08 +00:00
Shane Kilkelly c3d7f36b17 add migration for token-based access indexes 2017-11-08 09:59:08 +00:00
Shane Kilkelly a92c0fc1b4 Merge pull request #82 from d-Rickyy-b/FixTypo
Fix typo in error log filename
2017-10-23 15:48:09 +01:00
Rico 041c73221a Fix typo in error log filename 2017-10-23 14:46:37 +02:00
Shane Kilkelly 410039534a Add setting to enable anonymous read-write sharing 2017-10-18 13:28:13 +01:00
Shane Kilkelly 1a9aab3516 Pin to latest base image 2017-09-08 09:09:42 +01:00
Shane Kilkelly 86b5d97491 Remove un-used package import 2017-09-08 09:06:48 +01:00
Shane Kilkelly dad32e7adf update bson api in migration 3 2017-09-07 15:27:28 +01:00
Shane Kilkelly ce85997843 depend on bson explicitely 2017-09-07 13:23:18 +01:00
Shane Kilkelly cecf155465 Merge pull request #79 from sharelatex/sk-allow-explicit-ses-email-config
add the driver field to email config
2017-09-07 10:21:08 +01:00
Shane Kilkelly 587d3d3e14 Add grunt install command to install-services 2017-09-06 13:37:34 +01:00
Shane Kilkelly 7fd351a2be Add call to install-services 2017-09-06 11:16:12 +01:00
Shane Kilkelly 3a26a8f2d5 Merge pull request #559 from sharelatex/sk-node-6
Update to node6
2017-09-06 10:51:38 +01:00
Shane Kilkelly f7cce110ca Merge pull request #558 from sharelatex/sk-allow-no-nvm
check for nvm presence before using, survive abscence
2017-09-06 10:51:27 +01:00
Shane Kilkelly 3e38e99aa6 Fix the doc lines migration.
- The bson module changed at some point, update to new api
2017-09-06 09:56:44 +01:00
Shane Kilkelly 7fbfd3ddf8 Update to node6.
- update nvmrc file
- update mongojs dependency (for migrations)
2017-09-05 15:33:32 +01:00
Shane Kilkelly 59f85704cf Add warning when NVM is not present 2017-09-05 15:26:40 +01:00
Shane Kilkelly 54874c3389 Suppress verbose output from type command. 2017-09-04 15:57:13 +01:00
Shane Kilkelly bdbf2b3e71 check for nvm presence before using, survive abscence 2017-09-04 15:40:27 +01:00
James Allen 0e6abc60ff Merge pull request #554 from tomcoombs87/master
couple of tiny changes in documentation.
2017-08-06 18:56:38 +02:00
Tom f781262895 Merge pull request #2 from tomcoombs87/patch-3
tiny typo
2017-08-05 22:43:00 +01:00
Tom 4996acb503 Merge pull request #1 from tomcoombs87/patch-2
Patch 2
2017-08-05 22:42:19 +01:00
Tom b881cca1d8 tiny typo 2017-08-05 22:33:16 +01:00
Tom 2b3cd36f98 removed a space to fix broken wiki link 2017-08-05 22:00:33 +01:00
James Allen 4eaa82b059 Merge pull request #553 from tomcoombs87/patch-1
fixed a typo
2017-08-05 21:14:24 +02:00
tomcoombs87 6daf08e9bc fixed a typo 2017-08-05 20:09:55 +01:00
Henry Oswald f880cee1f6 Merge pull request #549 from sharelatex/hof-replace-grunt-init
Replace grunt service initialisation with bash script
2017-08-02 14:00:30 +01:00
Shane Kilkelly 5825a51c44 Update texlive path 2017-08-02 09:45:08 +01:00
Shane Kilkelly 6b384c6fe0 Update the node distro 2017-08-02 08:42:30 +01:00
Hayden Faulds d099c1e1f1 add logging to install-services script 2017-07-31 13:36:37 +01:00
Hayden Faulds 6e91742a8a add postinstall message explaining how to use bin/install-services 2017-07-31 13:36:18 +01:00
Hayden Faulds 6ef2cae504 replace grunt service initialisation with bash script 2017-07-27 15:39:22 +01:00
James Allen 3f963689f9 Create ISSUE_TEMPLATE.md 2017-07-25 14:25:56 +01:00
James Allen 996399cc2e Merge pull request #541 from sharelatex/ja-update-holding-accounts-migration-for-groups
Update migration script for holding accounts to migrate group invites
2017-07-25 12:45:49 +01:00
Shane Kilkelly 32eaa0310d add the driver field to email config 2017-06-21 10:59:19 +01:00
James Allen 7ef02127a1 Update migration script for holding accounts to migrate group invites 2017-06-14 17:03:05 +01:00
Shane Kilkelly b5532802c9 Refactor 2017-05-19 08:32:34 +01:00
Shane Kilkelly c392276b8e Ensure bcrypt gets installed 2017-05-18 13:08:55 +01:00
Shane Kilkelly 2c2b3a8117 Add realtime config and websessions to redis 2017-05-18 10:55:41 +01:00
Shane Kilkelly 9e6b7a1aa1 Update redis configs to accomodate recent changes 2017-05-17 15:29:01 +01:00
Shane Kilkelly 65d21f712e Add migration to enable trackChanges for all users 2017-05-17 14:23:55 +01:00
Shane Kilkelly 1f30aa535f Merge pull request #509 from sharelatex/ja-remove-holding-accounts
Add migration to remove holding accounts
2017-04-05 14:55:49 +01:00
Shane Kilkelly 7a30975728 Add trackchanges.continueOnError as default 2017-04-05 14:48:36 +01:00
James Allen a8557bb139 Don't find holding accounts with a hashed password 2017-03-24 13:46:31 +00:00
James Allen 21b15c8c73 More loggin 2017-03-23 11:56:46 +00:00
James Allen ebb9a6c752 Improve logging 2017-03-23 11:50:46 +00:00
James Allen e1af76f652 Address Henry's comments about robustness 2017-03-23 11:34:45 +00:00
Shane Kilkelly 84ba3c76c7 Pin to sharelatex-base:v1.0.0 2017-02-27 15:46:28 +00:00
Shane Kilkelly fe7ba6d321 Add docHash to key_schema 2017-02-23 09:47:11 +00:00
Shane Kilkelly 6c81aa07fb Set baseDir var 2017-02-22 09:48:34 +00:00
Shane Kilkelly d739373892 Add a makefil 2017-02-22 09:23:01 +00:00
Shane Kilkelly 958ba76463 Update image names 2017-02-22 09:20:07 +00:00
Shane Kilkelly 37e8445e8d split base image from main image 2017-02-21 11:22:25 +00:00
Shane Kilkelly dda1309393 Remove texlive docks 2017-02-21 11:01:52 +00:00
Shane Kilkelly eac77291f5 add sandboxed compiles sibling containers 2017-02-03 14:10:42 +00:00
Shane Kilkelly 6eaef02fa2 Add launchpad to docker build 2017-02-02 14:09:55 +00:00
James Allen 73443f5a65 Add in dry run option for holding account migration and log out removed users 2017-01-30 15:40:31 +01:00
James Allen 05540ca8a7 Add migration to remove holding accounts 2017-01-30 14:36:06 +01:00
Shane Kilkelly df7993e2c6 Add primary=true 2017-01-27 13:28:14 +00:00
Shane Kilkelly 91c85b6cd8 replace spaces with tabs 2017-01-27 09:52:55 +00:00
Shane Kilkelly 76d722d835 Add array wrapper 2017-01-26 13:43:07 +00:00
Shane Kilkelly 36291b47aa Merge branch 'master' of github.com:sharelatex/sharelatex-docker-image 2017-01-26 10:27:40 +00:00
Shane Kilkelly 80eaaf0dfb Add documentupdater config 2017-01-26 10:27:17 +00:00
Shane Kilkelly d5914532e8 Un-pin doc-updater 2017-01-25 15:22:32 +00:00
Shane Kilkelly fa89f55a0a Move web-sharelatex back to master branch. 2017-01-24 10:35:05 +00:00
root 0e2971cac1 add /var/log/sharlatex-errors.log 2017-01-13 11:39:34 -05:00
Shane Kilkelly 21f24615f6 Merge branch 'master' of github.com:sharelatex/sharelatex-docker-image 2017-01-12 13:51:39 +00:00
Shane Kilkelly 1e97636089 Add new SHARELATEX_HEADER_EXTRAS option 2017-01-12 13:51:10 +00:00
Henry Oswald 8c08df2717 remove proxy_set_header X-Forwarded-Proto $scheme for https 2017-01-06 16:02:27 +00:00
Henry Oswald 1bfec242b2 add option to set lang per domain 2017-01-06 11:28:32 +00:00
Henry Oswald d18a63fac4 - added option to set lang code
- removed commeted out learn header code
- increased max pass length to 150
2017-01-04 11:41:38 +00:00
Shane Kilkelly afe9273412 Fix the header-nav links option 2016-12-21 14:57:47 +00:00
Shane Kilkelly d1f4334df1 Move the filtering-out of /register links to web 2016-12-21 13:51:05 +00:00
Shane Kilkelly 2d459d01bf Merge branch 'master' of github.com:sharelatex/sharelatex-docker-image 2016-12-20 10:29:06 +00:00
Shane Kilkelly f4255f93a2 add restrictInvitesToExistingAccounts option 2016-12-20 10:28:54 +00:00
Shane Kilkelly 9abed0f075 Remove cruft. 2016-12-20 10:28:37 +00:00
Henry Oswald 4283bde9c0 chown /var/www/ to www-data 2016-12-19 14:17:39 +00:00
Shane Kilkelly b2221e7efa Fix daft typos 2016-12-09 12:34:08 +00:00
Shane Kilkelly a146cb0282 Add error var 2016-12-09 11:13:20 +00:00
Shane Kilkelly aaf8c833b8 Fix ldap settings 2016-12-09 11:01:01 +00:00
Shane Kilkelly 3093e93d8e Remove the starttls option 2016-12-09 10:40:43 +00:00
Shane Kilkelly 459a325bb5 Update to new ldap config 2016-12-09 09:22:31 +00:00
Shane Kilkelly 776ff2960d Add updateUserDetailsOnLogin options to ldap and saml. 2016-12-02 15:12:57 +00:00
Shane Kilkelly 54afc10461 Add a dummy rollback, clean up. 2016-12-02 14:12:52 +00:00
Shane Kilkelly 45d86c3a43 Merge branch 'master' into sk-user-features 2016-12-02 14:01:46 +00:00
Shane Kilkelly 42d48b7187 Add an update_user_features migration. 2016-12-02 14:01:19 +00:00
Henry Oswald 3a8becbe21 change how grunt splits tasks up which fix broken migrate call 2016-11-23 15:32:44 +00:00
Shane Kilkelly 8922421443 Add options for saml firstName and lastName fields. 2016-11-23 14:13:37 +00:00
Shane Kilkelly 5c40640d06 Add saml emailFieldName option 2016-11-23 10:37:35 +00:00
Henry Oswald 9396b62bdb Merge pull request #493 from hyperdo/patch-1
Update +1 to 👍
2016-11-22 09:34:45 +00:00
Ethan 9c60ebcba3 Update +1 to 👍
Change comment with a +1 to modern github reaction (👍)
2016-11-19 19:02:27 -08:00
Henry Oswald b15dacdd26 Update README.md 2016-11-17 15:42:51 +00:00
Henry Oswald 248d3c5128 Update README.md 2016-11-15 10:29:06 +00:00
Henry Oswald 3dab268e51 Update docker-compose.yml 2016-11-15 10:27:21 +00:00
Henry Oswald fabf9c23cf Update ISSUE_TEMPLATE 2016-11-15 10:19:58 +00:00
Henry Oswald e4a57a84a5 Create ISSUE_TEMPLATE 2016-11-15 10:19:20 +00:00
Shane Kilkelly 4aadcb4b91 Refactor. 2016-11-14 15:46:12 +00:00
Shane Kilkelly dc89ae1f97 Merge branch 'master' of github.com:sharelatex/sharelatex-docker-image 2016-11-14 15:40:27 +00:00
Shane Kilkelly 3f5a41e302 Add saml config options 2016-11-14 15:40:18 +00:00
Henry Oswald 2a6ef976f3 added default features 2016-11-08 22:37:31 +00:00
Shane Kilkelly 68e4df72df check that nav.header is configured 2016-11-04 15:14:33 +00:00
Shane Kilkelly d06b8ec688 Use the ? operator 2016-11-03 16:28:25 +00:00
Henry Oswald c2b3d1b12e Merge branch 'master' of https://github.com/sharelatex/sharelatex 2016-11-03 15:13:41 +00:00
Henry Oswald 9ccc476dd9 should check SHARELATEX_REDIS_HOST not SHARELATEX_REDIS_URL 2016-11-03 15:13:02 +00:00
Henry Oswald 2a1e22f20f remove underscore from settings.coffee 2016-11-03 11:18:34 +00:00
Henry Oswald 59f312fb16 comment out project size for test 2016-11-03 10:59:17 +00:00
Henry Oswald efe0e8f876 don't show register when external auth is used 2016-10-21 15:43:58 +01:00
Henry Oswald 20a2b302b2 Update docker-compose.yml 2016-10-19 12:10:27 +01:00
Henry Oswald 85059077ed added coffeescript and moved admin require to bottom of file 2016-10-19 11:39:40 +01:00
Henry Oswald 6fe58b7900 Merge branch 'master' of https://github.com/sharelatex/sharelatex 2016-10-19 11:32:32 +01:00
Henry Oswald 488e9cb842 log out which version is being checked out 2016-10-19 11:30:10 +01:00
Henry Oswald 4dd905a70c Create ProjectSize.coffee 2016-10-13 15:46:18 +01:00
Henry Oswald 32c123345a added textEncoding for email option 2016-10-13 14:21:33 +01:00
Henry Oswald 912141a7a8 set clsi home to tmp which fixed luatex bug 2016-10-03 16:54:11 +01:00
Henry Oswald 6758ab4ee2 fix comments for user create 2016-09-22 12:45:45 +01:00
Henry Oswald 8ebbffe4ba Update docker-compose.yml 2016-09-22 12:32:25 +01:00
Henry Oswald a3a7bdb890 make errors more clear 2016-09-22 12:30:43 +01:00
ShareLaTeX 1fca735f02 added check db init script 2016-09-21 17:10:27 +00:00
ShareLaTeX e5283e39a5 added contacts runit 2016-09-21 17:09:53 +00:00
ShareLaTeX ad10fda872 added notificaitons service 2016-09-21 17:09:23 +00:00
Henry Oswald 5c42b1bbe3 spell check notifications 2016-09-21 17:54:46 +01:00
Henry Oswald 52f68e2c60 install texcount on default image 2016-09-21 16:59:37 +01:00
Henry Oswald 8cc0549dde Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-09-21 15:24:32 +01:00
Henry Oswald e029c80698 moved run.sh to run 2016-09-21 15:24:07 +01:00
ShareLaTeX 6cfe468a3b move settings file to early on 2016-09-21 12:47:07 +00:00
Henry Oswald 662f113503 throw errors in grunt when checking 2016-09-21 12:43:58 +01:00
Henry Oswald 0f1389a115 added check make back in and list of make grunt tasks 2016-09-21 12:08:11 +01:00
Henry Oswald 9e2b010238 remove helpers we don’t use 2016-09-20 17:08:38 +01:00
Henry Oswald 192b77c573 add checkMongoConnect and checkRedisConnect funcs to grunt 2016-09-20 17:07:52 +01:00
Henry Oswald 5b0a6eb384 remove calls to dirs 2016-08-15 13:39:34 +01:00
Henry Oswald 3e2a41b5a3 added logging 2016-08-05 17:35:46 +01:00
Henry Oswald f8ad9a6415 change command to create and delete users 2016-08-05 15:36:27 +01:00
Henry Oswald 1e7cd0647e added notifications and package for multi config files 2016-08-05 15:35:43 +01:00
ShareLaTeX ec24fc28fc added dollar to base path 2016-08-05 14:22:42 +00:00
Henry Oswald 0c8fc4982c added runit 2016-08-05 15:19:25 +01:00
Henry Oswald 6d7993722c fixed init.d copy 2016-08-05 15:19:25 +01:00
Henry Oswald 7bfa3f97e7 move create-admin-user and delete-user to grunt folder 2016-08-05 13:29:11 +01:00
Henry Oswald a2cb2b68eb Merge branch 'master' of https://github.com/sharelatex/sharelatex 2016-08-05 12:51:53 +01:00
Henry Oswald 51aca345d5 deletd undeeded tasks 2016-08-05 12:51:48 +01:00
ShareLaTeX 7bff700262 Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-08-05 11:05:31 +00:00
ShareLaTeX a6640f1358 added log rotate and locked down docupdater version for moment 2016-08-05 11:05:06 +00:00
Henry Oswald db7f88c834 cleaned up dockerfile more, removing undded things 2016-08-05 11:59:39 +01:00
Henry Oswald 545a8a649f Delete CHANGELOG.md 2016-08-05 11:36:02 +01:00
ShareLaTeX 122921bad6 Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image
Conflicts:
	settings.coffee
2016-08-04 13:20:46 +00:00
ShareLaTeX 3dbe92ce32 cleaned up settings file and added refernces option in 2016-08-04 13:19:33 +00:00
Henry Oswald 10b6f88f3b add logrotate 2016-08-03 16:22:17 +01:00
Henry Oswald 445780aa2c add template links SHARELATEX_NEW_PROJECT_TEMPLATE_LINKS to config file 2016-08-03 16:22:10 +01:00
Henry Oswald bb49809776 add contacts to services.js 2016-08-03 16:21:44 +01:00
Henry Oswald ca37cbaead Merge branch 'master' of https://github.com/sharelatex/sharelatex 2016-07-22 15:54:48 +01:00
Henry Oswald 5d71a5ea40 added contacts to service list 2016-07-22 15:54:31 +01:00
Henry Oswald f0c2723f21 Update docker-compose.yml 2016-07-18 16:11:04 +01:00
Henry Oswald 030e91a365 Update docker-compose.yml 2016-07-18 16:08:33 +01:00
Henry Oswald 1d80ac6b7a added dump folder and template files fix to init script 2016-07-14 16:50:11 +01:00
Henry Oswald eef4982698 add echo for finished migrations in 2016-06-30 16:47:35 +01:00
Henry Oswald d39b66f32e add permissions change for templates dir 2016-06-30 16:47:23 +01:00
Henry Oswald f3c2c11dc8 move install latexmk and path higher up 2016-06-30 16:47:13 +01:00
Henry Oswald f0f083ad5e added example docker compose file 2016-06-30 16:35:26 +01:00
Henry Oswald d95443b432 upgrade east and check for null ids 2016-06-30 14:52:45 +01:00
Henry Oswald 9479ee4cbb added custom footer for email option 2016-06-28 17:08:00 +01:00
Henry Oswald 3e4cc12de4 added learn wiki option and parse helper method 2016-06-28 10:07:50 +01:00
Henry Oswald 2795a04ffa don't try and put properties on email if basic email is not configured 2016-06-27 15:19:43 +01:00
ShareLaTeX f7a79e8c78 Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-06-27 13:52:31 +00:00
Henry Oswald a5b11360d3 added SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH and SHARELATEX_EMAIL_SMTP_IGNORE_TLS 2016-06-27 14:50:46 +01:00
Henry Oswald 10c2665e40 don't call notifications 2016-06-24 14:06:50 +01:00
ShareLaTeX 3c46fbf2e1 touch sqlite file if it does not exist 2016-06-23 22:07:30 +00:00
Henry Oswald 6b1fcb002e Merge branch 'master' of https://github.com/sharelatex/sharelatex 2016-06-23 21:36:07 +01:00
Henry Oswald f49c88a6fc don't clone via branch 2016-06-23 20:47:44 +01:00
Henry Oswald 207e4bd653 checkout the correct version 2016-06-23 17:13:12 +01:00
Henry Oswald 4a66b59c16 set references to undefined so its not used yet 2016-06-23 16:48:05 +01:00
Henry Oswald 06b7eb5b5a set smtp auth to null if not set 2016-06-23 16:47:56 +01:00
Henry Oswald 50ddc4fae3 Merge pull request #416 from heukirne/master
add services file
2016-06-22 20:55:13 +01:00
Henrique Dias 71940dc236 Merge remote-tracking branch 'upstream/master'
Conflicts:
	Gruntfile.coffee
2016-06-22 16:50:53 -03:00
Henry Oswald 701971e28d remove debugging line 2016-06-22 11:56:29 +01:00
Henry Oswald 3cd9b096d3 parse ca paths as json 2016-06-22 11:47:17 +01:00
Henry Oswald cc3c8d1db7 parse left and right footers as json 2016-06-17 13:05:03 +01:00
Henry Oswald 3cb66b24a9 settings.header ! settingsheader 2016-06-17 12:34:38 +01:00
Henry Oswald b24239f468 fix spelling mistake with community 2016-06-15 17:08:48 +01:00
Henry Oswald 27dd97ecc5 remove grunfile and circule.yml file, consolodate in server pro 2016-06-15 17:08:41 +01:00
Henry Oswald 9b6496ff78 Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-06-09 18:30:02 +01:00
Henry Oswald 77933a9abc move left_footer and co to bottom of settings file 2016-06-09 18:29:27 +01:00
Henry Oswald 39aa46fbf8 get rid of config commands 2016-06-09 16:59:57 +01:00
ShareLaTeX c8e170847d Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-06-09 15:52:36 +00:00
Henry Oswald b2a5894929 don't instal config with grunt 2016-06-09 16:43:18 +01:00
Henry Oswald 317b891afe point to texlive 2016 2016-06-09 16:22:27 +01:00
Henry Oswald e8fe3bc924 allow header and footer to be configured via env vars 2016-06-09 16:21:54 +01:00
ShareLaTeX d4fb706ac0 add grunt cut task 2016-06-09 11:36:00 +00:00
Henry Oswald 5d76a3a384 Merge branch 'master' of https://github.com/sharelatex/sharelatex 2016-06-08 17:03:34 +01:00
Henry Oswald 5d46f02254 removed old files no longer used 2016-06-08 17:03:19 +01:00
Henry Oswald 5a61a2618f added realtime to list of repos 2016-06-06 14:25:51 +01:00
Henry Oswald 6189ce9c16 try cicule ci 2016-05-31 16:37:50 +01:00
Henry Oswald d9f50ae348 use SANDBOXED_COMPILES not DOCKER_IN_DOCKER 2016-05-31 15:21:26 +01:00
Henry Oswald 4222a822d7 set synctexBaseDir: () -> "/compile" if using docker in docker 2016-05-31 15:16:31 +01:00
James Allen 2247ee50b9 install qpdf v6 2016-05-31 14:15:24 +00:00
Henry Oswald c0090fcc22 run everything as www-data 2016-05-27 15:46:51 +01:00
Henry Oswald 59ce10e45f one line the apt-get 2016-05-27 13:12:22 +01:00
Henry Oswald c524be6180 run as www-data 2016-05-27 12:55:18 +01:00
Henry Oswald d4891d77f1 put apt-get installs on same line and set $TEX_LIVE_DOCKER_IMAGE via env var 2016-05-27 12:12:28 +01:00
Henry Oswald df0b2bb57b build things that don't change at the start for quicker build time 2016-05-26 11:22:51 +01:00
Henry Oswald 7ee0355ed0 build latex first for faster images and compile clsi synctex 2016-05-26 11:01:21 +01:00
Henry Oswald d71c7c124b Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-05-24 18:15:35 +01:00
Henry Oswald dab6bf74b3 fix templates & clsi set dynamically. and more robust bool vals from env vars 2016-05-24 16:43:08 +01:00
Henry Oswald ed6c08a828 Update README.md 2016-05-24 16:10:07 +01:00
Henry Oswald 25a93b3bf2 Update README.md 2016-05-24 15:48:02 +01:00
Henry Oswald 086bb2310e Update README.md 2016-05-24 15:47:46 +01:00
Henry Oswald 27ea0d2f00 moved guide to official wiki 2016-05-24 15:47:13 +01:00
Henry Oswald 8c1fecbe16 added missing ldap settings 2016-05-24 12:12:26 +01:00
Henry Oswald 80e419788a added strace and time 2016-05-23 14:27:24 +01:00
Henry Oswald 1a478d49db fixed bad coffeescript in settings file 2016-05-23 13:26:45 +01:00
Henry Oswald 576efb8ebf create templates dir 2016-05-23 12:51:49 +01:00
Henry Oswald 4464bf7893 move init scripts to init dir 2016-05-23 12:43:26 +01:00
Henry Oswald 89a1cd267a use dir of versions not version 2016-05-23 12:39:06 +01:00
James Allen 160d952231 ignore api-data 2016-05-23 11:38:09 +00:00
James Allen b92a83ac70 Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-05-23 10:37:58 +00:00
Henry Oswald bc5449e18e add git ignore 2016-05-23 11:37:43 +01:00
Henry Oswald 246496a468 added docker and and templates options for server pro 2016-05-23 11:30:25 +01:00
Henry Oswald c73afcd85c Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-05-23 10:31:43 +01:00
James Allen 4f24a228b5 Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-05-20 16:16:00 +00:00
Henry Oswald c839554030 Merge pull request #43 from heukirne/master
add support for grunt build
2016-05-20 17:15:39 +01:00
Henry Oswald b4ae96facb recommend debian/ubuntu 2016-05-09 16:08:51 +01:00
Henrique Dias 82f0ebb483 Merge branch 'master' of https://github.com/heukirne/sharelatex-docker-image
Conflicts:
	Dockerfile
2016-05-02 23:58:20 +00:00
Henrique Dias 9a5df51ea4 add baseDir for Dockerfile 2016-05-02 23:55:53 +00:00
Henrique Dias f33ea04408 add support for grunt build 2016-05-02 23:53:49 +00:00
Henry Oswald b43a58467c recommend mongodb 3.x 2016-04-28 12:01:30 +01:00
Henrique Santos 4e7cdba865 add services file 2016-04-20 21:57:19 -03:00
Henrique Santos d4331f8415 add support for grunt build 2016-04-20 21:55:47 -03:00
Henry Oswald 4f7a6abbac Merge pull request #41 from vvhof/patch-1
Fix a typo in README.md
2016-04-20 11:55:59 +01:00
Vincent von Hof 72e6fc60da Fix a typo in README.md
nothing here...moving on
2016-04-20 12:54:11 +02:00
Henry Oswald 7d9de6c216 added tls as env vars 2016-04-06 17:10:43 +01:00
Henry Oswald 700e376968 made email and ldap configurable from env vars 2016-04-06 17:07:59 +01:00
James Allen 09624e3796 add session secret as env varx 2016-04-06 15:42:01 +00:00
Henry Oswald 08ea79a29f change localhost to 127.0.0.1 which should help with ipv6 2016-03-08 16:05:42 +00:00
Brian Gough 77037ee988 improve performance for migrating large dochistory collections 2016-02-10 15:09:42 +00:00
Brian Gough 1c24a889fb improve logging and interrupt handling 2016-02-10 15:09:42 +00:00
Henry Oswald eb88347e1d Update README.md 2016-02-09 17:19:48 +00:00
Henry Oswald 9ed593f22c Update README.md 2016-02-09 12:57:05 +00:00
Henry Oswald 14a0b67fc4 Update README.md 2016-02-03 15:13:17 +00:00
Henry Oswald c23ea9f1cf Update README.md 2016-02-03 14:56:11 +00:00
Brian Gough 8cc8148932 include commands to update indexes in docHistory migration - not called 2016-02-01 16:51:43 +00:00
Brian Gough 8a0d5f8b95 migration script for dochistory packing 2016-01-29 16:55:26 +00:00
James Allen c0f3ed1ce0 Merge branch 'master' of https://github.com/sharelatex/sharelatex-docker-image 2016-01-13 15:21:17 +00:00
Henry Oswald 5c74504ce7 set nginx to 50mb limit which is upper side of what ShareLaTeX can handle 2016-01-13 15:10:31 +00:00
Henry Oswald 79f5e671de Merge pull request #28 from mattcollier/patch-1
Correct typo.
2016-01-04 13:11:13 +00:00
mattcollier 1993b4c19e Correct typo. 2015-12-28 16:27:46 -05:00
Henry Oswald dea04f2e25 dropbox is not shown any more, remove appology 2015-12-16 13:05:12 +00:00
Henry Oswald 42e9208b14 Added tip for copying the database when upgrading 2015-12-01 16:17:15 +00:00
James Allen 131450452e added mongodb migrations
added imagemagick
make sure release is up to date
2015-09-17 14:07:50 +00:00
Henry Oswald afb7fd6d16 remove extra logging in migration and change file paths in migration 2 2015-09-16 16:29:26 +01:00
Henry Oswald 6aa2446eea remove process.exit from migrations 2015-09-16 16:26:51 +01:00
Henry Oswald 0980b2e6dc change timeout in migrations-1 to 0ms 2015-09-16 15:58:38 +01:00
Henry Oswald 1e073da1fd bring down migration timeout in delete doc lines to 0ms 2015-09-16 14:44:53 +01:00
Henry Oswald feafbb5416 renamed first migration to move_doc_lines_to_doc_collection 2015-09-16 14:22:54 +01:00
Henry Oswald e3b3b85726 add the migrate task into grunt 2015-09-16 13:41:09 +01:00
Henry Oswald ce10ceb2d9 improved migration script to delete docs 2015-04-16 13:45:16 +01:00
Henry Oswald dae47efa1c Merge branch 'master' of https://github.com/sharelatex/sharelatex 2015-04-14 15:21:20 +01:00
Henry Oswald 5dd40dc7cb added migration 2 to clean up projects, removing the doc lines 2015-04-14 15:21:07 +01:00
James Allen be1cdc0df1 Update to use latest ShareLaTeX release 2015-03-25 16:28:06 +00:00
James Allen 5ea12c3de8 Update CHANGELOG.md 2015-03-20 20:32:07 +00:00
James Allen 16e6777d89 Add missed nginx file 2015-03-20 15:33:36 +00:00
James Allen c96d713310 Remove unused/deprecated package files and put .conf in upstart script names 2015-03-20 15:32:28 +00:00
James Allen 21199de254 Merge pull request #288 from barracks510/master
Update NGINX Configuration
2015-03-20 14:17:04 +00:00
Dennis Chen e631902376 Update NGINX Configuration 2015-03-20 01:31:03 -07:00
Henry Oswald a2a2c23f76 remove whitespace before internal settings and add realtime config to settings.development.coffee.example 2015-03-05 18:06:06 +00:00
Henry Oswald 4a19804aa9 Use nodejs 0.10.x 2015-03-04 22:42:11 +00:00
James Allen 2a03e4822d Don't blow up on missing settings 2015-02-26 12:13:56 +00:00
James Allen edb091bb92 Install unzip in Docker container 2015-02-18 17:08:50 +00:00
James Allen d64ef2eccd Update README.md 2015-02-11 14:34:53 +00:00
James Allen 8b26d251cb Update README.md 2015-02-11 14:34:39 +00:00
James Allen 7bcecf38c1 Update README.md 2015-02-11 13:56:01 +00:00
James Allen e0ce15e10c Update README.md 2015-02-11 13:54:03 +00:00
James Allen c8be8b526c Update to use release version of ShareLaTeX 2015-02-10 16:49:34 +00:00
James Allen d347ee087d Add missing file 2015-02-09 16:27:44 +00:00
James Allen 531f9e84ac Don't rely on --net=host 2015-02-09 16:18:58 +00:00
James Allen c15caa4698 Initial Dockerfile image build 2015-02-06 17:01:50 +00:00
138 changed files with 2309 additions and 4178 deletions
+3
View File
@@ -0,0 +1,3 @@
.DS_Store
.git/
node_modules/
+9
View File
@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
+17
View File
@@ -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"
}
}
+44
View File
@@ -0,0 +1,44 @@
<!--
Note: If you are using www.overleaf.com and have a problem,
or if you would like to request a new feature please contact
the support team at support@overleaf.com
This form should only be used to report bugs in the
Community Edition release of Overleaf.
-->
<!-- BUG REPORT TEMPLATE -->
## Steps to Reproduce
<!-- Describe the steps leading up to when / where you found the bug. -->
<!-- Screenshots may be helpful here. -->
1.
2.
3.
## Expected Behaviour
<!-- What should have happened when you completed the steps above? -->
## Observed Behaviour
<!-- What actually happened when you completed the steps above? -->
<!-- Screenshots may be helpful here. -->
## Context
<!-- How has this issue affected you? What were you trying to accomplish? -->
## Technical Info
<!-- Provide any technical details that may be applicable (or N/A if not applicable). -->
* URL:
* Browser Name and version:
* Operating System and version (desktop or mobile):
* Signed in as:
* Project and/or file:
## Analysis
<!--- Optionally, document investigation of / suggest a fix for the bug, e.g. 'comes from this line / commit' -->
+11
View File
@@ -0,0 +1,11 @@
## Description
<!-- Goal of the pull request -->
## Related issues / Pull Requests
<!-- Fixes #xyz, Contributes to #xyz, Related to #xyz-->
## Contributor Agreement
- [ ] I confirm I have signed the [Contributor License Agreement](https://github.com/overleaf/overleaf/blob/master/CONTRIBUTING.md#contributor-license-agreement)
+17
View File
@@ -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
+4 -2
View File
@@ -1,6 +1,9 @@
/config
config-local
node_modules
node_modules/
api-data
versions/
web
document-updater
@@ -8,7 +11,6 @@ clsi
filestore
track-changes
docstore
tags
chat
spelling
real-time
+1 -1
View File
@@ -1 +1 @@
0.10.26
10.16.0
+8
View File
@@ -0,0 +1,8 @@
{
"arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"useTabs": false
}
-11
View File
@@ -1,11 +0,0 @@
v0.1.2
------
* Re-brand open-source ShareLaTeX code as 'ShareLaTeX Community Edition'.
* The Dropbox and template code has been extracted out into a separate module and removed from the ShareLaTeX Community Edition. There should be no broken features due to lack of open source components now.
* Websockets and real-time data now go to a separate light-weight [real-time](https://github.com/sharelatex/real-time) service.
* Updated PDF viewer that loads page-by-page for much quicker loading times on large documents.
* Links are clickable in chat messages.
* Mathjax libraries are now served locally.
* Optimisation of Angular digest loop in editor should reduce CPU usage in certain cases.
* Numerous small bug fixes.
+10 -22
View File
@@ -4,17 +4,17 @@ 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
---------------------------------
If you'd like a report a bug or open an issue then please:
If you'd like to report a bug or open an issue then please:
1. **Find the correct repository.** ShareLaTeX is split across multiple different repositories, each containing a different service (you can find a list of [all repositories here](https://github.com/sharelatex/sharelatex/blob/master/README.md#other-repositories)). If you know the bug only applies to one service, then please open an issue in that repository. For general bugs and issues that span more than one service, please open an issue in the [sharelatex/sharelatex](https://github.com/sharelatex/sharelatex) repository.
2. **Check if there is an existing issue.** If there is then please add
any more information that you have, or give it a "+1" in the comments.
any more information that you have, or give it a 👍.
When submitting an issue please describe the issue as clearly as possible, including how to
reproduce the bug, which situations it appears in, what you expected to happen, and what actually happens.
@@ -23,41 +23,29 @@ If you can include a screenshot for front end issues that is very helpful.
Pull Requests
-------------
See [our wiki](https://github.com/sharelatex/sharelatex/wiki/Developer-Guidelines)
See [our wiki](https://github.com/sharelatex/sharelatex/wiki)
for how to manage the ShareLaTeX development environment and for our developer guidelines.
We love pull requests, so be bold with them! Don't be afraid of going ahead
and changing something, or adding a new feature. We're very happy to work with you
to get your changes merged into ShareLaTeX.
If you've got an idea for a change then please discuss it in the open first,
either by opening an issue, or by joining us in our
[development chat room](http://www.hipchat.com/g1nJMcj7b).
If you're looking for something to work on, then take a look at our [development roadmap](https://github.com/sharelatex/sharelatex/wiki/Development-Roadmap), or have a look at the open issues in any of the repositories listed [here](https://github.com/sharelatex/sharelatex/blob/master/README.md#other-repositories).
Developer Chat Room
-------------------
If you want to ask any questions in real-time, or get a feel for what's going on
then please drop into our [development chat room](http://www.hipchat.com/g1nJMcj7b).
If no one is online then you can still leave a message that will hopefully get a reply
when we return.
If you're looking for something to work on, have a look at the open issues in any of the repositories listed [here](https://github.com/sharelatex/sharelatex/blob/master/README.md#other-repositories).
Security
--------
Please do not publish security vulnerabilities publicly until we've had a chance
to address them. All security related issues/patches should be sent directly to
team@sharelatex.com where we will attempt to address them quickly. If you're
security@overleaf.com where we will attempt to address them quickly. If you're
unsure whether something is a security issue or not, then please be cautious and
contact us at team@sharelatex.com first.
contact us at security@overleaf.com first.
Contributor License Agreement
-----------------------------
Before we can accept and contributions of code, we need you to agree to our
[Contributor License Agreement](https://sharelatex.wufoo.com/forms/sharelatex-contributor-license-agreement/).
Before we can accept any contributions of code, we need you to agree to our
[Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLSef79XH3mb7yIiMzZw-yALEegS-wyFetvjTiNBfZvf_IHD2KA/viewform?usp=sf_link).
This is to ensure that you own the copyright of your contribution, and that you
agree to give us a license to use it in both the open source version, and the version
of ShareLaTeX running at www.sharelatex.com, which may have additional changes.
of Overleaf running at www.overleaf.com, which may have additional changes.
+86
View File
@@ -0,0 +1,86 @@
# ---------------------------------------------
# Overleaf Community Edition (overleaf/overleaf)
# ---------------------------------------------
ARG SHARELATEX_BASE_TAG=sharelatex/sharelatex-base:latest
FROM $SHARELATEX_BASE_TAG
WORKDIR /var/www/sharelatex
# Add required source files
# -------------------------
ADD ${baseDir}/genScript.js /var/www/sharelatex/genScript.js
ADD ${baseDir}/services.js /var/www/sharelatex/services.js
# Checkout services
# -----------------
RUN node genScript checkout | bash \
\
# Store the revision for each service
# ---------------------------------------------
&& node genScript revisions | bash > /var/www/revisions.txt \
\
# Cleanup the git history
# -------------------
&& node genScript cleanup-git | bash
# Install npm dependencies
# ------------------------
RUN node genScript install | bash
# Compile
# --------------------
RUN node genScript compile | bash
# Links CLSI synctex to its default location
# ------------------------------------------
RUN ln -s /var/www/sharelatex/clsi/bin/synctex /opt/synctex
# Copy runit service startup scripts to its location
# --------------------------------------------------
ADD ${baseDir}/runit /etc/service
# Configure nginx
# ---------------
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
# --------------------------------------------------
COPY ${baseDir}/init_scripts/ /etc/my_init.d/
# Copy app settings files
# -----------------------
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"
ENV OPTIMISE_PDF "true"
EXPOSE 80
WORKDIR /
ENTRYPOINT ["/sbin/my_init"]
+79
View File
@@ -0,0 +1,79 @@
# --------------------------------------------------
# Overleaf Base Image (sharelatex/sharelatex-base)
# --------------------------------------------------
FROM phusion/baseimage:0.11
ENV baseDir .
# Makes sure LuaTex cache is writable
# -----------------------------------
ENV TEXMFVAR=/var/lib/sharelatex/tmp/texmf-var
# Install dependencies
# --------------------
RUN apt-get update \
&& apt-get install -y \
build-essential wget net-tools unzip time imagemagick optipng strace nginx git python zlib1g-dev libpcre3-dev \
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 12
&& curl -sSL https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get install -y nodejs \
\
&& rm -rf \
# We are adding a custom nginx config in the main Dockerfile.
/etc/nginx/nginx.conf \
/etc/nginx/sites-enabled/default \
/var/lib/apt/lists/*
# Add envsubst
# ------------
ADD ./vendor/envsubst /usr/bin/envsubst
RUN chmod +x /usr/bin/envsubst
# Install TexLive
# ---------------
# CTAN mirrors occasionally fail, in that case install TexLive against an
# specific server, for example http://ctan.crest.fr
#
# # docker build \
# --build-arg TEXLIVE_MIRROR=http://ctan.crest.fr/tex-archive/systems/texlive/tlnet \
# -f Dockerfile-base -t sharelatex/sharelatex-base .
ARG TEXLIVE_MIRROR=http://mirror.ctan.org/systems/texlive/tlnet
ENV PATH "${PATH}:/usr/local/texlive/2021/bin/x86_64-linux"
RUN mkdir /install-tl-unx \
&& curl -sSL \
${TEXLIVE_MIRROR}/install-tl-unx.tar.gz \
| tar -xzC /install-tl-unx --strip-components=1 \
\
&& echo "tlpdbopt_autobackup 0" >> /install-tl-unx/texlive.profile \
&& echo "tlpdbopt_install_docfiles 0" >> /install-tl-unx/texlive.profile \
&& echo "tlpdbopt_install_srcfiles 0" >> /install-tl-unx/texlive.profile \
&& echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile \
\
&& /install-tl-unx/install-tl \
-profile /install-tl-unx/texlive.profile \
-repository ${TEXLIVE_MIRROR} \
\
&& tlmgr install --repository ${TEXLIVE_MIRROR} \
latexmk \
texcount \
\
&& rm -rf /install-tl-unx
# Set up sharelatex user and home directory
# -----------------------------------------
RUN adduser --system --group --home /var/www/sharelatex --no-create-home sharelatex && \
mkdir -p /var/lib/sharelatex && \
chown www-data:www-data /var/lib/sharelatex && \
mkdir -p /var/log/sharelatex && \
chown www-data:www-data /var/log/sharelatex && \
mkdir -p /var/lib/sharelatex/data/template_files && \
chown www-data:www-data /var/lib/sharelatex/data/template_files
-549
View File
@@ -1,549 +0,0 @@
fs = require "fs"
spawn = require("child_process").spawn
exec = require("child_process").exec
rimraf = require "rimraf"
Path = require "path"
semver = require "semver"
knox = require "knox"
crypto = require "crypto"
async = require "async"
settings = require("settings-sharelatex")
SERVICES = [{
name: "web"
repo: "https://github.com/sharelatex/web-sharelatex.git"
version: "master"
}, {
name: "real-time"
repo: "https://github.com/sharelatex/real-time-sharelatex.git"
version: "master"
}, {
name: "document-updater"
repo: "https://github.com/sharelatex/document-updater-sharelatex.git"
version: "master"
}, {
name: "clsi"
repo: "https://github.com/sharelatex/clsi-sharelatex.git"
version: "master"
}, {
name: "filestore"
repo: "https://github.com/sharelatex/filestore-sharelatex.git"
version: "master"
}, {
name: "track-changes"
repo: "https://github.com/sharelatex/track-changes-sharelatex.git"
version: "master"
}, {
name: "docstore"
repo: "https://github.com/sharelatex/docstore-sharelatex.git"
version: "master"
}, {
name: "chat"
repo: "https://github.com/sharelatex/chat-sharelatex.git"
version: "master"
}, {
name: "tags"
repo: "https://github.com/sharelatex/tags-sharelatex.git"
version: "master"
}, {
name: "spelling"
repo: "https://github.com/sharelatex/spelling-sharelatex.git"
version: "master"
}]
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-bunyan'
grunt.loadNpmTasks 'grunt-execute'
grunt.loadNpmTasks 'grunt-available-tasks'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-shell"
execute = {}
for service in SERVICES
execute[service.name] =
src: "#{service.name}/app.js"
grunt.initConfig
execute: execute
concurrent:
all:
tasks: ("run:#{service.name}" for service in SERVICES)
options:
limit: SERVICES.length
logConcurrentOutput: true
coffee:
migrate:
expand: true,
flatten: false,
cwd: './',
src: ['./migrations/*.coffee'],
dest: './',
ext: '.js'
options:
bare:true
shell:
migrate:
command: "./node_modules/east/bin/east migrate --adapter east-mongo --url #{settings.mongo.url}"
availabletasks:
tasks:
options:
filter: 'exclude',
tasks: [
'concurrent'
'execute'
'bunyan'
'availabletasks'
]
groups:
"Run tasks": [
"run"
"run:all"
"default"
].concat ("run:#{service.name}" for service in SERVICES)
"Misc": [
"help"
]
"Install tasks": ("install:#{service.name}" for service in SERVICES).concat(["install:all", "install", "install:dirs", "install:config"])
"Update tasks": ("update:#{service.name}" for service in SERVICES).concat(["update:all", "update"])
"Config tasks": ["install:config"]
"Checks": ["check", "check:redis", "check:latexmk", "check:s3", "check:make"]
for service in SERVICES
do (service) ->
grunt.registerTask "install:#{service.name}", "Download and set up the #{service.name} service", () ->
done = @async()
Helpers.installService(service, done)
grunt.registerTask "update:#{service.name}", "Checkout and update the #{service.name} service", () ->
done = @async()
Helpers.updateService(service, done)
grunt.registerTask "run:#{service.name}", "Run the ShareLaTeX #{service.name} service", ["bunyan", "execute:#{service.name}"]
grunt.registerTask "release:#{service.name}", "Create a new release version of #{service.name} (specify with --release option)", () ->
done = @async()
Helpers.createNewRelease(service, grunt.option("release"), done)
grunt.registerTask 'install:config', "Copy the example config into the real config", () ->
Helpers.installConfig @async()
grunt.registerTask 'install:dirs', "Copy the example config into the real config", () ->
Helpers.createDataDirs @async()
grunt.registerTask 'install:all', "Download and set up all ShareLaTeX services",
["check:make"].concat(
("install:#{service.name}" for service in SERVICES)
).concat(["install:config", "install:dirs"])
grunt.registerTask 'install', 'install:all'
grunt.registerTask 'update:all', "Checkout and update all ShareLaTeX services",
["check:make"].concat(
("update:#{service.name}" for service in SERVICES)
)
grunt.registerTask 'update', 'update:all'
grunt.registerTask 'run', "Run all of the sharelatex processes", ['concurrent:all']
grunt.registerTask 'run:all', 'run'
grunt.registerTask 'help', 'Display this help list', 'availabletasks'
grunt.registerTask 'default', 'run'
grunt.registerTask "check:redis", "Check that redis is installed and running", () ->
Helpers.checkRedis @async()
grunt.registerTask "check:latexmk", "Check that latexmk is installed", () ->
Helpers.checkLatexmk @async()
grunt.registerTask "check:s3", "Check that Amazon S3 credentials are configured", () ->
Helpers.checkS3 @async()
grunt.registerTask "check:fs", "Check that local filesystem options are configured", () ->
Helpers.checkFS @async()
grunt.registerTask "check:aspell", "Check that aspell is installed", () ->
Helpers.checkAspell @async()
grunt.registerTask "check:make", "Check that make is installed", () ->
Helpers.checkMake @async()
grunt.registerTask "check", "Check that you have the required dependencies installed", ["check:redis", "check:latexmk", "check:s3", "check:fs", "check:aspell"]
grunt.registerTask "build:deb", "Build an installable .deb file from the current directory", () ->
Helpers.buildDeb @async()
grunt.registerTask "build:upstart_scripts", "Create upstart scripts for each service", () ->
Helpers.buildUpstartScripts()
#grunt.registerTask 'migrate', "compile migrations and run them", ['coffee:migrate', 'shell:migrate']
Helpers =
installService: (service, callback = (error) ->) ->
Helpers.cloneGitRepo service, (error) ->
return callback(error) if error?
Helpers.installNpmModules service, (error) ->
return callback(error) if error?
Helpers.rebuildNpmModules service, (error) ->
return callback(error) if error?
Helpers.runGruntInstall service, (error) ->
return callback(error) if error?
callback()
updateService: (service, callback = (error) ->) ->
Helpers.updateGitRepo service, (error) ->
return callback(error) if error?
Helpers.installNpmModules service, (error) ->
return callback(error) if error?
Helpers.rebuildNpmModules service, (error) ->
return callback(error) if error?
Helpers.runGruntInstall service, (error) ->
return callback(error) if error?
callback()
cloneGitRepo: (service, callback = (error) ->) ->
repo_src = service.repo
dir = service.name
if !fs.existsSync(dir)
proc = spawn "git", [
"clone",
"-b", service.version,
repo_src,
dir
], stdio: "inherit"
proc.on "close", () ->
callback()
else
console.log "#{dir} already installed, skipping."
callback()
updateGitRepo: (service, callback = (error) ->) ->
dir = service.name
proc = spawn "git", ["checkout", service.version], cwd: dir, stdio: "inherit"
proc.on "close", () ->
proc = spawn "git", ["pull"], cwd: dir, stdio: "inherit"
proc.on "close", () ->
callback()
createNewRelease: (service, version, callback = (error) ->) ->
dir = service.name
proc = spawn "sed", [
"-i", "",
"s/\"version\".*$/\"version\": \"#{version}\",/g",
"package.json"
], cwd: dir, stdio: "inherit"
proc.on "close", () ->
proc = spawn "git", ["commit", "-a", "-m", "Release version #{version}"], cwd: dir, stdio: "inherit"
proc.on "close", () ->
proc = spawn "git", ["tag", "v#{version}"], cwd: dir, stdio: "inherit"
proc.on "close", () ->
proc = spawn "git", ["push"], cwd: dir, stdio: "inherit"
proc.on "close", () ->
proc = spawn "git", ["push", "--tags"], cwd: dir, stdio: "inherit"
proc.on "close", () ->
callback()
installNpmModules: (service, callback = (error) ->) ->
dir = service.name
proc = spawn "npm", ["install"], stdio: "inherit", cwd: dir
proc.on "close", () ->
callback()
# work around for https://github.com/npm/npm/issues/5400
# where binary modules are not built due to bug in npm
rebuildNpmModules: (service, callback = (error) ->) ->
dir = service.name
proc = spawn "npm", ["rebuild"], stdio: "inherit", cwd: dir
proc.on "close", () ->
callback()
createDataDirs: (callback = (error) ->) ->
DIRS = [
"tmp/dumpFolder"
"tmp/uploads"
"data/user_files"
"data/compiles"
"data/cache"
]
jobs = []
for dir in DIRS
do (dir) ->
jobs.push (callback) ->
path = Path.join(__dirname, dir)
grunt.log.writeln "Ensuring '#{path}' exists"
exec "mkdir -p #{path}", callback
async.series jobs, callback
installConfig: (callback = (error) ->) ->
src = "config/settings.development.coffee.example"
dest = "config/settings.development.coffee"
if !fs.existsSync(dest)
grunt.log.writeln "Creating config at #{dest}"
config = fs.readFileSync(src).toString()
config = config.replace /CRYPTO_RANDOM/g, () ->
crypto.randomBytes(64).toString("hex")
fs.writeFileSync dest, config
callback()
else
grunt.log.writeln "Config file already exists. Skipping."
callback()
runGruntInstall: (service, callback = (error) ->) ->
dir = service.name
proc = spawn "grunt", ["install"], stdio: "inherit", cwd: dir
proc.on "close", () ->
callback()
checkRedis: (callback = (error) ->) ->
grunt.log.write "Checking Redis is running... "
exec "redis-cli info", (error, stdout, stderr) ->
if error? and error.message.match("Could not connect")
grunt.log.error "FAIL. Redis is not running"
return callback(error)
else if error?
return callback(error)
else
m = stdout.match(/redis_version:(.*)/)
if !m?
grunt.log.error "FAIL."
grunt.log.error "Unknown redis version"
error = new Error("Unknown redis version")
else
version = m[1]
if semver.gte(version, "2.6.12")
grunt.log.writeln "OK."
grunt.log.writeln "Running Redis version #{version}"
else
grunt.log.error "FAIL."
grunt.log.error "Redis version is too old (#{version}). Must be 2.6.12 or greater."
error = new Error("Redis version is too old (#{version}). Must be 2.6.12 or greater.")
callback(error)
checkLatexmk: (callback = (error) ->) ->
grunt.log.write "Checking latexmk is installed... "
exec "latexmk --version", (error, stdout, stderr) ->
if error? and error.message.match("not found")
grunt.log.error "FAIL."
grunt.log.errorlns """
Either latexmk is not installed or is not in your PATH.
latexmk comes with TexLive 2013, and must be a version from 2013 or later.
If you have already have TeXLive installed, then make sure it is
included in your PATH (example for 64-bit linux):
export PATH=$PATH:/usr/local/texlive/2014/bin/x86_64-linux/
This is a not a fatal error, but compiling will not work without latexmk.
"""
return callback(error)
else if error?
return callback(error)
else
m = stdout.match(/Version (.*)/)
if !m?
grunt.log.error "FAIL."
grunt.log.error "Unknown latexmk version"
error = new Error("Unknown latexmk version")
else
version = m[1]
if semver.gte(version + ".0", "4.39.0")
grunt.log.writeln "OK."
grunt.log.writeln "Running latexmk version #{version}"
else
grunt.log.error "FAIL."
grunt.log.errorlns """
latexmk version is too old (#{version}). Must be 4.39 or greater.
This is a not a fatal error, but compiling will not work without latexmk
"""
error = new Error("latexmk is too old")
callback(error)
checkAspell: (callback = (error) ->) ->
grunt.log.write "Checking aspell is installed... "
exec "aspell dump dicts", (error, stdout, stderr) ->
if error? and error.message.match("not found")
grunt.log.error "FAIL."
grunt.log.errorlns """
Either aspell is not installed or is not in your PATH.
On Ubuntu you can install aspell with:
sudo apt-get install aspell
Or on a mac:
brew install aspell
This is not a fatal error, but the spell-checker will not work without aspell
"""
return callback(error)
else if error?
return callback(error)
else
grunt.log.writeln "OK."
grunt.log.writeln "The following spell check dictionaries are available:"
grunt.log.write stdout
callback()
callback(error)
checkS3: (callback = (error) ->) ->
Settings = require "settings-sharelatex"
if Settings.filestore.backend==""
grunt.log.writeln "No backend specified. Assuming Amazon S3"
Settings.filestore.backend = "s3"
if Settings.filestore.backend=="s3"
grunt.log.write "Checking S3 credentials... "
try
client = knox.createClient({
key: Settings.filestore.s3.key
secret: Settings.filestore.s3.secret
bucket: Settings.filestore.stores.user_files
})
catch e
grunt.log.error "FAIL."
grunt.log.errorlns """
Please configure your Amazon S3 credentials in config/settings.development.coffee
Amazon S3 (Simple Storage Service) is a cloud storage service provided by
Amazon. ShareLaTeX uses S3 for storing binary files like images. You can
sign up for an account and find out more at:
http://aws.amazon.com/s3/
"""
return callback()
client.getFile "does-not-exist", (error, response) ->
unless response? and response.statusCode == 404
grunt.log.error "FAIL."
grunt.log.errorlns """
Could not connect to Amazon S3. Please check your credentials.
"""
else
grunt.log.writeln "OK."
callback()
else
grunt.log.writeln "Filestore other than S3 configured. Not checking S3."
callback()
checkFS: (callback = (error) ->) ->
Settings = require "settings-sharelatex"
if Settings.filestore.backend=="fs"
grunt.log.write "Checking FS configuration... "
fs = require("fs")
fs.exists Settings.filestore.stores.user_files, (exists) ->
if exists
grunt.log.writeln "OK."
else
grunt.log.error "FAIL."
grunt.log.errorlns """
Could not find directory "#{Settings.filestore.stores.user_files}".
Please check your configuration.
"""
callback()
else
grunt.log.writeln "Filestore other than FS configured. Not checking FS."
callback()
checkMake: (callback = (error) ->) ->
grunt.log.write "Checking make is installed... "
exec "make --version", (error, stdout, stderr) ->
if error? and error.message.match("not found")
grunt.log.error "FAIL."
grunt.log.errorlns """
Either make is not installed or is not in your path.
On Ubuntu you can install make with:
sudo apt-get install build-essential
"""
return callback(error)
else if error?
return callback(error)
else
grunt.log.write "OK."
return callback()
buildUpstartScripts: () ->
template = fs.readFileSync("package/upstart/sharelatex-template").toString()
for service in SERVICES
fs.writeFileSync "package/upstart/sharelatex-#{service.name}", template.replace(/__SERVICE__/g, service.name)
buildPackageSettingsFile: () ->
config = fs.readFileSync("config/settings.development.coffee.example").toString()
config = config.replace /DATA_DIR.*/, "DATA_DIR = '/var/lib/sharelatex/data'"
config = config.replace /TMP_DIR.*/, "TMP_DIR = '/var/lib/sharelatex/tmp'"
fs.writeFileSync "package/config/settings.coffee", config
buildDeb: (callback = (error) ->) ->
command = ["-s", "dir", "-t", "deb", "-n", "sharelatex", "-v", "0.0.1", "--verbose"]
command.push(
"--maintainer", "ShareLaTeX <team@sharelatex.com>"
"--config-files", "/etc/sharelatex/settings.coffee"
"--config-files", "/etc/nginx/conf.d/sharelatex.conf"
"--directories", "/var/lib/sharelatex"
"--directories", "/var/log/sharelatex"
)
command.push(
"--depends", "redis-server > 2.6.12"
"--depends", "mongodb-org > 2.4.0"
"--depends", "nodejs > 0.10.0"
)
@buildPackageSettingsFile()
@buildUpstartScripts()
for service in SERVICES
command.push(
"--deb-upstart", "package/upstart/sharelatex-#{service.name}"
)
after_install_script = """
#!/bin/sh
# Create random secret keys (twice, once for http auth pass, once for cookie secret).
sed -i "0,/CRYPTO_RANDOM/s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
sed -i "0,/CRYPTO_RANDOM/s/CRYPTO_RANDOM/$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 64 | head -n 1)/" /etc/sharelatex/settings.coffee
sudo adduser --system --group --home /var/www/sharelatex --no-create-home sharelatex
mkdir -p /var/log/sharelatex
chown sharelatex:sharelatex /var/log/sharelatex
mkdir -p /var/lib/sharelatex
"""
for dir in ["data/user_files", "tmp/uploads", "data/compiles", "data/cache", "tmp/dumpFolder"]
after_install_script += """
mkdir -p /var/lib/sharelatex/#{dir}
"""
after_install_script += """
chown -R sharelatex:sharelatex /var/lib/sharelatex
"""
for service in SERVICES
after_install_script += "service sharelatex-#{service.name} restart\n"
fs.writeFileSync "package/scripts/after_install.sh", after_install_script
command.push("--after-install", "package/scripts/after_install.sh")
command.push("--exclude", "**/.git")
command.push("--exclude", "**/node_modules/grunt-*")
for path in ["filestore/user_files", "filestore/uploads", "clsi/cache", "clsi/compiles"]
command.push "--exclude", path
for service in SERVICES
command.push "#{service.name}=/var/www/sharelatex/"
command.push(
"package/config/settings.coffee=/etc/sharelatex/settings.coffee"
"package/nginx/sharelatex=/etc/nginx/conf.d/sharelatex.conf"
)
console.log "fpm " + command.join(" ")
proc = spawn "fpm", command, stdio: "inherit"
proc.on "close", (code) ->
if code != 0
callback(new Error("exit code: #{code}"))
else
callback()
+4
View File
@@ -0,0 +1,4 @@
Please tell us the following when opening an issue
- Official Docker version being run:
- URL to appropriate logs:
+22
View File
@@ -0,0 +1,22 @@
(If you have a feature request, or bug with ShareLaTeX, please file an issue at https://github.com/sharelatex/web-sharelatex. This repository should **only be used for installation and maintenance problems** of ShareLaTeX Community Edition)
## Problem
Please describe the problem you are facing
## Install type
Are you using the Docker image (as described at https://github.com/sharelatex/sharelatex/wiki/Quick-Start-Guide), or some other method of installing ShareLaTeX Community Edition?
## Version
Which version of the docker image are you using?
## Logs and errors
Please include any logs and error messages.
## Screenshots
Please provide any screenshots of errors in ShareLaTeX Community Edition.
+16
View File
@@ -0,0 +1,16 @@
# Makefile
SHARELATEX_BASE_TAG := sharelatex/sharelatex-base
SHARELATEX_TAG := sharelatex/sharelatex
SHARELATEX_BASE_CACHE := $(shell echo $(SHARELATEX_BASE_TAG) | sed -E 's/(.+):.+/\1:latest/')
build-base:
docker pull $(SHARELATEX_BASE_CACHE)
docker build -f Dockerfile-base --pull --cache-from $(SHARELATEX_BASE_CACHE) -t $(SHARELATEX_BASE_TAG) .
build-community:
docker build --build-arg SHARELATEX_BASE_TAG=$(SHARELATEX_BASE_TAG) -f Dockerfile -t $(SHARELATEX_TAG) .
PHONY: build-base build-community
+75 -91
View File
@@ -1,109 +1,93 @@
ShareLaTeX
==========
<h1 align="center">
<br>
<a href="https://www.overleaf.com"><img src="doc/logo.png" alt="Overleaf" width="300"></a>
</h1>
[ShareLaTeX](https://www.sharelatex.com) is an open-source online real-time collaborative LaTeX editor. We run a hosted version at http://www.sharelatex.com, but you can also run your own local version, and contribute to the development of ShareLaTeX.
<h4 align="center">An open-source online real-time collaborative LaTeX editor.</h4>
*[If you want help installing and maintaining ShareLaTeX at your university or workplace, we offer an officially supported version called ShareLaTeX Server Pro. It also comes with extra security and admin features. Click here to find out more!](https://www.sharelatex.com/university/onsite.html)*
<p align="center">
<a href="#key-features">Key Features</a> •
<a href="https://github.com/overleaf/overleaf/wiki">Wiki</a> •
<a href="https://www.overleaf.com/for/enterprises">Server Pro</a> •
<a href="#contributing">Contributing</a> •
<a href="https://mailchi.mp/overleaf.com/community-edition-and-server-pro">Mailing List</a> •
<a href="#authors">Authors</a> •
<a href="#license">License</a>
</p>
Installation
------------
<a href="https://www.overleaf.com"><img src="doc/screenshot.png" alt="Overleaf" ></a>
<p align="center">
Figure 1: A screenshot of Overleaf Server Pro's comments and tracked changes features.
</p>
## Key Features
[Overleaf](https://www.overleaf.com) is an open-source online real-time collaborative LaTeX editor. We run a hosted version at [www.overleaf.com](https://www.overleaf.com), but you can also run your own local version, and contribute to the development of Overleaf.
*[If you want help installing and maintaining Overleaf in your lab or workplace, we offer an officially supported version called Overleaf Server Pro. It also comes with extra security and admin features. Click here to find out more!](https://www.overleaf.com/for/enterprises)*
## Keeping up to date
Sign up to the [mailing list](https://mailchi.mp/overleaf.com/community-edition-and-server-pro) to get updates on Overleaf Releases and development
## Installation
We have detailed installation instructions in our wiki:
* [Installing ShareLaTeX in Production](https://github.com/sharelatex/sharelatex/wiki/Production-Installation-Instructions)
* [Setting up a ShareLaTeX Development Environment](https://github.com/sharelatex/sharelatex/wiki/Setting-up-a-Development-Environment)
* [Overleaf Quick Start Guide](https://github.com/overleaf/overleaf/wiki/Quick-Start-Guide)
**If you have any problems, have a look at our page of [Frequent Problems and Questions](https://github.com/sharelatex/sharelatex/wiki/FAQ).**
## Upgrading
Upgrading
---------
If you are upgrading from a previous version of Overleaf, please see the [Release Notes section on the Wiki](https://github.com/overleaf/overleaf/wiki/Home) for all of the versions between your current version and the version you are upgrading to.
If you are upgrading from a previous version of ShareLaTeX, please see the [Release Notes section on the Wiki] (https://github.com/sharelatex/sharelatex/wiki/Home) for all of the versions between your current version and the version you are upgrading to.
## Other repositories
This repository does not contain any code. It acts a wrapper and toolkit for managing the many different Overleaf services. These each run as their own Node.js process and have their own GitHub repository.
| Service | Description |
| ------- | ----------- |
| **[web](https://github.com/overleaf/web)** | The front facing web server that serves all the HTML pages, CSS and JavaScript to the client. Also contains a lot of logic around creating and editing projects, and account management. |
| **[document-updater](https://github.com/overleaf/document-updater)** | Processes updates that come in from the editor when users modify documents. Ensures that the updates are applied in the right order, and that only one operation is modifying the document at a time. Also caches the documents in redis for very fast but persistent modifications. |
| **[CLSI](https://github.com/overleaf/clsi)** | The Common LaTeX Service Interface (CLSI) which provides an API for compiling LaTeX documents. |
| **[docstore](https://github.com/overleaf/docstore)** | An API for performing CRUD (Create, Read, Update and Delete) operations on text files stored in Overleaf. |
| **[real-time](https://github.com/overleaf/real-time)** | The websocket process clients connect to. |
| **[filestore](https://github.com/overleaf/filestore)** | An API for performing CRUD (Create, Read, Update and Delete) operations on binary files (like images) stored in Overleaf. |
| **[track-changes](https://github.com/overleaf/track-changes)** | An API for compressing and storing the updates applied to a document, and then rendering a diff of the changes between any two time points. |
| **[chat](https://github.com/overleaf/chat)** | The backend API for storing and fetching chat messages. |
| **[spelling](https://github.com/overleaf/spelling)** | An API for running server-side spelling checking on Overleaf documents. |
## Overleaf Docker Image
This repo contains two dockerfiles, `Dockerfile-base`, which builds the
`sharelatex/sharelatex-base` image, and `Dockerfile` which builds the
`sharelatex/sharelatex` (or "community") image.
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/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.
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 Overleaf services. Baseimage uses the `runit` service
manager to manage services, and we add our init-scripts from the `./runit`
folder.
Dependencies
------------
## Contributing
ShareLaTeX should run on OS X and Linux. You need:
Please see the [CONTRIBUTING](https://github.com/overleaf/overleaf/blob/master/CONTRIBUTING.md) file for information on contributing to the development of Overleaf. See [our wiki](https://github.com/overleaf/overleaf/wiki/Developer-Guidelines) for information on setting up a development environment and how to recompile and run Overleaf after modifications.
* [Node.js](http://nodejs.org/) 0.10 or greater. We recommend that you use [nvm](https://github.com/creationix/nvm) to install it.
* The [grunt](http://gruntjs.com/) command line tools (Run `npm install -g grunt-cli` to install them)
* A local instance of [Redis](http://redis.io/topics/quickstart) (version 2.6.12 or later) and [MongoDB](http://docs.mongodb.org/manual/installation/) running on their standard ports.
* [TeXLive](https://www.tug.org/texlive/) 2013 or later with the `latexmk` program installed.
## Authors
ShareLaTeX needs a minimum of 2gb of memory, it is likely to be more than that though depending on usage.
[The Overleaf Team](https://www.overleaf.com/about)
Other repositories
------------------
This repository does not contain any code. It acts a wrapper and toolkit for managing the many different ShareLaTeX services. These each run as their own Node.js process and have their own Github repository. These are all downloaded and set up when you run `grunt install`
The different services are:
### [web](https://github.com/sharelatex/web-sharelatex) [![Build Status](https://travis-ci.org/sharelatex/web-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/web-sharelatex)
The front facing web server that serves all the HTML pages, CSS and JavaScript
to the client. Also contains a lot of logic around creating and editing
projects, and account management.
### [document-updater](https://github.com/sharelatex/document-updater-sharelatex) [![Build Status](https://travis-ci.org/sharelatex/document-updater-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/document-updater-sharelatex)
Processes updates that come in from the editor when users modify documents. Ensures that
the updates are applied in the right order, and that only one operation is modifying
the document at a time. Also caches the documents in redis for very fast but persistent
modifications.
### [CLSI](https://github.com/sharelatex/clsi-sharelatex) [![Build Status](https://travis-ci.org/sharelatex/clsi-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/clsi-sharelatex)
The Common LaTeX Service Interface (CLSI) which provides an API for compiling LaTeX
documents.
### [docstore](https://github.com/sharelatex/docstore-sharelatex) [![Build Status](https://travis-ci.org/sharelatex/docstore-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/docstore-sharelatex)
An API for performing CRUD (Create, Read, Update and Delete) operations on text files
stored in ShareLaTeX.
### [filestore](https://github.com/sharelatex/filestore-sharelatex) [![Build Status](https://travis-ci.org/sharelatex/filestore-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/filestore-sharelatex)
An API for performing CRUD (Create, Read, Update and Delete) operations on binary files
(like images) stored in ShareLaTeX.
### [track-changes](https://github.com/sharelatex/track-changes-sharelatex) [![Build Status](https://travis-ci.org/sharelatex/track-changes-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/track-changes-sharelatex)
An API for compressing and storing the updates applied to a document, and then rendering a diff of the changes
between any two time points.
### [chat](https://github.com/sharelatex/chat-sharelatex) [![Build Status](https://travis-ci.org/sharelatex/chat-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/chat-sharelatex)
The backend API for storing and fetching chat messages.
### [tags](https://github.com/sharelatex/tags-sharelatex) [![Build Status](https://travis-ci.org/sharelatex/tags-sharelatex.png?branch=master)](https://travis-ci.org/sharelatex/tags-sharelatex)
The backend API for managing project tags (folders).
### [spelling](https://github.com/sharelatex/spelling-sharelatex)
An API for running server-side spelling checking on ShareLaTeX documents.
Dropbox
-------
Please note that certain features like Dropbox integration are not functional in the open source code base yet, despite appearing in the user interface. We're working on this, sorry!
Contributing
------------
Please see the [CONTRIBUTING](https://github.com/sharelatex/sharelatex/blob/master/CONTRIBUTING.md) file for information on contributing to the development of ShareLaTeX. See [our wiki](https://github.com/sharelatex/sharelatex/wiki/Developer-Guidelines) for information on setting up a development environment and how to recompile and run ShareLaTeX after modifications.
Authors
---
- [Henry Oswald](http://twitter.com/henryoswald)
- [James Allen](http://twitter.com/thejpallen)
License
----
## License
The code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the `LICENSE` file.
Copyright (c) ShareLaTeX, 2014.
Copyright (c) Overleaf, 2014-2019.
Vendored
-55
View File
@@ -1,55 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu-12.04"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.network :forwarded_port, guest: 80, host: 8080
config.ssh.forward_agent = true
config.vm.provider "virtualbox" do |v|
v.memory = 1024
end
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "chef/cookbooks"
chef.add_recipe 'apt'
chef.add_recipe 'redis-server'
chef.add_recipe 'mongodb'
chef.add_recipe 'nodejs'
chef.add_recipe 'texlive'
chef.add_recipe 'packages'
# You may also specify custom JSON attributes:
chef.json = {}
end
# Enable provisioning with chef server, specifying the chef server URL,
# and the path to the validation key (relative to this Vagrantfile).
#
# The Opscode Platform uses HTTPS. Substitute your organization for
# ORGNAME in the URL and validation key.
#
# If you have your own Chef Server, use the appropriate URL, which may be
# HTTP instead of HTTPS depending on your configuration. Also change the
# validation key to validation.pem.
#
# config.vm.provision :chef_client do |chef|
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
# chef.validation_key_path = "ORGNAME-validator.pem"
# end
#
# If you're using the Opscode platform, your validator client is
# ORGNAME-validator, replacing ORGNAME with your organization name.
#
# If you have your own Chef Server, the default validation client name is
# chef-validator, unless you changed the configuration.
#
# chef.validation_client_name = "ORGNAME-validator"
end
Executable
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# Thin wrapper on old grunt tasks to ease migrating.
set -e
TASK="$1"
shift 1
cd /var/www/sharelatex/web/modules/server-ce-scripts/scripts
case "$TASK" in
user:create-admin)
node create-user --admin "$@"
;;
user:delete)
node delete-user "$@"
;;
check:mongo)
node check-mongodb
;;
check:redis)
node check-redis
;;
*)
echo "Unknown task $TASK"
exit 1
;;
esac
View File
-3
View File
@@ -1,3 +0,0 @@
current_dir = File.dirname(__FILE__)
cookbook_path ["#{current_dir}/../cookbooks"]
-173
View File
@@ -1,173 +0,0 @@
apt Cookbook CHANGELOG
======================
This file is used to list changes made in each version of the apt cookbook.
v2.3.8 (2014-02-14)
-------------------
### Bug
- **[COOK-4287](https://tickets.opscode.com/browse/COOK-4287)** - Cleanup the Kitchen
v2.3.6
------
* [COOK-4154] - Add chefspec matchers.rb file to apt cookbook
* [COOK-4102] - Only index created repository
v2.3.6
------
* [COOK-4154] - Add chefspec matchers.rb file to apt cookbook
* [COOK-4102] - Only index created repository
v2.3.4
------
No change. Version bump for toolchain sanity
v2.3.2
------
- [COOK-3905] apt-get-update-periodic: configuration for the update period
- Updating style for rubocops
- Updating test-kitchen harness
v2.3.0
------
### Bug
- **[COOK-3812](https://tickets.opscode.com/browse/COOK-3812)** - Add a way to bypass the apt existence check
### Improvement
- **[COOK-3567](https://tickets.opscode.com/browse/COOK-3567)** - Allow users to bypass apt-cache via attributes
v2.2.1
------
### Improvement
- **[COOK-664](https://tickets.opscode.com/browse/COOK-664)** - Check platform before running apt-specific commands
v2.2.0
------
### Bug
- **[COOK-3707](https://tickets.opscode.com/browse/COOK-3707)** - multiple nics confuse apt::cacher-client
v2.1.2
------
### Improvement
- **[COOK-3551](https://tickets.opscode.com/browse/COOK-3551)** - Allow user to set up a trusted APT repository
v2.1.1
------
### Bug
- **[COOK-1856](https://tickets.opscode.com/browse/COOK-1856)** - Match GPG keys without case sensitivity
v2.1.0
------
- [COOK-3426]: cacher-ng fails with restrict_environment set to true
- [COOK-2859]: cacher-client executes out of order
- [COOK-3052]: Long GPG keys are downloaded on every run
- [COOK-1856]: apt cookbook should match keys without case sensitivity
- [COOK-3255]: Attribute name incorrect in README
- [COOK-3225]: Call use_inline_resources only if defined
- [COOK-3386]: Cache dir for apt-cacher-ng
- [COOK-3291]: apt_repository: enable usage of a keyserver on port 80
- Greatly expanded test coverage with ChefSpec and Test-Kitchen
v2.0.0
------
### Bug
- [COOK-2258]: apt: LWRP results in error under why-run mode in apt 1.9.0 cookbook
v1.10.0
-------
### Improvement
- [COOK-2885]: Improvements for apt cache server search
### Bug
- [COOK-2441]: Apt recipe broken in new chef version
- [COOK-2660]: Create Debian 6.0 "squeeze" specific template for
apt-cacher-ng
v1.9.2
------
- [COOK-2631] - Create Ubuntu 10.04 specific template for apt-cacher-ng
v1.9.0
------
- [COOK-2185] - Proxy for apt-key
- [COOK-2338] - Support pinning by glob() or regexp
v1.8.4
------
- [COOK-2171] - Update README to clarify required Chef version: 10.18.0
or higher.
v1.8.2
------
- [COOK-2112] - need [] around "arch" in sources.list entries
- [COOK-2171] - fixes a regression in the notification
v1.8.0
------
- [COOK-2143] - Allow for a custom cacher-ng port
- [COOK-2171] - On `apt_repository.run_action(:add)` the source file
is not created.
- [COOK-2184] - apt::cacher-ng, use `cacher_port` attribute in
acng.conf
v1.7.0
------
- [COOK-2082] - add "arch" parameter to apt_repository LWRP
v1.6.0
------
- [COOK-1893] - `apt_preference` use "`package_name`" resource instead of "name"
- [COOK-1894] - change filename for sources.list.d files
- [COOK-1914] - Wrong dir permissions for /etc/apt/preferences.d/
- [COOK-1942] - README.md has wrong name for the keyserver attribute
- [COOK-2019] - create 01proxy before any other apt-get updates get executed
v1.5.2
------
- [COOK-1682] - use template instead of file resource in apt::cacher-client
- [COOK-1875] - cacher-client should be Environment-aware
V1.5.0
------
- [COOK-1500] - Avoid triggering apt-get update
- [COOK-1548] - Add execute commands for autoclean and autoremove
- [COOK-1591] - Setting up the apt proxy should leave https
connections direct
- [COOK-1596] - execute[apt-get-update-periodic] never runs
- [COOK-1762] - create /etc/apt/preferences.d directory
- [COOK-1776] - apt key check isn't idempotent
v1.4.8
------
* Adds test-kitchen support
- [COOK-1435] - repository lwrp is not idempotent with http key
v1.4.6
------
- [COOK-1530] - apt_repository isn't aware of update-success-stamp
file (also reverts COOK-1382 patch).
v1.4.4
------
- [COOK-1229] - Allow cacher IP to be set manually in non-Chef Solo
environments
- [COOK-1530] - Immediately update apt-cache when sources.list file is dropped off
v1.4.2
------
- [COOK-1155] - LWRP for apt pinning
v1.4.0
------
- [COOK-889] - overwrite existing repo source files
- [COOK-921] - optionally use cookbook\_file or remote\_file for key
- [COOK-1032] - fixes problem with apt repository key installation
-248
View File
@@ -1,248 +0,0 @@
apt Cookbook
============
This cookbook includes recipes to execute apt-get update to ensure the local APT package cache is up to date. There are recipes for managing the apt-cacher-ng caching proxy and proxy clients. It also includes a LWRP for managing APT repositories in /etc/apt/sources.list.d as well as an LWRP for pinning packages via /etc/apt/preferences.d.
Requirements
------------
**Version 2.0.0+ of this cookbook requires Chef 11.0.0 or later**. If your Chef version is earlier than 11.0.0, use version 1.10.0 of this cookbook.
Version 1.8.2 to 1.10.0 of this cookbook requires **Chef 10.16.4** or later.
If your Chef version is earlier than 10.16.4, use version 1.7.0 of this cookbook.
### Platform
Please refer to the [TESTING file](TESTING.md) to see the currently (and passing) tested platforms. The release was tested on:
* Ubuntu 10.04
* Ubuntu 12.04
* Ubuntu 13.04
* Debian 7.1
* Debian 6.0 (have with manual testing)
May work with or without modification on other Debian derivatives.
-------
### default
This recipe installs the `update-notifier-common` package to provide the timestamp file used to only run `apt-get update` if the cache is more than one day old.
This recipe should appear first in the run list of Debian or Ubuntu nodes to ensure that the package cache is up to date before managing any `package` resources with Chef.
This recipe also sets up a local cache directory for preseeding packages.
**Including the default recipe on a node that does not support apt (such as Windows) results in a noop.**
### cacher-client
Configures the node to use the `apt-cacher-ng` server as a client.
#### Bypassing the cache
Occasionally you may come across repositories that do not play nicely when the node is using an `apt-cacher-ng` server. You can configure `cacher-client` to bypass the server and connect directly to the repository with the `cache_bypass` attribute.
To do this, you need to override the `cache_bypass` attribute with an array of repositories, with each array key as the repository URL and value as the protocol to use:
```json
{
...,
'apt': {
...,
'cache_bypass': {
URL: PROTOCOL
}
}
}
```
For example, to prevent caching and directly connect to the repository at `download.oracle.com` via http:
```json
{
'apt': {
'cache_bypass': {
'download.oracle.com': 'http'
}
}
}
```
### cacher-ng
Installs the `apt-cacher-ng` package and service so the system can provide APT caching. You can check the usage report at http://{hostname}:3142/acng-report.html.
If you wish to help the `cacher-ng` recipe seed itself, you must now explicitly include the `cacher-client` recipe in your run list **after** `cacher-ng` or you will block your ability to install any packages (ie. `apt-cacher-ng`).
Attributes
----------
* `['apt']['cacher_ipaddress']` - use a cacher server (or standard proxy server) not available via search
* `['apt']['cacher_interface]` - interface to connect to the cacher-ng service, no default.
* `['apt']['cacher_port']` - port for the cacher-ng service (either client or server), default is '3142'
* `['apt']['cacher_dir']` - directory used by cacher-ng service, default is '/var/cache/apt-cacher-ng'
* `['apt']['cacher-client']['restrict_environment']` - restrict your node to using the `apt-cacher-ng` server in your Environment, default is 'false'
* `['apt']['compiletime']` - force the `cacher-client` recipe to run before other recipes. It forces apt to use the proxy before other recipes run. Useful if your nodes have limited access to public apt repositories. This is overridden if the `cacher-ng` recipe is in your run list. Default is 'false'
* `['apt']['cache_bypass']` - array of URLs to bypass the cache. Accepts the URL and protocol to fetch directly from the remote repository and not attempt to cache
* `['apt']['periodic_update_min_delay']` - minimum delay (in seconds) beetween two actual executions of `apt-get update` by the `execute[apt-get-update-periodic]` resource, default is '86400' (24 hours)
Libraries
---------
There is an `interface_ipaddress` method that returns the IP address for a particular host and interface, used by the `cacher-client` recipe. To enable it on the server use the `['apt']['cacher_interface']` attribute.
Resources/Providers
-------------------
### `apt_repository`
This LWRP provides an easy way to manage additional APT repositories. Adding a new repository will notify running the `execute[apt-get-update]` resource immediately.
#### Actions
- :add: creates a repository file and builds the repository listing
- :remove: removes the repository file
#### Attribute Parameters
- repo_name: name attribute. The name of the channel to discover
- uri: the base of the Debian distribution
- distribution: this is usually your release's codename...ie something like `karmic`, `lucid` or `maverick`
- components: package groupings..when it doubt use `main`
- arch: constrain package to a particular arch like `i386`, `amd64` or even `armhf` or `powerpc`. Defaults to nil.
- trusted: treat all packages from this repository as authenticated regardless of signature
- deb_src: whether or not to add the repository as a source repo as well - value can be `true` or `false`, default `false`.
- keyserver: the GPG keyserver where the key for the repo should be retrieved
- key: if a `keyserver` is provided, this is assumed to be the fingerprint, otherwise it can be either the URI to the GPG key for the repo, or a cookbook_file.
- key_proxy: if set, pass the specified proxy via `http-proxy=` to GPG.
- cookbook: if key should be a cookbook_file, specify a cookbook where the key is located for files/default. Defaults to nil, so it will use the cookbook where the resource is used.
#### Examples
Add the Zenoss repo:
```ruby
apt_repository 'zenoss' do
uri 'http://dev.zenoss.org/deb'
components ['main', 'stable']
end
```
Add the Nginx PPA, grabbing the key from keyserver:
```ruby
apt_repository 'nginx-php' do
uri 'http://ppa.launchpad.net/nginx/php5/ubuntu'
distribution node['lsb']['codename']
components ['main']
keyserver 'keyserver.ubuntu.com'
key 'C300EE8C'
end
```
Add the Nginx PPA, grab the key from the keyserver, and add source repo:
```ruby
apt_repository 'nginx-php' do
uri 'http://ppa.launchpad.net/nginx/php5/ubuntu'
distribution node['lsb']['codename']
components ['main']
keyserver 'keyserver.ubuntu.com'
key 'C300EE8C'
deb_src true
end
```
Add the Cloudera Repo of CDH4 packages for Ubuntu 12.04 on AMD64:
```ruby
apt_repository 'cloudera' do
uri 'http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh'
arch 'amd64'
distribution 'precise-cdh4'
components ['contrib']
key 'http://archive.cloudera.com/debian/archive.key'
end
```
Remove Zenoss repo:
```ruby
apt_repository 'zenoss' do
action :remove
end
```
### `apt_preference`
This LWRP provides an easy way to pin packages in /etc/apt/preferences.d. Although apt-pinning is quite helpful from time to time please note that Debian does not encourage its use without thorough consideration.
Further information regarding apt-pinning is available via http://wiki.debian.org/AptPreferences.
#### Actions
- :add: creates a preferences file under /etc/apt/preferences.d
- :remove: Removes the file, therefore unpin the package
#### Attribute Parameters
- package_name: name attribute. The name of the package
- glob: Pin by glob() expression or regexp surrounded by /.
- pin: The package version/repository to pin
- pin_priority: The pinning priority aka "the highest package version wins"
#### Examples
Pin libmysqlclient16 to version 5.1.49-3:
```ruby
apt_preference 'libmysqlclient16' do
pin 'version 5.1.49-3'
pin_priority '700'
end
```
Unpin libmysqlclient16:
```ruby
apt_preference 'libmysqlclient16' do
action :remove
end
```
Pin all packages from dotdeb.org:
```ruby
apt_preference 'dotdeb' do
glob '*'
pin 'origin packages.dotdeb.org'
pin_priority '700'
end
```
Usage
-----
Put `recipe[apt]` first in the run list. If you have other recipes that you want to use to configure how apt behaves, like new sources, notify the execute resource to run, e.g.:
```ruby
template '/etc/apt/sources.list.d/my_apt_sources.list' do
notifies :run, 'execute[apt-get update]', :immediately
end
```
The above will run during execution phase since it is a normal template resource, and should appear before other package resources that need the sources in the template.
Put `recipe[apt::cacher-ng]` in the run_list for a server to provide APT caching and add `recipe[apt::cacher-client]` on the rest of the Debian-based nodes to take advantage of the caching server.
If you want to cleanup unused packages, there is also the `apt-get autoclean` and `apt-get autoremove` resources provided for automated cleanup.
License & Authors
-----------------
- Author:: Joshua Timberman (joshua@opscode.com)
- Author:: Matt Ray (matt@opscode.com)
- Author:: Seth Chisamore (schisamo@opscode.com)
```text
Copyright 2009-2013, Opscode, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
-28
View File
@@ -1,28 +0,0 @@
#
# Cookbook Name:: apt
# Attributes:: default
#
# Copyright 2009-2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
default['apt']['cacher-client']['restrict_environment'] = false
default['apt']['cacher_dir'] = '/var/cache/apt-cacher-ng'
default['apt']['cacher_interface'] = nil
default['apt']['cacher_port'] = 3142
default['apt']['caching_server'] = false
default['apt']['compiletime'] = false
default['apt']['key_proxy'] = ''
default['apt']['cache_bypass'] = {}
default['apt']['periodic_update_min_delay'] = 86_400
@@ -1,50 +0,0 @@
[DEFAULT]
;; All times are in seconds, but you can add a suffix
;; for minutes(m), hours(h) or days(d)
;; commented out address so apt-proxy will listen on all IPs
;; address = 127.0.0.1
port = 9999
cache_dir = /var/cache/apt-proxy
;; Control files (Packages/Sources/Contents) refresh rate
min_refresh_delay = 1s
complete_clientless_downloads = 1
;; Debugging settings.
debug = all:4 db:0
time = 30
passive_ftp = on
;;--------------------------------------------------------------
;; Cache housekeeping
cleanup_freq = 1d
max_age = 120d
max_versions = 3
;;---------------------------------------------------------------
;; Backend servers
;;
;; Place each server in its own [section]
[ubuntu]
; Ubuntu archive
backends =
http://us.archive.ubuntu.com/ubuntu
[ubuntu-security]
; Ubuntu security updates
backends = http://security.ubuntu.com/ubuntu
[debian]
;; Backend servers, in order of preference
backends =
http://debian.osuosl.org/debian/
[security]
;; Debian security archive
backends =
http://security.debian.org/debian-security
http://ftp2.de.debian.org/debian-security
-48
View File
@@ -1,48 +0,0 @@
#
# Cookbook Name:: apt
# Library:: helpers
#
# Copyright 2013 Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
module Apt
# Helpers for apt
module Helpers
# Determines if apt is installed on a system.
#
# @return [Boolean]
def apt_installed?
!which('apt-get').nil?
end
# Finds a command in $PATH
#
# @return [String, nil]
def which(cmd)
paths = (ENV['PATH'].split(::File::PATH_SEPARATOR) + %w(/bin /usr/bin /sbin /usr/sbin))
paths.each do |path|
possible = File.join(path, cmd)
return possible if File.executable?(possible)
end
nil
end
end
end
Chef::Recipe.send(:include, ::Apt::Helpers)
Chef::Resource.send(:include, ::Apt::Helpers)
Chef::Provider.send(:include, ::Apt::Helpers)
-17
View File
@@ -1,17 +0,0 @@
if defined?(ChefSpec)
def add_apt_preference(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:apt_preference, :add, resource_name)
end
def remove_apt_preference(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:apt_preference, :remove, resource_name)
end
def add_apt_repository(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:apt_repository, :add, resource_name)
end
def remove_apt_repository(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:apt_repository, :remove, resource_name)
end
end
-31
View File
@@ -1,31 +0,0 @@
#
# Cookbook Name:: apt
# library:: network
#
# Copyright 2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
module ::Apt
def interface_ipaddress(host, interface)
if interface
addresses = host['network']['interfaces'][interface]['addresses']
addresses.select do |ip, data|
return ip if data['family'].eql?('inet')
end
else
return host.ipaddress
end
end
end
File diff suppressed because one or more lines are too long
-34
View File
@@ -1,34 +0,0 @@
name 'apt'
maintainer 'Opscode, Inc.'
maintainer_email 'cookbooks@opscode.com'
license 'Apache 2.0'
description 'Configures apt and apt services and LWRPs for managing apt repositories and preferences'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.3.8'
recipe 'apt', 'Runs apt-get update during compile phase and sets up preseed directories'
recipe 'apt::cacher-ng', 'Set up an apt-cacher-ng caching proxy'
recipe 'apt::cacher-client', 'Client for the apt::cacher-ng caching proxy'
%w{ ubuntu debian }.each do |os|
supports os
end
attribute 'apt/cacher-client/restrict_environment',
:description => 'Whether to restrict the search for the caching server to the same environment as this node',
:default => 'false'
attribute 'apt/cacher_port',
:description => 'Default listen port for the caching server',
:default => '3142'
attribute 'apt/cacher_interface',
:description => 'Default listen interface for the caching server',
:default => nil
attribute 'apt/key_proxy',
:description => 'Passed as the proxy passed to GPG for the apt_repository resource',
:default => ''
attribute 'apt/caching_server',
:description => 'Set this to true if the node is a caching server',
:default => 'false'
@@ -1,63 +0,0 @@
#
# Cookbook Name:: apt
# Provider:: preference
#
# Copyright 2010-2011, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Build preferences.d file contents
def build_pref(package_name, pin, pin_priority)
"Package: #{package_name}\nPin: #{pin}\nPin-Priority: #{pin_priority}\n"
end
action :add do
new_resource.updated_by_last_action(false)
preference = build_pref(
new_resource.glob || new_resource.package_name,
new_resource.pin,
new_resource.pin_priority
)
preference_dir = directory '/etc/apt/preferences.d' do
owner 'root'
group 'root'
mode 00755
recursive true
action :nothing
end
preference_file = file "/etc/apt/preferences.d/#{new_resource.name}" do
owner 'root'
group 'root'
mode 00644
content preference
action :nothing
end
preference_dir.run_action(:create)
# write out the preference file, replace it if it already exists
preference_file.run_action(:create)
end
action :remove do
if ::File.exists?("/etc/apt/preferences.d/#{new_resource.name}")
Chef::Log.info "Un-pinning #{new_resource.name} from /etc/apt/preferences.d/"
file "/etc/apt/preferences.d/#{new_resource.name}" do
action :delete
end
new_resource.updated_by_last_action(true)
end
end
-150
View File
@@ -1,150 +0,0 @@
#
# Cookbook Name:: apt
# Provider:: repository
#
# Copyright 2010-2011, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
use_inline_resources if defined?(use_inline_resources)
def whyrun_supported?
true
end
# install apt key from keyserver
def install_key_from_keyserver(key, keyserver)
execute "install-key #{key}" do
if !node['apt']['key_proxy'].empty?
command "apt-key adv --keyserver-options http-proxy=#{node['apt']['key_proxy']} --keyserver hkp://#{keyserver}:80 --recv #{key}"
else
command "apt-key adv --keyserver #{keyserver} --recv #{key}"
end
action :run
not_if do
extract_fingerprints_from_cmd('apt-key finger').any? do |fingerprint|
fingerprint.end_with?(key.upcase)
end
end
end
end
# run command and extract gpg ids
def extract_fingerprints_from_cmd(cmd)
so = Mixlib::ShellOut.new(cmd)
so.run_command
so.stdout.split(/\n/).map do |t|
if z = t.match(/^ +Key fingerprint = ([0-9A-F ]+)/)
z[1].split.join
end
end.compact
end
# install apt key from URI
def install_key_from_uri(uri)
key_name = uri.split(/\//).last
cached_keyfile = "#{Chef::Config[:file_cache_path]}/#{key_name}"
if new_resource.key =~ /http/
remote_file cached_keyfile do
source new_resource.key
mode 00644
action :create
end
else
cookbook_file cached_keyfile do
source new_resource.key
cookbook new_resource.cookbook
mode 00644
action :create
end
end
execute "install-key #{key_name}" do
command "apt-key add #{cached_keyfile}"
action :run
not_if do
installed_keys = extract_fingerprints_from_cmd('apt-key finger')
proposed_keys = extract_fingerprints_from_cmd("gpg --with-fingerprint #{cached_keyfile}")
(installed_keys & proposed_keys).sort == proposed_keys.sort
end
end
end
# build repo file contents
def build_repo(uri, distribution, components, trusted, arch, add_deb_src)
components = components.join(' ') if components.respond_to?(:join)
repo_options = []
repo_options << "arch=#{arch}" if arch
repo_options << 'trusted=yes' if trusted
repo_options = '[' + repo_options.join(' ') + ']' unless repo_options.empty?
repo_info = "#{uri} #{distribution} #{components}\n"
repo_info = "#{repo_options} #{repo_info}" unless repo_options.empty?
repo = "deb #{repo_info}"
repo << "deb-src #{repo_info}" if add_deb_src
repo
end
action :add do
# add key
if new_resource.keyserver && new_resource.key
install_key_from_keyserver(new_resource.key, new_resource.keyserver)
elsif new_resource.key
install_key_from_uri(new_resource.key)
end
file '/var/lib/apt/periodic/update-success-stamp' do
action :nothing
end
execute 'apt-cache gencaches' do
ignore_failure true
action :nothing
end
execute 'apt-get update' do
command "apt-get update -o Dir::Etc::sourcelist='sources.list.d/#{new_resource.name}.list' -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0'"
ignore_failure true
action :nothing
notifies :run, 'execute[apt-cache gencaches]', :immediately
end
# build repo file
repository = build_repo(
new_resource.uri,
new_resource.distribution,
new_resource.components,
new_resource.trusted,
new_resource.arch,
new_resource.deb_src
)
file "/etc/apt/sources.list.d/#{new_resource.name}.list" do
owner 'root'
group 'root'
mode 00644
content repository
action :create
notifies :delete, 'file[/var/lib/apt/periodic/update-success-stamp]', :immediately
notifies :run, 'execute[apt-get update]', :immediately if new_resource.cache_rebuild
end
end
action :remove do
if ::File.exists?("/etc/apt/sources.list.d/#{new_resource.name}.list")
Chef::Log.info "Removing #{new_resource.name} repository from /etc/apt/sources.list.d/"
file "/etc/apt/sources.list.d/#{new_resource.name}.list" do
action :delete
end
end
end
@@ -1,81 +0,0 @@
#
# Cookbook Name:: apt
# Recipe:: cacher-client
#
# Copyright 2011-2013 Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
class ::Chef::Recipe
include ::Apt
end
# remove Acquire::http::Proxy lines from /etc/apt/apt.conf since we use 01proxy
# these are leftover from preseed installs
execute 'Remove proxy from /etc/apt/apt.conf' do
command "sed --in-place '/^Acquire::http::Proxy/d' /etc/apt/apt.conf"
only_if 'grep Acquire::http::Proxy /etc/apt/apt.conf'
end
servers = []
if node['apt']
if node['apt']['cacher_ipaddress']
cacher = Chef::Node.new
cacher.default.name = node['apt']['cacher_ipaddress']
cacher.default.ipaddress = node['apt']['cacher_ipaddress']
cacher.default.apt.cacher_port = node['apt']['cacher_port']
cacher.default.apt_cacher_interface = node['apt']['cacher_interface']
servers << cacher
elsif node['apt']['caching_server']
node.override['apt']['compiletime'] = false
servers << node
end
end
unless Chef::Config[:solo] || servers.length > 0
query = 'apt_caching_server:true'
query += " AND chef_environment:#{node.chef_environment}" if node['apt']['cacher-client']['restrict_environment']
Chef::Log.debug("apt::cacher-client searching for '#{query}'")
servers += search(:node, query)
end
if servers.length > 0
Chef::Log.info("apt-cacher-ng server found on #{servers[0]}.")
if servers[0]['apt']['cacher_interface']
cacher_ipaddress = interface_ipaddress(servers[0], servers[0]['apt']['cacher_interface'])
else
cacher_ipaddress = servers[0].ipaddress
end
t = template '/etc/apt/apt.conf.d/01proxy' do
source '01proxy.erb'
owner 'root'
group 'root'
mode 00644
variables(
:proxy => cacher_ipaddress,
:port => servers[0]['apt']['cacher_port'],
:bypass => node['apt']['cache_bypass']
)
action(node['apt']['compiletime'] ? :nothing : :create)
notifies :run, 'execute[apt-get update]', :immediately
end
t.run_action(:create) if node['apt']['compiletime']
else
Chef::Log.info('No apt-cacher-ng server found.')
file '/etc/apt/apt.conf.d/01proxy' do
action :delete
end
end
include_recipe 'apt::default'
-43
View File
@@ -1,43 +0,0 @@
#
# Cookbook Name:: apt
# Recipe:: cacher-ng
#
# Copyright 2008-2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
node.set['apt']['caching_server'] = true
package 'apt-cacher-ng' do
action :install
end
directory node['apt']['cacher_dir'] do
owner 'apt-cacher-ng'
group 'apt-cacher-ng'
mode 0755
end
template '/etc/apt-cacher-ng/acng.conf' do
source 'acng.conf.erb'
owner 'root'
group 'root'
mode 00644
notifies :restart, 'service[apt-cacher-ng]', :immediately
end
service 'apt-cacher-ng' do
supports :restart => true, :status => false
action [:enable, :start]
end
-82
View File
@@ -1,82 +0,0 @@
#
# Cookbook Name:: apt
# Recipe:: default
#
# Copyright 2008-2013, Opscode, Inc.
# Copyright 2009, Bryan McLellan <btm@loftninjas.org>
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# On systems where apt is not installed, the resources in this recipe are not
# executed. However, they _must_ still be present in the resource collection
# or other cookbooks which notify these resources will fail on non-apt-enabled
# systems.
Chef::Log.debug 'apt is not installed. Apt-specific resources will not be executed.' unless apt_installed?
# Run apt-get update to create the stamp file
execute 'apt-get-update' do
command 'apt-get update'
ignore_failure true
only_if { apt_installed? }
not_if { ::File.exists?('/var/lib/apt/periodic/update-success-stamp') }
end
# For other recipes to call to force an update
execute 'apt-get update' do
command 'apt-get update'
ignore_failure true
only_if { apt_installed? }
action :nothing
end
# Automatically remove packages that are no longer needed for dependencies
execute 'apt-get autoremove' do
command 'apt-get -y autoremove'
only_if { apt_installed? }
action :nothing
end
# Automatically remove .deb files for packages no longer on your system
execute 'apt-get autoclean' do
command 'apt-get -y autoclean'
only_if { apt_installed? }
action :nothing
end
# provides /var/lib/apt/periodic/update-success-stamp on apt-get update
package 'update-notifier-common' do
notifies :run, 'execute[apt-get-update]', :immediately
only_if { apt_installed? }
end
execute 'apt-get-update-periodic' do
command 'apt-get update'
ignore_failure true
only_if do
apt_installed? &&
::File.exists?('/var/lib/apt/periodic/update-success-stamp') &&
::File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - node['apt']['periodic_update_min_delay']
end
end
%w{/var/cache/local /var/cache/local/preseeding}.each do |dirname|
directory dirname do
owner 'root'
group 'root'
mode 00755
action :create
only_if { apt_installed? }
end
end
@@ -1,32 +0,0 @@
#
# Cookbook Name:: apt
# Resource:: preference
#
# Copyright 2010-2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
actions :add, :remove
default_action :add if defined?(default_action) # Chef > 10.8
# Needed for Chef versions < 0.10.10
def initialize(*args)
super
@action = :add
end
attribute :package_name, :kind_of => String, :name_attribute => true
attribute :glob, :kind_of => String
attribute :pin, :kind_of => String
attribute :pin_priority, :kind_of => String
@@ -1,43 +0,0 @@
#
# Cookbook Name:: apt
# Resource:: repository
#
# Copyright 2010-2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
actions :add, :remove
default_action :add if defined?(default_action) # Chef > 10.8
# Needed for Chef versions < 0.10.10
def initialize(*args)
super
@action = :add
end
# name of the repo, used for source.list filename
attribute :repo_name, :kind_of => String, :name_attribute => true
attribute :uri, :kind_of => String
attribute :distribution, :kind_of => String
attribute :components, :kind_of => Array, :default => []
attribute :arch, :kind_of => String, :default => nil
attribute :trusted, :kind_of => [TrueClass, FalseClass], :default => false
# whether or not to add the repository as a source repo as well
attribute :deb_src, :default => false
attribute :keyserver, :kind_of => String, :default => nil
attribute :key, :kind_of => String, :default => nil
attribute :cookbook, :kind_of => String, :default => nil
# trigger cache rebuild
# If not you can trigger in the recipe itself after checking the status of resource.updated{_by_last_action}?
attribute :cache_rebuild, :kind_of => [TrueClass, FalseClass], :default => true
@@ -1,173 +0,0 @@
# Letter case in directive names does not matter. Must be separated with colons.
# Valid boolean values are a zero number for false, non-zero numbers for true.
CacheDir: <%= node['apt']['cacher_dir'] %>
# set empty to disable logging
LogDir: /var/log/apt-cacher-ng
# TCP (http) port
# Set to 9999 to emulate apt-proxy
Port:<%= node['apt']['cacher_port'] %>
# Addresses or hostnames to listen on. Multiple addresses must be separated by
# spaces. Each entry must be associated with a local interface. DNS resolution
# is performed using getaddrinfo(3) for all available protocols (i.e. IPv4 and
# IPv6 if available).
#
# Default: not set, will listen on all interfaces.
#
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
#Proxy: http://www-proxy.example.net:80
#proxy: http://username:proxypassword@proxy.example.net:3128
# Repository remapping. See manual for details.
# In this example, backends file is generated during package installation.
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu
Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file
# Virtual page accessible in a web browser to see statistics and status
# information, i.e. under http://localhost:3142/acng-report.html
ReportPage: acng-report.html
# Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
# used with inetd bridge or cron client.
# SocketPath:/var/run/apt-cacher-ng/socket
# Forces log file to be written to disk after every line when set to 1. Default
# is 0, buffer flush happens after client disconnects.
#
# (technically, this is an alias to the Debug option provided for convenience)
#
# UnbufferLogs: 0
# Set to 0 to store only type, time and transfer sizes.
# 1 -> client IP and relative local path are logged too
# VerboseLog: 1
# Don't detach from the console
# ForeGround: 0
# Store the pid of the daemon process therein
# PidFile: /var/run/apt-cacher-ng/pid
# Forbid outgoing connections, work around them or respond with 503 error
# offlinemode:0
# Forbid all downloads that don't run through preconfigured backends (.where)
#ForceManaged: 0
# Days before considering an unreferenced file expired (to be deleted).
# Warning: if the value is set too low and particular index files are not
# available for some days (mirror downtime) there is a risk of deletion of
# still usefull package files.
ExTreshold: 4
# Stop expiration when a critical problem appeared. Currently only failed
# refresh of an index file is considered as critical.
#
# WARNING: don't touch this option or set to a non-zero number.
# Anything else is DANGEROUS and may cause data loss.
#
# ExAbortOnProblems: 1
# Replace some Windows/DOS-FS incompatible chars when storing
# StupidFs: 0
# Experimental feature for apt-listbugs: pass-through SOAP requests and
# responses to/from bugs.debian.org. If not set, default is true if
# ForceManaged is enabled and false otherwise.
# ForwardBtsSoap: 1
# The daemon has a small cache for DNS data, to speed up resolution. The
# expiration time of the DNS entries can be configured in seconds.
# DnsCacheSeconds: 3600
# Don't touch the following values without good consideration!
#
# Max. count of connection threads kept ready (for faster response in the
# future). Should be a sane value between 0 and average number of connections,
# and depend on the amount of spare RAM.
# MaxStandbyConThreads: 8
#
# Hard limit of active thread count for incomming connections, i.e. operation
# is refused when this value is reached (below zero = unlimited).
# MaxConThreads: -1
#
#VfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$
#PfilePattern = .*(\.deb|\.rpm|\.dsc|\.tar\.gz\.gpg|\.tar\.gz|\.diff\.gz|\.diff\.bz2|\.jigdo|\.template|changelog|copyright|\.udeb|\.diff/.*\.gz|vmlinuz|initrd\.gz|(Devel)?ReleaseAnnouncement(\\?.*)?)$
# Whitelist for expiration, file types not to be removed even when being
# unreferenced. Default: same as VfilePattern which is a safe bed. When and
# only when the only used mirrors are official repositories (with working
# Release files) then it might be set to something more restrictive, like
# (^|.*?/)(Release|Release\.gpg|release|meta-release|Translation[^/]*\.bz2)$
#WfilePattern = (^|.*?/)(Index|Packages\.bz2|Packages\.gz|Packages|Release|Release\.gpg|Sources\.bz2|Sources\.gz|Sources|release|index\.db-.*\.gz|Contents-[^/]*\.gz|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*\.bz2)$
# Higher modes only working with the debug version
# Warning, writes a lot into apt-cacher.err logfile
# Value overwrites UnbufferLogs setting (aliased)
# Debug:3
# Usually, general purpose proxies like Squid expose the IP adress of the
# client user to the remote server using the X-Forwarded-For HTTP header. This
# behaviour can be optionally turned on with the Expose-Origin option.
# ExposeOrigin: 0
# When logging the originating IP address, trust the information supplied by
# the client in the X-Forwarded-For header.
# LogSubmittedOrigin: 0
# The version string reported to the peer, to be displayed as HTTP client (and
# version) in the logs of the mirror.
# WARNING: some archives use this header to detect/guess capabilities of the
# client (i.e. redirection support) and change the behaviour accordingly, while
# ACNG might not support the expected features. Expect side effects.
#
# UserAgent: Yet Another HTTP Client/1.2.3p4
# In some cases the Import and Expiration tasks might create fresh volatile
# data for internal use by reconstructing them using patch files. This
# by-product might be recompressed with bzip2 and with some luck the resulting
# file becomes identical to the *.bz2 file on the server, usable for APT
# clients trying to fetch the full .bz2 compressed version. Injection of the
# generated files into the cache has however a disadvantage on underpowered
# servers: bzip2 compession can create high load on the server system and the
# visible download of the busy .bz2 files also becomes slower.
#
# RecompBz2: 0
# Network timeout for outgoing connections.
# NetworkTimeout: 60
# Sometimes it makes sense to not store the data in cache and just return the
# package data to client as it comes in. DontCache parameters can enable this
# behaviour for certain URL types. The tokens are extended regular expressions
# that URLs are matched against.
#
# DontCacheRequested is applied to the URL as it comes in from the client.
# Example: exclude packages built with kernel-package for x86
# DontCacheRequested: linux-.*_10\...\.Custo._i386
# Example usecase: exclude popular private IP ranges from caching
# DontCacheRequested: 192.168.0 ^10\..* 172.30
#
# DontCacheResolved is applied to URLs after mapping to the target server. If
# multiple backend servers are specified then it's only matched against the
# download link for the FIRST possible source (due to implementation limits).
# Example usecase: all Ubuntu stuff comes from a local mirror (specified as
# backend), don't cache it again:
# DontCacheResolved: ubuntumirror.local.net
#
# DontCache directive sets (overrides) both, DontCacheResolved and
# DontCacheRequested. Provided for convenience, see those directives for
# details.
#
# Default permission set of freshly created files and directories, as octal
# numbers (see chmod(1) for details).
# Can by limited by the umask value (see umask(2) for details) if it's set in
# the environment of the starting shell, e.g. in apt-cacher-ng init script or
# in its configuration file.
# DirPerms: 00755
# FilePerms: 00664
@@ -1,5 +0,0 @@
Acquire::http::Proxy "http://<%= @proxy %>:<%= @port %>";
Acquire::https::Proxy "DIRECT";
<% @bypass.each do |bypass, type| %>
Acquire::<%= type %>::Proxy::<%= bypass %> "DIRECT";
<% end %>
@@ -1,275 +0,0 @@
# Letter case in directive names does not matter. Must be separated with colons.
# Valid boolean values are a zero number for false, non-zero numbers for true.
CacheDir: <%= node['apt']['cacher_dir'] %>
# set empty to disable logging
LogDir: /var/log/apt-cacher-ng
# place to look for additional configuration and resource files if they are not
# found in the configuration directory
# SupportDir: /usr/lib/apt-cacher-ng
# TCP (http) port
# Set to 9999 to emulate apt-proxy
Port:<%= node['apt']['cacher_port'] %>
# Addresses or hostnames to listen on. Multiple addresses must be separated by
# spaces. Each entry must be an exact local address which is associated with a
# local interface. DNS resolution is performed using getaddrinfo(3) for all
# available protocols (IPv4, IPv6, ...). Using a protocol specific format will
# create binding(s) only on protocol specific socket(s) (e.g. 0.0.0.0 will listen
# only to IPv4).
#
# Default: not set, will listen on all interfaces and protocols
#
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
# The specification of another proxy which shall be used for downloads.
# Username and password are, and see manual for limitations.
#
#Proxy: http://www-proxy.example.net:80
#proxy: username:proxypassword@proxy.example.net:3128
# Repository remapping. See manual for details.
# In this example, some backends files might be generated during package
# installation using information collected on the system.
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol # Debian Volatile Archives
Remap-cygwin: file:cygwin_mirrors /cygwin # ; file:backends_cygwin # incomplete, please create this file or specify preferred mirrors here
Remap-sfnet: file:sfnet_mirrors # ; file:backends_sfnet # incomplete, please create this file or specify preferred mirrors here
Remap-alxrep: file:archlx_mirrors /archlinux # ; file:backend_archlx # Arch Linux
Remap-fedora: file:fedora_mirrors # Fedora Linux
Remap-epel: file:epel_mirrors # Fedora EPEL
Remap-slrep: file:sl_mirrors # Scientific Linux
# This is usually not needed for security.debian.org because it's always the
# same DNS hostname. However, it might be enabled in order to use hooks,
# ForceManaged mode or special flags in this context.
# Remap-secdeb: security.debian.org
# Virtual page accessible in a web browser to see statistics and status
# information, i.e. under http://localhost:3142/acng-report.html
ReportPage: acng-report.html
# Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
# used with inetd bridge or cron client.
# SocketPath:/var/run/apt-cacher-ng/socket
# Forces log file to be written to disk after every line when set to 1. Default
# is 0, buffers are flushed when the client disconnects.
#
# (technically, alias to the Debug option, see its documentation for details)
#
# UnbufferLogs: 0
# Set to 0 to store only type, time and transfer sizes.
# 1 -> client IP and relative local path are logged too
# VerboseLog: 1
# Don't detach from the console
# ForeGround: 0
# Store the pid of the daemon process therein
# PidFile: /var/run/apt-cacher-ng/pid
# Forbid outgoing connections, work around them or respond with 503 error
# offlinemode:0
# Forbid all downloads that don't run through preconfigured backends (.where)
#ForceManaged: 0
# Days before considering an unreferenced file expired (to be deleted).
# Warning: if the value is set too low and particular index files are not
# available for some days (mirror downtime) there is a risk of deletion of
# still useful package files.
ExTreshold: 4
# Stop expiration when a critical problem appeared. Currently only failed
# refresh of an index file is considered as critical.
#
# WARNING: don't touch this option or set to zero.
# Anything else is DANGEROUS and may cause data loss.
#
# ExAbortOnProblems: 1
# Replace some Windows/DOS-FS incompatible chars when storing
# StupidFs: 0
# Experimental feature for apt-listbugs: pass-through SOAP requests and
# responses to/from bugs.debian.org. If not set, default is true if
# ForceManaged is enabled and false otherwise.
# ForwardBtsSoap: 1
# The daemon has a small cache for DNS data, to speed up resolution. The
# expiration time of the DNS entries can be configured in seconds.
# DnsCacheSeconds: 3600
# Don't touch the following values without good consideration!
#
# Max. count of connection threads kept ready (for faster response in the
# future). Should be a sane value between 0 and average number of connections,
# and depend on the amount of spare RAM.
# MaxStandbyConThreads: 8
#
# Hard limit of active thread count for incoming connections, i.e. operation
# is refused when this value is reached (below zero = unlimited).
# MaxConThreads: -1
#
# Pigeonholing files with regular expressions (static/volatile). Can be
# overriden here but not should not be done permanently because future update
# of default settings would not be applied later.
# VfilePattern = (^|.*?/)(Index|Packages(\.gz|\.bz2|\.lzma|\.xz)?|InRelease|Release|Release\.gpg|Sources(\.gz|\.bz2|\.lzma|\.xz)?|release|index\.db-.*\.gz|Contents-[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|((setup|setup-legacy)(\.ini|\.bz2|\.hint)(\.sig)?)|mirrors\.lst|repo(index|md)\.xml(\.asc|\.key)?|directory\.yast|products|content(\.asc|\.key)?|media|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz|info\.txt|license\.tar\.gz|license\.zip|.*\.db(\.tar\.gz)?|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|metalink\?repo|.*prestodelta\.xml\.gz)$|/dists/.*/installer-[^/]+/[^0-9][^/]+/images/.*
# PfilePattern = .*(\.d?deb|\.rpm|\.dsc|\.tar(\.gz|\.bz2|\.lzma|\.xz)(\.gpg)?|\.diff(\.gz|\.bz2|\.lzma|\.xz)|\.jigdo|\.template|changelog|copyright|\.udeb|\.debdelta|\.diff/.*\.gz|(Devel)?ReleaseAnnouncement(\?.*)?|[a-f0-9]+-(susedata|updateinfo|primary|deltainfo).xml.gz|fonts/(final/)?[a-z]+32.exe(\?download.*)?|/dists/.*/installer-[^/]+/[0-9][^/]+/images/.*)$
# Whitelist for expiration, file types not to be removed even when being
# unreferenced. Default: many parts from VfilePattern where no parent index
# exists or might be unknown.
# WfilePattern = (^|.*?/)(Release|InRelease|Release\.gpg|(Packages|Sources)(\.gz|\.bz2|\.lzma|\.xz)?|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|.*\.xml|.*\.db\.tar\.gz|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|[a-z]+32.exe)$|/dists/.*/installer-.*/images/.*
# Higher modes only working with the debug version
# Warning, writes a lot into apt-cacher.err logfile
# Value overwrites UnbufferLogs setting (aliased)
# Debug:3
# Usually, general purpose proxies like Squid expose the IP address of the
# client user to the remote server using the X-Forwarded-For HTTP header. This
# behaviour can be optionally turned on with the Expose-Origin option.
# ExposeOrigin: 0
# When logging the originating IP address, trust the information supplied by
# the client in the X-Forwarded-For header.
# LogSubmittedOrigin: 0
# The version string reported to the peer, to be displayed as HTTP client (and
# version) in the logs of the mirror.
# WARNING: some archives use this header to detect/guess capabilities of the
# client (i.e. redirection support) and change the behaviour accordingly, while
# ACNG might not support the expected features. Expect side effects.
#
# UserAgent: Yet Another HTTP Client/1.2.3p4
# In some cases the Import and Expiration tasks might create fresh volatile
# data for internal use by reconstructing them using patch files. This
# by-product might be recompressed with bzip2 and with some luck the resulting
# file becomes identical to the *.bz2 file on the server, usable for APT
# clients trying to fetch the full .bz2 compressed version. Injection of the
# generated files into the cache has however a disadvantage on underpowered
# servers: bzip2 compression can create high load on the server system and the
# visible download of the busy .bz2 files also becomes slower.
#
# RecompBz2: 0
# Network timeout for outgoing connections.
# NetworkTimeout: 60
# Sometimes it makes sense to not store the data in cache and just return the
# package data to client as it comes in. DontCache parameters can enable this
# behaviour for certain URL types. The tokens are extended regular expressions
# that URLs are matched against.
#
# DontCacheRequested is applied to the URL as it comes in from the client.
# Example: exclude packages built with kernel-package for x86
# DontCacheRequested: linux-.*_10\...\.Custo._i386
# Example usecase: exclude popular private IP ranges from caching
# DontCacheRequested: 192.168.0 ^10\..* 172.30
#
# DontCacheResolved is applied to URLs after mapping to the target server. If
# multiple backend servers are specified then it's only matched against the
# download link for the FIRST possible source (due to implementation limits).
# Example usecase: all Ubuntu stuff comes from a local mirror (specified as
# backend), don't cache it again:
# DontCacheResolved: ubuntumirror.local.net
#
# DontCache directive sets (overrides) both, DontCacheResolved and
# DontCacheRequested. Provided for convenience, see those directives for
# details.
#
# Default permission set of freshly created files and directories, as octal
# numbers (see chmod(1) for details).
# Can by limited by the umask value (see umask(2) for details) if it's set in
# the environment of the starting shell, e.g. in apt-cacher-ng init script or
# in its configuration file.
# DirPerms: 00755
# FilePerms: 00664
#
#
# It's possible to use use apt-cacher-ng as a regular web server with limited
# feature set, i.e.
# including directory browsing and download of any file;
# excluding sorting, mime types/encodings, CGI execution, index page
# redirection and other funny things.
# To get this behavior, mappings between virtual directories and real
# directories on the server must be defined with the LocalDirs directive.
# Virtual and real dirs are separated by spaces, multiple pairs are separated
# by semi-colons. Real directories must be absolute paths.
# NOTE: Since the names of that key directories share the same namespace as
# repository names (see Remap-...) it's administrators job to avoid such
# collisions on them (unless created deliberately).
#
# LocalDirs: woo /data/debarchive/woody ; hamm /data/debarchive/hamm
# Precache a set of files referenced by specified index files. This can be used
# to create a partial mirror usable for offline work. There are certain limits
# and restrictions on the path specification, see manual for details. A list of
# (maybe) relevant index files could be retrieved via
# "apt-get --print-uris update" on a client machine.
#
# PrecacheFor: debrep/dists/unstable/*/source/Sources* debrep/dists/unstable/*/binary-amd64/Packages*
# Arbitrary set of data to append to request headers sent over the wire. Should
# be a well formated HTTP headers part including newlines (DOS style) which
# can be entered as escape sequences (\r\n).
# RequestAppendix: X-Tracking-Choice: do-not-track\r\n
# Specifies the IP protocol families to use for remote connections. Order does
# matter, first specified are considered first. Possible combinations:
# v6 v4
# v4 v6
# v6
# v4
# (empty or not set: use system default)
#
# ConnectProto: v6 v4
# Regular expiration algorithm finds package files which are no longer listed
# in any index file and removes them of them after a safety period.
# This option allows to keep more versions of a package in the cache after
# safety period is over.
# KeepExtraVersions: 1
# Optionally uses TCP access control provided by libwrap, see hosts_access(5)
# for details. Daemon name is apt-cacher-ng. Default if not set: decided on
# startup by looking for explicit mentioning of apt-cacher-ng in
# /etc/hosts.allow or /etc/hosts.deny files.
# UseWrap: 0
# If many machines from the same local network attempt to update index files
# (apt-get update) at nearly the same time, the known state of these index file
# is temporarily frozen and multiple requests receive the cached response
# without contacting the server. This parameter (in seconds) specifies the
# length of this period before the files are considered outdated.
# Setting it too low transfers more data and increases remote server load,
# setting it too high (more than a couple of minutes) increases the risk of
# delivering inconsistent responses to the clients.
# FreshIndexMaxAge: 27
# Usually the users are not allowed to specify custom TCP ports of remote
# mirrors in the requests, only the default HTTP port can be used (instead,
# proxy administrator can create Remap- rules with custom ports). This
# restriction can be disabled by specifying a list of allowed ports or 0 for
# any port.
#
# AllowUserPorts: 80
# Normally the HTTP redirection responses are forwarded to the original caller
# (i.e. APT) which starts a new download attempt from the new URL. This
# solution is ok for client configurations with proxy mode but doesn't work
# well with configurations using URL prefixes. To work around this the server
# can restart its own download with another URL. However, this might be used to
# circumvent download source policies by malicious users.
# The RedirMax option specifies how many such redirects the server should
# follow per request, 0 disables the internal redirection. If not set,
# default value is 0 if ForceManaged is used and 5 otherwise.
#
# RedirMax: 5
@@ -1,269 +0,0 @@
# Letter case in directive names does not matter. Must be separated with colons.
# Valid boolean values are a zero number for false, non-zero numbers for true.
CacheDir: <%= node['apt']['cacher_dir'] %>
# set empty to disable logging
LogDir: /var/log/apt-cacher-ng
# place to look for additional configuration and resource files if they are not
# found in the configuration directory
# SupportDir: /usr/lib/apt-cacher-ng
# TCP (http) port
# Set to 9999 to emulate apt-proxy
Port:<%= node['apt']['cacher_port'] %>
# Addresses or hostnames to listen on. Multiple addresses must be separated by
# spaces. Each entry must be an exact local address which is associated with a
# local interface. DNS resolution is performed using getaddrinfo(3) for all
# available protocols (IPv4, IPv6, ...). Using a protocol specific format will
# create binding(s) only on protocol specific socket(s) (e.g. 0.0.0.0 will listen
# only to IPv4).
#
# Default: not set, will listen on all interfaces and protocols
#
# BindAddress: localhost 192.168.7.254 publicNameOnMainInterface
# The specification of another proxy which shall be used for downloads.
# Username and password are, and see manual for limitations.
#
#Proxy: http://www-proxy.example.net:80
#proxy: username:proxypassword@proxy.example.net:3128
# Repository remapping. See manual for details.
# In this example, some backends files might be generated during package
# installation using information collected on the system.
Remap-debrep: file:deb_mirror*.gz /debian ; file:backends_debian # Debian Archives
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
Remap-debvol: file:debvol_mirror*.gz /debian-volatile ; file:backends_debvol # Debian Volatile Archives
# This is usually not needed for security.debian.org because it's always the
# same DNS hostname. However, it might be enabled in order to use hooks,
# ForceManaged mode or special flags in this context.
# Remap-secdeb: security.debian.org
# Virtual page accessible in a web browser to see statistics and status
# information, i.e. under http://localhost:3142/acng-report.html
ReportPage: acng-report.html
# Socket file for accessing through local UNIX socket instead of TCP/IP. Can be
# used with inetd bridge or cron client.
# SocketPath:/var/run/apt-cacher-ng/socket
# Forces log file to be written to disk after every line when set to 1. Default
# is 0, buffers are flushed when the client disconnects.
#
# (technically, alias to the Debug option, see its documentation for details)
#
# UnbufferLogs: 0
# Set to 0 to store only type, time and transfer sizes.
# 1 -> client IP and relative local path are logged too
# VerboseLog: 1
# Don't detach from the console
# ForeGround: 0
# Store the pid of the daemon process therein
# PidFile: /var/run/apt-cacher-ng/pid
# Forbid outgoing connections, work around them or respond with 503 error
# offlinemode:0
# Forbid all downloads that don't run through preconfigured backends (.where)
#ForceManaged: 0
# Days before considering an unreferenced file expired (to be deleted).
# Warning: if the value is set too low and particular index files are not
# available for some days (mirror downtime) there is a risk of deletion of
# still useful package files.
ExTreshold: 4
# Stop expiration when a critical problem appeared. Currently only failed
# refresh of an index file is considered as critical.
#
# WARNING: don't touch this option or set to zero.
# Anything else is DANGEROUS and may cause data loss.
#
# ExAbortOnProblems: 1
# Replace some Windows/DOS-FS incompatible chars when storing
# StupidFs: 0
# Experimental feature for apt-listbugs: pass-through SOAP requests and
# responses to/from bugs.debian.org. If not set, default is true if
# ForceManaged is enabled and false otherwise.
# ForwardBtsSoap: 1
# The daemon has a small cache for DNS data, to speed up resolution. The
# expiration time of the DNS entries can be configured in seconds.
# DnsCacheSeconds: 3600
# Don't touch the following values without good consideration!
#
# Max. count of connection threads kept ready (for faster response in the
# future). Should be a sane value between 0 and average number of connections,
# and depend on the amount of spare RAM.
# MaxStandbyConThreads: 8
#
# Hard limit of active thread count for incoming connections, i.e. operation
# is refused when this value is reached (below zero = unlimited).
# MaxConThreads: -1
#
# Pigeonholing files with regular expressions (static/volatile). Can be
# overriden here but not should not be done permanently because future update
# of default settings would not be applied later.
# VfilePattern = (^|.*?/)(Index|Packages(\.gz|\.bz2|\.lzma|\.xz)?|InRelease|Release|Release\.gpg|Sources(\.gz|\.bz2|\.lzma|\.xz)?|release|index\.db-.*\.gz|Contents-[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|pkglist[^/]*\.bz2|rclist[^/]*\.bz2|/meta-release[^/]*|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|((setup|setup-legacy)(\.ini|\.bz2|\.hint)(\.sig)?)|mirrors\.lst|repo(index|md)\.xml(\.asc|\.key)?|directory\.yast|products|content(\.asc|\.key)?|media|filelists\.xml\.gz|filelists\.sqlite\.bz2|repomd\.xml|packages\.[a-zA-Z][a-zA-Z]\.gz|info\.txt|license\.tar\.gz|license\.zip|.*\.db(\.tar\.gz)?|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|metalink\?repo|.*prestodelta\.xml\.gz)$|/dists/.*/installer-[^/]+/[^0-9][^/]+/images/.*
# PfilePattern = .*(\.d?deb|\.rpm|\.dsc|\.tar(\.gz|\.bz2|\.lzma|\.xz)(\.gpg)?|\.diff(\.gz|\.bz2|\.lzma|\.xz)|\.jigdo|\.template|changelog|copyright|\.udeb|\.debdelta|\.diff/.*\.gz|(Devel)?ReleaseAnnouncement(\?.*)?|[a-f0-9]+-(susedata|updateinfo|primary|deltainfo).xml.gz|fonts/(final/)?[a-z]+32.exe(\?download.*)?|/dists/.*/installer-[^/]+/[0-9][^/]+/images/.*)$
# Whitelist for expiration, file types not to be removed even when being
# unreferenced. Default: many parts from VfilePattern where no parent index
# exists or might be unknown.
# WfilePattern = (^|.*?/)(Release|InRelease|Release\.gpg|(Packages|Sources)(\.gz|\.bz2|\.lzma|\.xz)?|Translation[^/]*(\.gz|\.bz2|\.lzma|\.xz)?|MD5SUMS|SHA1SUMS|.*\.xml|.*\.db\.tar\.gz|.*\.files\.tar\.gz|.*\.abs\.tar\.gz|[a-z]+32.exe)$|/dists/.*/installer-.*/images/.*
# Higher modes only working with the debug version
# Warning, writes a lot into apt-cacher.err logfile
# Value overwrites UnbufferLogs setting (aliased)
# Debug:3
# Usually, general purpose proxies like Squid expose the IP address of the
# client user to the remote server using the X-Forwarded-For HTTP header. This
# behaviour can be optionally turned on with the Expose-Origin option.
# ExposeOrigin: 0
# When logging the originating IP address, trust the information supplied by
# the client in the X-Forwarded-For header.
# LogSubmittedOrigin: 0
# The version string reported to the peer, to be displayed as HTTP client (and
# version) in the logs of the mirror.
# WARNING: some archives use this header to detect/guess capabilities of the
# client (i.e. redirection support) and change the behaviour accordingly, while
# ACNG might not support the expected features. Expect side effects.
#
# UserAgent: Yet Another HTTP Client/1.2.3p4
# In some cases the Import and Expiration tasks might create fresh volatile
# data for internal use by reconstructing them using patch files. This
# by-product might be recompressed with bzip2 and with some luck the resulting
# file becomes identical to the *.bz2 file on the server, usable for APT
# clients trying to fetch the full .bz2 compressed version. Injection of the
# generated files into the cache has however a disadvantage on underpowered
# servers: bzip2 compression can create high load on the server system and the
# visible download of the busy .bz2 files also becomes slower.
#
# RecompBz2: 0
# Network timeout for outgoing connections.
# NetworkTimeout: 60
# Sometimes it makes sense to not store the data in cache and just return the
# package data to client as it comes in. DontCache parameters can enable this
# behaviour for certain URL types. The tokens are extended regular expressions
# that URLs are matched against.
#
# DontCacheRequested is applied to the URL as it comes in from the client.
# Example: exclude packages built with kernel-package for x86
# DontCacheRequested: linux-.*_10\...\.Custo._i386
# Example usecase: exclude popular private IP ranges from caching
# DontCacheRequested: 192.168.0 ^10\..* 172.30
#
# DontCacheResolved is applied to URLs after mapping to the target server. If
# multiple backend servers are specified then it's only matched against the
# download link for the FIRST possible source (due to implementation limits).
# Example usecase: all Ubuntu stuff comes from a local mirror (specified as
# backend), don't cache it again:
# DontCacheResolved: ubuntumirror.local.net
#
# DontCache directive sets (overrides) both, DontCacheResolved and
# DontCacheRequested. Provided for convenience, see those directives for
# details.
#
# Default permission set of freshly created files and directories, as octal
# numbers (see chmod(1) for details).
# Can by limited by the umask value (see umask(2) for details) if it's set in
# the environment of the starting shell, e.g. in apt-cacher-ng init script or
# in its configuration file.
# DirPerms: 00755
# FilePerms: 00664
#
#
# It's possible to use use apt-cacher-ng as a regular web server with limited
# feature set, i.e.
# including directory browsing and download of any file;
# excluding sorting, mime types/encodings, CGI execution, index page
# redirection and other funny things.
# To get this behavior, mappings between virtual directories and real
# directories on the server must be defined with the LocalDirs directive.
# Virtual and real dirs are separated by spaces, multiple pairs are separated
# by semi-colons. Real directories must be absolute paths.
# NOTE: Since the names of that key directories share the same namespace as
# repository names (see Remap-...) it's administrators job to avoid such
# collisions on them (unless created deliberately).
#
# LocalDirs: woo /data/debarchive/woody ; hamm /data/debarchive/hamm
# Precache a set of files referenced by specified index files. This can be used
# to create a partial mirror usable for offline work. There are certain limits
# and restrictions on the path specification, see manual for details. A list of
# (maybe) relevant index files could be retrieved via
# "apt-get --print-uris update" on a client machine.
#
# PrecacheFor: debrep/dists/unstable/*/source/Sources* debrep/dists/unstable/*/binary-amd64/Packages*
# Arbitrary set of data to append to request headers sent over the wire. Should
# be a well formated HTTP headers part including newlines (DOS style) which
# can be entered as escape sequences (\r\n).
# RequestAppendix: X-Tracking-Choice: do-not-track\r\n
# Specifies the IP protocol families to use for remote connections. Order does
# matter, first specified are considered first. Possible combinations:
# v6 v4
# v4 v6
# v6
# v4
# (empty or not set: use system default)
#
# ConnectProto: v6 v4
# Regular expiration algorithm finds package files which are no longer listed
# in any index file and removes them of them after a safety period.
# This option allows to keep more versions of a package in the cache after
# safety period is over.
# KeepExtraVersions: 1
# Optionally uses TCP access control provided by libwrap, see hosts_access(5)
# for details. Daemon name is apt-cacher-ng. Default if not set: decided on
# startup by looking for explicit mentioning of apt-cacher-ng in
# /etc/hosts.allow or /etc/hosts.deny files.
# UseWrap: 0
# If many machines from the same local network attempt to update index files
# (apt-get update) at nearly the same time, the known state of these index file
# is temporarily frozen and multiple requests receive the cached response
# without contacting the server. This parameter (in seconds) specifies the
# length of this period before the files are considered outdated.
# Setting it too low transfers more data and increases remote server load,
# setting it too high (more than a couple of minutes) increases the risk of
# delivering inconsistent responses to the clients.
# FreshIndexMaxAge: 27
# Usually the users are not allowed to specify custom TCP ports of remote
# mirrors in the requests, only the default HTTP port can be used (instead,
# proxy administrator can create Remap- rules with custom ports). This
# restriction can be disabled by specifying a list of allowed ports or 0 for
# any port.
#
# AllowUserPorts: 80
# Normally the HTTP redirection responses are forwarded to the original caller
# (i.e. APT) which starts a new download attempt from the new URL. This
# solution is ok for client configurations with proxy mode but doesn't work
# well with configurations using URL prefixes. To work around this the server
# can restart its own download with another URL. However, this might be used to
# circumvent download source policies by malicious users.
# The RedirMax option specifies how many such redirects the server should
# follow per request, 0 disables the internal redirection. If not set,
# default value is 0 if ForceManaged is used and 5 otherwise.
#
# RedirMax: 5
-12
View File
@@ -1,12 +0,0 @@
# CHANGELOG for mongodb
This file is used to list changes made in each version of mongodb.
## 0.1.0:
* Initial release of mongodb
- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
-68
View File
@@ -1,68 +0,0 @@
mongodb Cookbook
================
TODO: Enter the cookbook description here.
e.g.
This cookbook makes your favorite breakfast sandwhich.
Requirements
------------
TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
e.g.
#### packages
- `toaster` - mongodb needs toaster to brown your bagel.
Attributes
----------
TODO: List you cookbook attributes here.
e.g.
#### mongodb::default
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['mongodb']['bacon']</tt></td>
<td>Boolean</td>
<td>whether to include bacon</td>
<td><tt>true</tt></td>
</tr>
</table>
Usage
-----
#### mongodb::default
TODO: Write usage instructions for each cookbook.
e.g.
Just include `mongodb` in your node's `run_list`:
```json
{
"name":"my_node",
"run_list": [
"recipe[mongodb]"
]
}
```
Contributing
------------
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
e.g.
1. Fork the repository on Github
2. Create a named feature branch (like `add_component_x`)
3. Write you change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request using Github
License and Authors
-------------------
Authors: TODO: List authors
-8
View File
@@ -1,8 +0,0 @@
name 'mongodb'
maintainer 'ShareLaTeX'
maintainer_email 'team@sharelatex.com'
license 'AGPLv3'
description 'Installs/Configures mongodb'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
depends 'apt'
-19
View File
@@ -1,19 +0,0 @@
#
# Cookbook Name:: mongodb
# Recipe:: default
#
# Copyright 2014, ShareLaTeX
#
# See http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
apt_repository 'mongodb-org' do
uri 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart'
distribution 'dist'
components ['10gen']
keyserver 'keyserver.ubuntu.com'
key '7F0CEB10'
end
package 'mongodb-org' do
action :install
end
-12
View File
@@ -1,12 +0,0 @@
# CHANGELOG for nodejs
This file is used to list changes made in each version of nodejs.
## 0.1.0:
* Initial release of nodejs
- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
-68
View File
@@ -1,68 +0,0 @@
nodejs Cookbook
===============
TODO: Enter the cookbook description here.
e.g.
This cookbook makes your favorite breakfast sandwhich.
Requirements
------------
TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
e.g.
#### packages
- `toaster` - nodejs needs toaster to brown your bagel.
Attributes
----------
TODO: List you cookbook attributes here.
e.g.
#### nodejs::default
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['nodejs']['bacon']</tt></td>
<td>Boolean</td>
<td>whether to include bacon</td>
<td><tt>true</tt></td>
</tr>
</table>
Usage
-----
#### nodejs::default
TODO: Write usage instructions for each cookbook.
e.g.
Just include `nodejs` in your node's `run_list`:
```json
{
"name":"my_node",
"run_list": [
"recipe[nodejs]"
]
}
```
Contributing
------------
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
e.g.
1. Fork the repository on Github
2. Create a named feature branch (like `add_component_x`)
3. Write you change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request using Github
License and Authors
-------------------
Authors: TODO: List authors
-8
View File
@@ -1,8 +0,0 @@
name 'nodejs'
maintainer 'YOUR_COMPANY_NAME'
maintainer_email 'YOUR_EMAIL'
license 'AGPLv3'
description 'Installs/Configures nodejs'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
depends 'apt'
-24
View File
@@ -1,24 +0,0 @@
#
# Cookbook Name:: nodejs
# Recipe:: default
#
# Copyright 2014, ShareLaTeX
#
# See https://launchpad.net/~chris-lea/+archive/nodejs
apt_repository 'node.js' do
uri 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu'
distribution node['lsb']['codename']
components ['main']
keyserver 'keyserver.ubuntu.com'
key 'C7917B12'
end
package 'nodejs' do
action :install
end
execute 'install grunt' do
command "npm install -g grunt-cli"
not_if "npm --no-color -g ls 'grunt-cli' 2> /dev/null | grep 'grunt-cli'"
end
-68
View File
@@ -1,68 +0,0 @@
redis Cookbook
==============
TODO: Enter the cookbook description here.
e.g.
This cookbook makes your favorite breakfast sandwhich.
Requirements
------------
TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
e.g.
#### packages
- `toaster` - redis needs toaster to brown your bagel.
Attributes
----------
TODO: List you cookbook attributes here.
e.g.
#### redis::default
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['redis']['bacon']</tt></td>
<td>Boolean</td>
<td>whether to include bacon</td>
<td><tt>true</tt></td>
</tr>
</table>
Usage
-----
#### redis::default
TODO: Write usage instructions for each cookbook.
e.g.
Just include `redis` in your node's `run_list`:
```json
{
"name":"my_node",
"run_list": [
"recipe[redis]"
]
}
```
Contributing
------------
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
e.g.
1. Fork the repository on Github
2. Create a named feature branch (like `add_component_x`)
3. Write you change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request using Github
License and Authors
-------------------
Authors: TODO: List authors
-7
View File
@@ -1,7 +0,0 @@
name 'packages'
maintainer 'ShareLaTeX'
maintainer_email 'team@sharelatex.com'
license 'AGPLv3'
description 'Installs/Configures packages'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
@@ -1,10 +0,0 @@
#
# Cookbook Name:: packages
# Recipe:: default
#
# Copyright 2014, ShareLaTeX
#
package 'git'
package 'vim'
package 'build-essential'
-12
View File
@@ -1,12 +0,0 @@
# CHANGELOG for redis
This file is used to list changes made in each version of redis.
## 0.1.0:
* Initial release of redis
- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
-68
View File
@@ -1,68 +0,0 @@
redis Cookbook
==============
TODO: Enter the cookbook description here.
e.g.
This cookbook makes your favorite breakfast sandwhich.
Requirements
------------
TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
e.g.
#### packages
- `toaster` - redis needs toaster to brown your bagel.
Attributes
----------
TODO: List you cookbook attributes here.
e.g.
#### redis::default
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['redis']['bacon']</tt></td>
<td>Boolean</td>
<td>whether to include bacon</td>
<td><tt>true</tt></td>
</tr>
</table>
Usage
-----
#### redis::default
TODO: Write usage instructions for each cookbook.
e.g.
Just include `redis` in your node's `run_list`:
```json
{
"name":"my_node",
"run_list": [
"recipe[redis]"
]
}
```
Contributing
------------
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
e.g.
1. Fork the repository on Github
2. Create a named feature branch (like `add_component_x`)
3. Write you change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request using Github
License and Authors
-------------------
Authors: TODO: List authors
-8
View File
@@ -1,8 +0,0 @@
name 'redis-server'
maintainer 'ShareLaTeX'
maintainer_email 'team@sharelatex.com'
license 'AGPLv3'
description 'Installs/Configures redis-server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
depends 'apt'
@@ -1,20 +0,0 @@
#
# Cookbook Name:: redis
# Recipe:: default
#
# Copyright 2014, ShareLaTeX
#
# See https://launchpad.net/~chris-lea/+archive/redis-server
apt_repository 'redis-server' do
uri 'http://ppa.launchpad.net/chris-lea/redis-server/ubuntu'
distribution node['lsb']['codename']
components ['main']
keyserver 'keyserver.ubuntu.com'
key 'C7917B12'
end
package 'redis-server' do
action :upgrade
options "--force-yes"
end
-12
View File
@@ -1,12 +0,0 @@
# CHANGELOG for latex
This file is used to list changes made in each version of latex.
## 0.1.0:
* Initial release of latex
- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
-68
View File
@@ -1,68 +0,0 @@
latex Cookbook
==============
TODO: Enter the cookbook description here.
e.g.
This cookbook makes your favorite breakfast sandwhich.
Requirements
------------
TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
e.g.
#### packages
- `toaster` - latex needs toaster to brown your bagel.
Attributes
----------
TODO: List you cookbook attributes here.
e.g.
#### latex::default
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['latex']['bacon']</tt></td>
<td>Boolean</td>
<td>whether to include bacon</td>
<td><tt>true</tt></td>
</tr>
</table>
Usage
-----
#### latex::default
TODO: Write usage instructions for each cookbook.
e.g.
Just include `latex` in your node's `run_list`:
```json
{
"name":"my_node",
"run_list": [
"recipe[latex]"
]
}
```
Contributing
------------
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
e.g.
1. Fork the repository on Github
2. Create a named feature branch (like `add_component_x`)
3. Write you change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request using Github
License and Authors
-------------------
Authors: TODO: List authors
@@ -1,2 +0,0 @@
default[:texlive][:schema] = "small"
default[:texlive][:bin_dir] = "/usr/local/texlive/2014/bin/x86_64-linux"
-7
View File
@@ -1,7 +0,0 @@
name 'texlive'
maintainer 'ShareLaTeX'
maintainer_email 'team@sharelatex.com'
license 'All rights reserved'
description 'Installs/Configures texlive'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.0'
-42
View File
@@ -1,42 +0,0 @@
#
# Cookbook Name:: texlive
# Recipe:: default
#
# Copyright 2014, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
remote_file "#{Chef::Config[:file_cache_path]}/install-tl-unx.tar.gz" do
source "http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz"
action :create_if_missing
end
directory "/install-tl-unx"
bash "extract install-tl" do
cwd Chef::Config[:file_cache_path]
code <<-EOH
tar -xvf install-tl-unx.tar.gz -C /install-tl-unx --strip-components=1
EOH
creates "/install-tl-unx/install-tl"
end
file "/install-tl-unx/texlive.profile" do
content "selected_scheme scheme-#{node[:texlive][:schema]}"
end
bash "install texlive" do
cwd "/install-tl-unx"
code <<-EOH
/install-tl-unx/install-tl -profile /install-tl-unx/texlive.profile
EOH
creates "#{node[:texlive][:bin_dir]}/pdflatex"
end
bash "install latexmk" do
environment({
"PATH" => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:#{node[:texlive][:bin_dir]}"
})
code "tlmgr install latexmk"
creates "#{node[:texlive][:bin_dir]}/latexmk"
end
-227
View File
@@ -1,227 +0,0 @@
Path = require('path')
# These credentials are used for authenticating api requests
# between services that may need to go over public channels
httpAuthUser = "sharelatex"
httpAuthPass = "CRYPTO_RANDOM" # Randomly generated for you
httpAuthUsers = {}
httpAuthUsers[httpAuthUser] = httpAuthPass
DATA_DIR = Path.resolve(Path.join(__dirname, "..", "data"))
TMP_DIR = Path.resolve(Path.join(__dirname, "..", "tmp"))
module.exports =
# Databases
# ---------
# ShareLaTeX's main persistant data store is MongoDB (http://www.mongodb.org/)
# Documentation about the URL connection string format can be found at:
#
# http://docs.mongodb.org/manual/reference/connection-string/
#
# The following works out of the box with Mongo's default settings:
mongo:
url : 'mongodb://127.0.0.1/sharelatex'
# Redis is used in ShareLaTeX for high volume queries, like real-time
# editing, and session management.
#
# The following config will work with Redis's default settings:
redis:
web:
host: "localhost"
port: "6379"
password: ""
# The compile server (the clsi) uses a SQL database to cache files and
# meta-data. sqllite is the default, and the load is low enough that this will
# be fine in production (we use sqllite at sharelatex.com).
#
# If you want to configure a different database, see the Sequelize documentation
# for available options:
#
# https://github.com/sequelize/sequelize/wiki/API-Reference-Sequelize#example-usage
#
mysql:
clsi:
database: "clsi"
username: "clsi"
password: ""
dialect: "sqlite"
storage: Path.join(DATA_DIR, "db.sqlite")
# File storage
# ------------
# ShareLaTeX can store binary files like images either locally or in Amazon
# S3. The default is locally:
filestore:
backend: "fs"
stores:
user_files: Path.join(DATA_DIR, "user_files")
# To use Amazon S3 as a storage backend, comment out the above config, and
# uncomment the following, filling in your key, secret, and bucket name:
#
# filestore:
# backend: "s3"
# stores:
# user_files: "BUCKET_NAME"
# s3:
# key: "AWS_KEY"
# secret: "AWS_SECRET"
#
# Local disk caching
# ------------------
path:
# If we ever need to write something to disk (e.g. incoming requests
# that need processing but may be too big for memory), then write
# them to disk here:
dumpFolder: Path.join(TMP_DIR, "dumpFolder")
# Where to write uploads before they are processed
uploadFolder: Path.join(TMP_DIR, "uploads")
# Where to write the project to disk before running LaTeX on it
compilesDir: Path.join(DATA_DIR, "compiles")
# Where to cache downloaded URLs for the CLSI
clsiCacheDir: Path.join(DATA_DIR, "cache")
# Server Config
# -------------
# Where your instance of ShareLaTeX can be found publicly. This is used
# when emails are sent out and in generated links:
siteUrl : 'http://localhost:3000'
# The websocket layer of ShareLaTeX runs as separate service.
# When running locally or in development, you can point the client to this
# service directly on port 3026. If you are running behind a reverse proxy (Nginx, etc)
# then websocketsUrl should be the same as siteUrl, with your reverse
# proxy responible for sending websocket traffic to the websocket service
# rather than connecting directly.
websocketsUrl: 'http://localhost:3026'
# If provided, a sessionSecret is used to sign cookies so that they cannot be
# spoofed. This is recommended.
security:
sessionSecret: "CRYPTO_RANDOM" # This was randomly generated for you
# These credentials are used for authenticating api requests
# between services that may need to go over public channels
httpAuthUsers: httpAuthUsers
# Should javascript assets be served minified or not. Note that you will
# need to run `grunt compile:minify` within the web-sharelatex directory
# to generate these.
useMinifiedJs: false
# Should static assets be sent with a header to tell the browser to cache
# them. This should be false in development where changes are being made,
# but should be set to true in production.
cacheStaticAssets: false
# If you are running ShareLaTeX over https, set this to true to send the
# cookie with a secure flag (recommended).
secureCookie: false
# If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)
# then set this to true to allow it to correctly detect the forwarded IP
# address and http/https protocol information.
behindProxy: false
# Sending Email
# -------------
#
# You must configure a mail server to be able to send invite emails from
# ShareLaTeX. The config settings are passed to nodemailer. See the nodemailer
# documentation for available options:
#
# http://www.nodemailer.com/docs/transports
#
# email:
# fromAddress: ""
# replyTo: ""
# transport: "SES"
# parameters:
# AWSAccessKeyID: ""
# AWSSecretKey: ""
# 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: [
{name: "English", code: "en"}
]
# Service locations
# -----------------
# ShareLaTeX is comprised of many small services, which each expose
# an HTTP API running on a different port. Generally you
# can leave these as they are unless you have some other services
# running which conflict, or want to run the web process on port 80.
# internal:
# web:
# port: webPort = 3000
# host: "localhost"
# documentupdater:
# port: docUpdaterPort = 3003
# host: "localhost"
# filestore:
# port: filestorePort = 3009
# host: "localhost"
# chat:
# port: chatPort = 3010
# host: "localhost"
# tags:
# port: tagsPort = 3012
# host: "localhost"
# clsi:
# port: clsiPort = 3013
# host: "localhost"
# trackchanges:
# port: trackchangesPort = 3015
# host: "localhost"
# docstore:
# port: docstorePort = 3016
# host: "localhost"
# spelling:
# port: spellingPort = 3005
# host: "localhost"
# If you change the above config, or run some services on remote servers,
# you need to tell the other services where to find them:
apis:
web:
url: "http://localhost:3000"
user: httpAuthUser
pass: httpAuthPass
# documentupdater:
# url : "http://localhost:#{docUpdaterPort}"
# clsi:
# url: "http://localhost:#{clsiPort}"
# filestore:
# url: "http://localhost:#{filestorePort}"
# trackchanges:
# url: "http://localhost:#{trackchangesPort}"
# docstore:
# url: "http://localhost:#{docstorePort}"
# tags:
# url: "http://localhost:#{tagsPort}"
# spelling:
# url: "http://localhost:#{spellingPort}"
# chat:
# url: "http://localhost:#{chatPort}"
# With lots of incoming and outgoing HTTP connections to different services,
# sometimes long running, it is a good idea to increase the default number
# of sockets that Node will hold open.
http = require('http')
http.globalAgent.maxSockets = 300
https = require('https')
https.globalAgent.maxSockets = 300
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 KiB

+20
View File
@@ -0,0 +1,20 @@
version: '2.2'
services:
sharelatex:
ports:
- 40000:40000
- 30150:30150
- 30120:30120
- 30050:30050
- 30420:30420
- 30030:30030
- 30160:30160
- 30360:30360
- 30130:30130
- 30100:30100
# Server Pro
- 30070:30070
- 30400:30400
environment:
DEBUG_NODE: 'true'
+148
View File
@@ -0,0 +1,148 @@
version: '2.2'
services:
sharelatex:
restart: always
# Server Pro users:
# image: quay.io/sharelatex/sharelatex-pro
image: sharelatex/sharelatex
container_name: sharelatex
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_started
ports:
- 80:80
links:
- mongo
- redis
volumes:
- ~/sharelatex_data:/var/lib/sharelatex
########################################################################
#### Server Pro: Uncomment the following line to mount the docker ####
#### socket, required for Sibling Containers to work ####
########################################################################
# - /var/run/docker.sock:/var/run/docker.sock
environment:
SHARELATEX_APP_NAME: Overleaf Community Edition
SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex
# Same property, unfortunately with different names in
# different locations
SHARELATEX_REDIS_HOST: redis
REDIS_HOST: redis
ENABLED_LINKED_FILE_TYPES: 'url,project_file'
# Enables Thumbnail generation using ImageMagick
ENABLE_CONVERSIONS: 'true'
# Disables email confirmation requirement
EMAIL_CONFIRMATION_DISABLED: 'true'
# temporary fix for LuaLaTex compiles
# see https://github.com/overleaf/overleaf/issues/695
TEXMFVAR: /var/lib/sharelatex/tmp/texmf-var
## Set for SSL via nginx-proxy
#VIRTUAL_HOST: 103.112.212.22
# SHARELATEX_SITE_URL: http://sharelatex.mydomain.com
# SHARELATEX_NAV_TITLE: Our ShareLaTeX Instance
# SHARELATEX_HEADER_IMAGE_URL: http://somewhere.com/mylogo.png
# SHARELATEX_ADMIN_EMAIL: support@it.com
# SHARELATEX_LEFT_FOOTER: '[{"text": "Powered by <a href=\"https://www.sharelatex.com\">ShareLaTeX</a> 2016"},{"text": "Another page I want to link to can be found <a href=\"here\">here</a>"} ]'
# SHARELATEX_RIGHT_FOOTER: '[{"text": "Hello I am on the Right"} ]'
# SHARELATEX_EMAIL_FROM_ADDRESS: "team@sharelatex.com"
# SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID:
# SHARELATEX_EMAIL_AWS_SES_SECRET_KEY:
# SHARELATEX_EMAIL_SMTP_HOST: smtp.mydomain.com
# SHARELATEX_EMAIL_SMTP_PORT: 587
# SHARELATEX_EMAIL_SMTP_SECURE: false
# SHARELATEX_EMAIL_SMTP_USER:
# SHARELATEX_EMAIL_SMTP_PASS:
# SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH: true
# SHARELATEX_EMAIL_SMTP_IGNORE_TLS: false
# SHARELATEX_EMAIL_SMTP_NAME: '127.0.0.1'
# SHARELATEX_EMAIL_SMTP_LOGGER: true
# SHARELATEX_CUSTOM_EMAIL_FOOTER: "This system is run by department x"
################
## Server Pro ##
################
# SANDBOXED_COMPILES: 'true'
# SANDBOXED_COMPILES_SIBLING_CONTAINERS: 'true'
# SANDBOXED_COMPILES_HOST_DIR: '/var/sharelatex_data/data/compiles'
# SYNCTEX_BIN_HOST_PATH: '/var/sharelatex_data/bin/synctex'
# DOCKER_RUNNER: 'false'
## Works with test LDAP server shown at bottom of docker compose
# SHARELATEX_LDAP_URL: 'ldap://ldap:389'
# SHARELATEX_LDAP_SEARCH_BASE: 'ou=people,dc=planetexpress,dc=com'
# SHARELATEX_LDAP_SEARCH_FILTER: '(uid={{username}})'
# SHARELATEX_LDAP_BIND_DN: 'cn=admin,dc=planetexpress,dc=com'
# SHARELATEX_LDAP_BIND_CREDENTIALS: 'GoodNewsEveryone'
# SHARELATEX_LDAP_EMAIL_ATT: 'mail'
# SHARELATEX_LDAP_NAME_ATT: 'cn'
# SHARELATEX_LDAP_LAST_NAME_ATT: 'sn'
# SHARELATEX_LDAP_UPDATE_USER_DETAILS_ON_LOGIN: 'true'
# SHARELATEX_TEMPLATES_USER_ID: "578773160210479700917ee5"
# SHARELATEX_NEW_PROJECT_TEMPLATE_LINKS: '[ {"name":"All Templates","url":"/templates/all"}]'
# SHARELATEX_PROXY_LEARN: "true"
mongo:
restart: always
image: mongo:4.0
container_name: mongo
expose:
- 27017
volumes:
- ~/mongo_data:/data/db
healthcheck:
test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
redis:
restart: always
image: redis:5
container_name: redis
expose:
- 6379
volumes:
- ~/redis_data:/data
# ldap:
# restart: always
# image: rroemhild/test-openldap
# container_name: ldap
# expose:
# - 389
# See https://github.com/jwilder/nginx-proxy for documentation on how to configure the nginx-proxy container,
# and https://github.com/overleaf/overleaf/wiki/HTTPS-reverse-proxy-using-Nginx for an example of some recommended
# settings. We recommend using a properly managed nginx instance outside of the Overleaf Server Pro setup,
# but the example here can be used if you'd prefer to run everything with docker-compose
# nginx-proxy:
# image: jwilder/nginx-proxy
# container_name: nginx-proxy
# ports:
# #- "80:80"
# - "443:443"
# volumes:
# - /var/run/docker.sock:/tmp/docker.sock:ro
# - /home/sharelatex/tmp:/etc/nginx/certs
+62
View File
@@ -0,0 +1,62 @@
const services = require('./services')
console.log('#!/bin/bash')
console.log('set -ex')
switch (process.argv.pop()) {
case 'checkout':
for (const service of services) {
console.log(`git clone ${service.repo} ${service.name}`)
console.log(`git -C ${service.name} checkout ${service.version}`)
}
break
case 'revisions':
for (const service of services) {
console.log(`echo -n /var/www/sharelatex/${service.name},`)
console.log(`git -C ${service.name} rev-parse HEAD`)
}
break
case 'cleanup-git':
for (const service of services) {
console.log(`rm -rf ${service.name}/.git`)
}
break
case 'install':
for (const service of services) {
console.log('pushd', service.name)
switch (service.name) {
case 'web':
console.log('npm ci')
break
default:
// TODO(das7pad): revert back to npm ci --only=production (https://github.com/overleaf/issues/issues/4544)
console.log('npm ci')
}
console.log('popd')
}
break
case 'compile':
for (const service of services) {
console.log('pushd', service.name)
switch (service.name) {
case 'web':
console.log('npm run webpack:production')
// drop webpack/babel cache
console.log('rm -rf node_modules/.cache')
break
default:
console.log(`echo ${service.name} does not require a compilation`)
}
console.log('popd')
}
break
default:
console.error('unknown command')
console.log('exit 101')
process.exit(101)
}
console.log('set +x')
console.log(
'rm -rf /root/.cache /root/.npm $(find /tmp/ -mindepth 1 -maxdepth 1)'
)
+13
View File
@@ -0,0 +1,13 @@
FROM sharelatex/sharelatex:2.0.0
# Patch 1: Fixes project deletion (https://github.com/overleaf/overleaf/issues/644)
ADD disable_project_history.patch /etc/sharelatex/disable_project_history.patch
RUN cd /etc/sharelatex && \
patch < disable_project_history.patch
# Patch 2: Fixes admin creation via CLI (https://github.com/overleaf/overleaf/issues/647)
ADD create_and_destroy_users.patch /var/www/sharelatex/tasks/create_and_destroy_users.patch
RUN cd /var/www/sharelatex/tasks/ && \
patch < create_and_destroy_users.patch
@@ -0,0 +1,11 @@
--- CreateAndDestoryUsers.coffee
+++ CreateAndDestoryUsers.coffee
@@ -21,7 +21,7 @@ module.exports = (grunt) ->
user.save (error) ->
throw error if error?
ONE_WEEK = 7 * 24 * 60 * 60 # seconds
- OneTimeTokenHandler.getNewToken user._id, { expiresIn: ONE_WEEK }, (err, token)->
+ OneTimeTokenHandler.getNewToken "password", { expiresIn: ONE_WEEK, email:user.email, user_id: user._id.toString() }, (err, token)->
return next(err) if err?
console.log ""
@@ -0,0 +1,11 @@
--- settings.coffee
+++ settings.coffee
@@ -200,6 +200,8 @@ settings =
# is not available
v1:
url: ""
+ project_history:
+ enabled: false
references:{}
notifications:undefined
+60
View File
@@ -0,0 +1,60 @@
--- UploadsRouter.js
+++ UploadsRouter.js
@@ -1,13 +1,3 @@
-/* eslint-disable
- no-unused-vars,
-*/
-// TODO: This file was created by bulk-decaffeinate.
-// Fix any style issues and re-enable lint.
-/*
- * decaffeinate suggestions:
- * DS102: Remove unnecessary code created because of implicit returns
- * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
- */
const AuthorizationMiddleware = require('../Authorization/AuthorizationMiddleware')
const AuthenticationController = require('../Authentication/AuthenticationController')
const ProjectUploadController = require('./ProjectUploadController')
@@ -28,18 +18,30 @@ module.exports = {
ProjectUploadController.uploadProject
)
- return webRouter.post(
- '/Project/:Project_id/upload',
- RateLimiterMiddleware.rateLimit({
- endpointName: 'file-upload',
- params: ['Project_id'],
- maxRequests: 200,
- timeInterval: 60 * 30
- }),
- AuthenticationController.requireLogin(),
- AuthorizationMiddleware.ensureUserCanWriteProjectContent,
- ProjectUploadController.multerMiddleware,
- ProjectUploadController.uploadFile
- )
+ const fileUploadEndpoint = '/Project/:Project_id/upload'
+ const fileUploadRateLimit = RateLimiterMiddleware.rateLimit({
+ endpointName: 'file-upload',
+ params: ['Project_id'],
+ maxRequests: 200,
+ timeInterval: 60 * 30
+ })
+ if (Settings.allowAnonymousReadAndWriteSharing) {
+ webRouter.post(
+ fileUploadEndpoint,
+ fileUploadRateLimit,
+ AuthorizationMiddleware.ensureUserCanWriteProjectContent,
+ ProjectUploadController.multerMiddleware,
+ ProjectUploadController.uploadFile
+ )
+ } else {
+ webRouter.post(
+ fileUploadEndpoint,
+ fileUploadRateLimit,
+ AuthenticationController.requireLogin(),
+ AuthorizationMiddleware.ensureUserCanWriteProjectContent,
+ ProjectUploadController.multerMiddleware,
+ ProjectUploadController.uploadFile
+ )
+ }
}
}
+11
View File
@@ -0,0 +1,11 @@
--- TokenAccessHandler.js
+++ TokenAccessHandler.js
@@ -255,7 +255,7 @@ const TokenAccessHandler = {
getV1DocPublishedInfo(token, callback) {
// default to allowing access
- if (!Settings.apis || !Settings.apis.v1) {
+ if (!Settings.apis.v1 || !Settings.apis.v1.url) {
return callback(null, { allow: true })
}
V1Api.request(
+11
View File
@@ -0,0 +1,11 @@
--- Features.js
+++ Features.js
@@ -53,6 +53,8 @@ module.exports = Features = {
return Settings.apis.references.url != null
case 'saml':
return Settings.enableSaml
+ case 'link-url':
+ return Settings.apis.linkedUrlProxy && Settings.apis.linkedUrlProxy.url
default:
throw new Error(`unknown feature: ${feature}`)
}
+20
View File
@@ -0,0 +1,20 @@
--- new-file-modal.pug
+++ new-file-modal.pug
@@ -21,11 +21,12 @@ script(type='text/ng-template', id='newFileModalTemplate')
i.fa.fa-fw.fa-folder-open
|
| From Another Project
- li(ng-class="type == 'url' ? 'active' : null")
- a(href, ng-click="type = 'url'")
- i.fa.fa-fw.fa-globe
- |
- | From External URL
+ if hasFeature('link-url')
+ li(ng-class="type == 'url' ? 'active' : null")
+ a(href, ng-click="type = 'url'")
+ i.fa.fa-fw.fa-globe
+ |
+ | From External URL
!= moduleIncludes("newFileModal:selector", locals)
td(class="modal-new-file--body modal-new-file--body-{{type}}")
+26
View File
@@ -0,0 +1,26 @@
--- AnalyticsController.js
+++ AnalyticsController.js
@@ -3,9 +3,13 @@ const Errors = require('../Errors/Errors')
const AuthenticationController = require('../Authentication/AuthenticationController')
const InstitutionsAPI = require('../Institutions/InstitutionsAPI')
const GeoIpLookup = require('../../infrastructure/GeoIpLookup')
+const Features = require('../../infrastructure/Features')
module.exports = {
updateEditingSession(req, res, next) {
+ if (!Features.hasFeature('analytics')) {
+ return res.send(204)
+ }
const userId = AuthenticationController.getLoggedInUserId(req)
const { projectId } = req.params
let countryCode = null
@@ -28,6 +32,9 @@ module.exports = {
},
recordEvent(req, res, next) {
+ if (!Features.hasFeature('analytics')) {
+ return res.send(204)
+ }
const userId =
AuthenticationController.getLoggedInUserId(req) || req.sessionID
AnalyticsManager.recordEvent(userId, req.params.event, req.body, error =>
+10
View File
@@ -0,0 +1,10 @@
--- Features.js
+++ Features.js
@@ -41,6 +41,7 @@ module.exports = Features = {
case 'templates-server-pro':
return Settings.overleaf == null
case 'affiliations':
+ case 'analytics':
// Checking both properties is needed for the time being to allow
// enabling the feature in web-api and disabling in Server Pro
// see https://github.com/overleaf/web-internal/pull/2127
+31
View File
@@ -0,0 +1,31 @@
FROM sharelatex/sharelatex:2.0.1
# Patch 1: Fixes anonymous link sharing
ADD 1-anon-upload.patch /var/www/sharelatex/web/app/src/Features/Uploads/1-anon-upload.patch
RUN cd /var/www/sharelatex/web/app/src/Features/Uploads/ && \
patch < 1-anon-upload.patch
# Patch 2: Fixes read-only access
ADD 2-read-only-access.patch /var/www/sharelatex/web/app/src/Features/TokenAccess/3-read-only-access.patch
RUN cd /var/www/sharelatex/web/app/src/Features/TokenAccess/ && \
patch < 3-read-only-access.patch
# Patch 3: Fixes url linking
ADD 3-url-linking-1.patch /var/www/sharelatex/web/app/src/infrastructure/6-url-linking-1.patch
RUN cd /var/www/sharelatex/web/app/src/infrastructure/ && \
patch < 6-url-linking-1.patch
ADD 4-url-linking-2.patch /var/www/sharelatex/web/app/views/project/editor/7-url-linking-2.patch
RUN cd /var/www/sharelatex/web/app/views/project/editor/ && \
patch < 7-url-linking-2.patch
# Patch 4: Disables analytics
ADD 5-disable-analytics-1.patch /var/www/sharelatex/web/app/src/Features/Analytics/8-disable-analytics-1.patch
RUN cd /var/www/sharelatex/web/app/src/Features/Analytics/ && \
patch < 8-disable-analytics-1.patch
ADD 6-disable-analytics-2.patch /var/www/sharelatex/web/app/src/infrastructure/9-disable-analytics-2.patch
RUN cd /var/www/sharelatex/web/app/src/infrastructure/ && \
patch < 9-disable-analytics-2.patch
+8
View File
@@ -0,0 +1,8 @@
FROM sharelatex/sharelatex:2.1.0
# Patch: defines recaptcha config to fix share-related issues
# - https://github.com/overleaf/overleaf/issues/684
ADD add-recaptcha-config.patch /etc/sharelatex/add-recaptcha-config.patch
RUN cd /etc/sharelatex/ && \
patch < add-recaptcha-config.patch
+14
View File
@@ -0,0 +1,14 @@
--- a/settings.coffee
+++ b/settings.coffee
@@ -180,6 +180,11 @@ settings =
# cookie with a secure flag (recommended).
secureCookie: process.env["SHARELATEX_SECURE_COOKIE"]?
+ recaptcha:
+ disabled:
+ invite: true
+ register: true
+
# If you are running ShareLaTeX behind a proxy (like Apache, Nginx, etc)
# then set this to true to allow it to correctly detect the forwarded IP
# address and http/https protocol information.
+7
View File
@@ -0,0 +1,7 @@
FROM sharelatex/sharelatex:2.3.0
# Patch: Fixes NPE when invoking synctex (https://github.com/overleaf/overleaf/issues/756)
ADD check-clsi-setting-exists.patch /var/www/sharelatex/clsi/app/js/check-clsi-setting-exists.patch
RUN cd /var/www/sharelatex/clsi/app/js && \
patch < check-clsi-setting-exists.patch
@@ -0,0 +1,11 @@
--- a/app/js/CompileManager.js
+++ b/app/js/CompileManager.js
@@ -536,7 +536,7 @@ module.exports = CompileManager = {
compileName,
command,
directory,
- Settings.clsi != null ? Settings.clsi.docker.image : undefined,
+ Settings.clsi && Settings.clsi.docker ? Settings.clsi.docker.image : undefined,
timeout,
{},
function(error, output) {
+6
View File
@@ -0,0 +1,6 @@
FROM sharelatex/sharelatex:2.4.0
# Patch: Fixes missing dependencies on web startup (https://github.com/overleaf/overleaf/issues/767)
RUN cd /var/www/sharelatex/web && \
npm install i18next@^19.6.3 i18next-fs-backend@^1.0.7 i18next-http-middleware@^3.0.2
+10
View File
@@ -0,0 +1,10 @@
FROM sharelatex/sharelatex:2.4.1
# Patch: Fixes anonymous read/write sharing
COPY anonymous-metadata.patch ${baseDir}
RUN cd ${baseDir} && patch -p0 < anonymous-metadata.patch
# Patch: Fixes left footer with html text
COPY left-footer-skip-translation.patch ${baseDir}
RUN cd ${baseDir} && patch -p0 < left-footer-skip-translation.patch
+43
View File
@@ -0,0 +1,43 @@
--- /var/www/sharelatex/web/app/src/router.js 2020-09-14 20:21:39.741433000 +0000
+++ /var/www/sharelatex/web/app/src/router.js 2020-09-14 20:13:08.000000000 +0000
@@ -607,16 +607,17 @@
ProjectDownloadsController.downloadMultipleProjects
)
+ console.log(`allowAnonymousReadAndWriteSharing: ${Settings.allowAnonymousReadAndWriteSharing}`)
webRouter.get(
'/project/:project_id/metadata',
AuthorizationMiddleware.ensureUserCanReadProject,
- AuthenticationController.requireLogin(),
+ Settings.allowAnonymousReadAndWriteSharing ? (req, res, next) => { next() } : AuthenticationController.requireLogin(),
MetaController.getMetadata
- )
+ )
webRouter.post(
'/project/:project_id/doc/:doc_id/metadata',
AuthorizationMiddleware.ensureUserCanReadProject,
- AuthenticationController.requireLogin(),
+ Settings.allowAnonymousReadAndWriteSharing ? (req, res, next) => { next() } : AuthenticationController.requireLogin(),
MetaController.broadcastMetadataForDoc
)
privateApiRouter.post(
--- /var/www/sharelatex/web/app/src/Features/Contacts/ContactRouter.js 2020-09-14 20:21:52.243779000 +0000
+++ /var/www/sharelatex/web/app/src/Features/Contacts/ContactRouter.js 2020-09-14 20:13:08.000000000 +0000
@@ -5,6 +5,8 @@
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
+const Settings = require('settings-sharelatex')
+
const AuthenticationController = require('../Authentication/AuthenticationController')
const ContactController = require('./ContactController')
@@ -12,7 +14,7 @@
apply(webRouter, apiRouter) {
return webRouter.get(
'/user/contacts',
- AuthenticationController.requireLogin(),
+ Settings.allowAnonymousReadAndWriteSharing ? (req, res, next) => { next() } : AuthenticationController.requireLogin(),
ContactController.getContacts
)
}
@@ -0,0 +1,12 @@
--- /var/www/sharelatex/web/app/views/layout/footer.pug
+++ /var/www/sharelatex/web/app/app/views/layout/footer.pug
@@ -32,7 +32,7 @@ footer.site-footer
if item.url
a(href=item.url, class=item.class) !{translate(item.text)}
else
- | !{translate(item.text)}
+ | !{item.text}
ul.col-md-3.text-right
+13
View File
@@ -0,0 +1,13 @@
FROM sharelatex/sharelatex:2.5.0
# Patch #826: Fixes log path for contacts service to be picked up by logrotate
COPY contacts-run.patch /etc/service/contacts-sharelatex
RUN cd /etc/service/contacts-sharelatex && patch < contacts-run.patch
# Patch #826: delete old logs for the contacts service
COPY delete-old-logs.patch /etc/my_init.d
RUN cd /etc/my_init.d && patch < delete-old-logs.patch \
&& chmod +x /etc/my_init.d/10_delete_old_logs.sh
# Patch #827: fix logrotate file permissions
RUN chmod 644 /etc/logrotate.d/sharelatex
+8
View File
@@ -0,0 +1,8 @@
--- a/run
+++ b/run
@@ -7,4 +7,4 @@ if [ "$DEBUG_NODE" == "true" ]; then
NODE_PARAMS="--inspect=0.0.0.0:30360"
fi
-exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/contacts/app.js >> /var/log/sharelatex/contacts 2>&1
+exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/contacts/app.js >> /var/log/sharelatex/contacts.log 2>&1
+10
View File
@@ -0,0 +1,10 @@
--- /dev/null
+++ b/10_delete_old_logs.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+
+# Up to version 2.5.0 the logs of the contacts service were written into a
+# file that was not picked up by logrotate.
+# The service is stable and we can safely discard any logs.
+rm -vf /var/log/sharelatex/contacts
+28
View File
@@ -0,0 +1,28 @@
const Settings = require('settings-sharelatex')
const mongojs = require('mongojs')
const db = mongojs(Settings.mongo.url, ['tokens'])
const async = require('async')
exports.migrate = (client, done) => {
console.log(`>> Updating 'data.email' to lower case in tokens`)
db.tokens.find({}, { 'data.email': 1 }, (err, tokens) => {
if (err) {
return done(err)
}
async.eachSeries(
tokens,
(token, callback) => {
db.tokens.update(
{ _id: token._id },
{ $set: { 'data.email': token.data.email.toLowerCase() } },
callback
)
},
done
)
})
}
exports.rollback = (client, done) => done()
+8
View File
@@ -0,0 +1,8 @@
FROM sharelatex/sharelatex:2.5.1
# Patch: fixes registration token creation
COPY create-token-lowercase-email.patch ${baseDir}
RUN cd ${baseDir} && patch -p0 < create-token-lowercase-email.patch
# Migration for tokens with invalid email addresses
ADD 12_update_token_email.js /var/www/sharelatex/migrations/12_update_token_email.js
@@ -0,0 +1,11 @@
--- /var/www/sharelatex/web/app/src/Features/User/UserRegistrationHandler.js
+++ /var/www/sharelatex/web/app/src/Features/User/UserRegistrationHandler.js
@@ -122,7 +122,7 @@ const UserRegistrationHandler = {
const ONE_WEEK = 7 * 24 * 60 * 60 // seconds
OneTimeTokenHandler.getNewToken(
'password',
- { user_id: user._id.toString(), email },
+ { user_id: user._id.toString(), email: user.email },
{ expiresIn: ONE_WEEK },
(err, token) => {
if (err != null) {
+5
View File
@@ -0,0 +1,5 @@
FROM sharelatex/sharelatex:2.6.0-RC1
# Patch: fixes Project restore inserts bad projectId into deletedFiles
COPY document-deleter-object-id.patch ${baseDir}
RUN cd ${baseDir} && patch -p0 < document-deleter-object-id.patch
@@ -0,0 +1,10 @@
--- /var/www/sharelatex/web/app/src/Features/Project/ProjectDeleter.js
+++ /var/www/sharelatex/web/app/src/Features/Project/ProjectDeleter.js
@@ -278,6 +278,7 @@ async function deleteProject(projectId, options = {}) {
}
async function undeleteProject(projectId, options = {}) {
+ projectId = ObjectId(projectId)
let deletedProject = await DeletedProject.findOne({
'deleterData.deletedProjectId': projectId
}).exec()
+5
View File
@@ -0,0 +1,5 @@
FROM sharelatex/sharelatex:2.6.1
# Patch: fixes overleaf.com onboarding email being sent in CE/SP
COPY onboarding-email.patch ${baseDir}
RUN cd ${baseDir} && patch -p0 < onboarding-email.patch
+25
View File
@@ -0,0 +1,25 @@
--- /var/www/sharelatex/web/app/src/Features/User/UserCreator.js
+++ /var/www/sharelatex/web/app/src/Features/User/UserCreator.js
@@ -85,13 +85,15 @@ async function createNewUser(attributes, options = {}) {
}
Analytics.recordEvent(user._id, 'user-registered')
- try {
- await UserOnboardingEmailQueueManager.scheduleOnboardingEmail(user)
- } catch (error) {
- logger.error(
- `Failed to schedule sending of onboarding email for user '${user._id}'`,
- error
- )
+ if(Features.hasFeature('saas')) {
+ try {
+ await UserOnboardingEmailQueueManager.scheduleOnboardingEmail(user)
+ } catch (error) {
+ logger.error(
+ `Failed to schedule sending of onboarding email for user '${user._id}'`,
+ error
+ )
+ }
}
return user
+35
View File
@@ -0,0 +1,35 @@
#!/bin/sh
set -e
mkdir -p /var/lib/sharelatex/data
chown www-data:www-data /var/lib/sharelatex/data
mkdir -p /var/lib/sharelatex/data/user_files
chown www-data:www-data /var/lib/sharelatex/data/user_files
mkdir -p /var/lib/sharelatex/data/compiles
chown www-data:www-data /var/lib/sharelatex/data/compiles
mkdir -p /var/lib/sharelatex/data/cache
chown www-data:www-data /var/lib/sharelatex/data/cache
mkdir -p /var/lib/sharelatex/data/template_files
chown www-data:www-data /var/lib/sharelatex/data/template_files
mkdir -p /var/lib/sharelatex/tmp/dumpFolder
chown www-data:www-data /var/lib/sharelatex/tmp/dumpFolder
mkdir -p /var/lib/sharelatex/tmp
chown www-data:www-data /var/lib/sharelatex/tmp
mkdir -p /var/lib/sharelatex/tmp/uploads
chown www-data:www-data /var/lib/sharelatex/tmp/uploads
mkdir -p /var/lib/sharelatex/tmp/dumpFolder
chown www-data:www-data /var/lib/sharelatex/tmp/dumpFolder
if [ ! -e "/var/lib/sharelatex/data/db.sqlite" ]; then
touch /var/lib/sharelatex/data/db.sqlite
fi
chown www-data:www-data /var/lib/sharelatex/data/db.sqlite
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
set -e -o pipefail
# generate secrets and defines them as environment variables
# https://github.com/phusion/baseimage-docker#centrally-defining-your-own-environment-variables
WEB_API_PASSWORD_FILE=/etc/container_environment/WEB_API_PASSWORD
CRYPTO_RANDOM_FILE=/etc/container_environment/CRYPTO_RANDOM
if [ ! -f "$WEB_API_PASSWORD_FILE" ] || [ ! -f "$CRYPTO_RANDOM_FILE" ]; then
echo "generating random secrets"
SECRET=$(dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev | tr -d '\n+/')
echo ${SECRET} > ${WEB_API_PASSWORD_FILE}
SECRET=$(dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev | tr -d '\n+/')
echo ${SECRET} > ${CRYPTO_RANDOM_FILE}
fi
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
set -e -o pipefail
# See the bottom of http://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
echo "`route -n | awk '/UG[ \t]/{print $2}'` dockerhost" >> /etc/hosts
+34
View File
@@ -0,0 +1,34 @@
#!/bin/sh
set -e
## Generate nginx config files from templates,
## with environment variables substituted
nginx_dir='/etc/nginx'
nginx_templates_dir="${nginx_dir}/templates"
if ! [ -d "${nginx_templates_dir}" ]; then
echo "Nginx: no template directory found, skipping"
exit 0
fi
nginx_template_file="${nginx_templates_dir}/nginx.conf.template"
nginx_config_file="${nginx_dir}/nginx.conf"
if [ -f "${nginx_template_file}" ]; then
export NGINX_WORKER_PROCESSES="${NGINX_WORKER_PROCESSES:-4}"
export NGINX_WORKER_CONNECTIONS="${NGINX_WORKER_CONNECTIONS:-768}"
echo "Nginx: generating config file from template"
# Note the single-quotes, they are important.
# This is a pass-list of env-vars that envsubst
# should operate on.
envsubst '${NGINX_WORKER_PROCESSES} ${NGINX_WORKER_CONNECTIONS}' \
< "${nginx_template_file}" \
> "${nginx_config_file}"
echo "Nginx: reloading config"
service nginx reload
fi

Some files were not shown because too many files have changed in this diff Show More