mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Merge pull request #6542 from overleaf/jpa-em-code-sharing-workspaces
[misc] npm workspaces GitOrigin-RevId: 87aa72db6637fb238d7cd35b0a48ac3ed58ab3eb
This commit is contained in:
@@ -2,19 +2,25 @@
|
||||
# Instead run bin/update_build_scripts from
|
||||
# https://github.com/sharelatex/sharelatex-dev-environment
|
||||
|
||||
FROM node:14.18.3 as base
|
||||
FROM gcr.io/overleaf-ops/node:14.18.3 as base
|
||||
|
||||
WORKDIR /overleaf/services/filestore
|
||||
COPY services/filestore/install_deps.sh /overleaf/services/filestore/
|
||||
RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
|
||||
|
||||
# Google Cloud Storage needs a writable $HOME/.config for resumable uploads
|
||||
# (see https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream)
|
||||
RUN mkdir /home/node/.config && chown node:node /home/node/.config
|
||||
|
||||
FROM base as app
|
||||
|
||||
COPY services/filestore/package*.json /overleaf/services/filestore/
|
||||
COPY package.json package-lock.json /overleaf/
|
||||
COPY services/filestore/package.json /overleaf/services/filestore/
|
||||
COPY libraries/ /overleaf/libraries/
|
||||
|
||||
RUN npm ci --quiet
|
||||
RUN cd /overleaf && npm ci --quiet
|
||||
|
||||
COPY services/filestore /overleaf/services/filestore
|
||||
COPY services/filestore/ /overleaf/services/filestore/
|
||||
|
||||
FROM app
|
||||
RUN mkdir -p uploads user_files template_files \
|
||||
|
||||
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
|
||||
MONOREPO=$(shell cd ../../ && pwd)
|
||||
# Run the linting commands in the scope of the monorepo.
|
||||
# Eslint and prettier (plus some configs) are on the root.
|
||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:14.18.3 npm run --silent
|
||||
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
|
||||
|
||||
format:
|
||||
$(RUN_LINTING) format
|
||||
|
||||
@@ -4,6 +4,7 @@ filestore
|
||||
--docker-repos=gcr.io/overleaf-ops
|
||||
--env-add=ENABLE_CONVERSIONS="true",USE_PROM_METRICS="true",AWS_S3_USER_FILES_BUCKET_NAME=fake_user_files,AWS_S3_TEMPLATE_FILES_BUCKET_NAME=fake_template_files,AWS_S3_PUBLIC_FILES_BUCKET_NAME=fake_public_files,GCS_USER_FILES_BUCKET_NAME=fake_userfiles,GCS_TEMPLATE_FILES_BUCKET_NAME=fake_templatefiles,GCS_PUBLIC_FILES_BUCKET_NAME=fake_publicfiles
|
||||
--env-pass-through=
|
||||
--node-image=gcr.io/overleaf-ops/node
|
||||
--node-version=14.18.3
|
||||
--public-repo=True
|
||||
--script-version=4.0.0
|
||||
--script-version=4.1.0
|
||||
|
||||
@@ -12,6 +12,8 @@ services:
|
||||
target: base
|
||||
volumes:
|
||||
- .:/overleaf/services/filestore
|
||||
- ../../node_modules:/overleaf/node_modules
|
||||
- ../../libraries:/overleaf/libraries
|
||||
working_dir: /overleaf/services/filestore
|
||||
environment:
|
||||
MOCHA_GREP: ${MOCHA_GREP}
|
||||
@@ -27,6 +29,8 @@ services:
|
||||
target: base
|
||||
volumes:
|
||||
- .:/overleaf/services/filestore
|
||||
- ../../node_modules:/overleaf/node_modules
|
||||
- ../../libraries:/overleaf/libraries
|
||||
working_dir: /overleaf/services/filestore
|
||||
environment:
|
||||
ELASTIC_SEARCH_DSN: es:9200
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
"watch": [
|
||||
"app/js/",
|
||||
"app.js",
|
||||
"config/"
|
||||
"config/",
|
||||
"../../libraries/"
|
||||
],
|
||||
"ext": "js"
|
||||
}
|
||||
|
||||
Generated
-4829
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,8 @@
|
||||
{
|
||||
"name": "filestore-sharelatex",
|
||||
"version": "0.1.4",
|
||||
"name": "@overleaf/filestore",
|
||||
"description": "An API for CRUD operations on binary files stored in S3",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sharelatex/filestore-sharelatex.git"
|
||||
},
|
||||
"private": true,
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"test:acceptance:run": "mocha --recursive --reporter spec --timeout 15000 $@ test/acceptance/js",
|
||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||
@@ -13,19 +10,19 @@
|
||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||
"start": "node $NODE_APP_OPTIONS app.js",
|
||||
"nodemon": "nodemon --config nodemon.json",
|
||||
"lint": "../../node_modules/.bin/eslint --max-warnings 0 --format unix .",
|
||||
"format": "../../node_modules/.bin/prettier --list-different $PWD/'**/*.js'",
|
||||
"format:fix": "../../node_modules/.bin/prettier --write $PWD/'**/*.js'",
|
||||
"lint": "eslint --max-warnings 0 --format unix .",
|
||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||
"lint:fix": "../../node_modules/.bin/eslint --fix ."
|
||||
"lint:fix": "eslint --fix ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@overleaf/logger": "^3.1.0",
|
||||
"@overleaf/metrics": "^4.0.0",
|
||||
"@overleaf/o-error": "^3.0.0",
|
||||
"@overleaf/object-persistor": "^1.0.1",
|
||||
"@overleaf/settings": "^2.1.1",
|
||||
"@overleaf/settings": "^3.0.0",
|
||||
"body-parser": "^1.19.0",
|
||||
"bunyan": "^1.8.15",
|
||||
"express": "^4.17.1",
|
||||
@@ -42,14 +39,14 @@
|
||||
"devDependencies": {
|
||||
"@google-cloud/storage": "^5.1.2",
|
||||
"aws-sdk": "^2.718.0",
|
||||
"chai": "^4.2.0",
|
||||
"chai": "^4.3.6",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"disrequire": "^1.1.0",
|
||||
"mocha": "^8.3.2",
|
||||
"mocha": "^8.4.0",
|
||||
"mongodb": "^3.5.9",
|
||||
"sandboxed-module": "2.0.4",
|
||||
"sinon": "9.0.2",
|
||||
"sinon-chai": "^3.5.0",
|
||||
"sinon-chai": "^3.7.0",
|
||||
"streamifier": "^0.1.1",
|
||||
"timekeeper": "^2.2.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user