mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Merge pull request #16058 from overleaf/jpa-faster-restart
[misc] faster service shutdown in dev-env GitOrigin-RevId: c5589844aefe3ca097756b188e02354ab518b94d
This commit is contained in:
parent
a722ca9483
commit
4763cfd59e
39 changed files with 73 additions and 70 deletions
|
@ -1,8 +1,8 @@
|
||||||
services:
|
services:
|
||||||
clsi:
|
clsi:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9230:9229"
|
- "127.0.0.1:9230:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -11,9 +11,9 @@ services:
|
||||||
- ../services/clsi/config:/overleaf/services/clsi/config
|
- ../services/clsi/config:/overleaf/services/clsi/config
|
||||||
|
|
||||||
chat:
|
chat:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9231:9229"
|
- "127.0.0.1:9231:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -22,9 +22,9 @@ services:
|
||||||
- ../services/chat/config:/overleaf/services/chat/config
|
- ../services/chat/config:/overleaf/services/chat/config
|
||||||
|
|
||||||
contacts:
|
contacts:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9232:9229"
|
- "127.0.0.1:9232:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -33,9 +33,9 @@ services:
|
||||||
- ../services/contacts/config:/overleaf/services/contacts/config
|
- ../services/contacts/config:/overleaf/services/contacts/config
|
||||||
|
|
||||||
docstore:
|
docstore:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9233:9229"
|
- "127.0.0.1:9233:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -44,9 +44,9 @@ services:
|
||||||
- ../services/docstore/config:/overleaf/services/docstore/config
|
- ../services/docstore/config:/overleaf/services/docstore/config
|
||||||
|
|
||||||
document-updater:
|
document-updater:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9234:9229"
|
- "127.0.0.1:9234:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -55,9 +55,9 @@ services:
|
||||||
- ../services/document-updater/config:/overleaf/services/document-updater/config
|
- ../services/document-updater/config:/overleaf/services/document-updater/config
|
||||||
|
|
||||||
filestore:
|
filestore:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9235:9229"
|
- "127.0.0.1:9235:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -66,9 +66,9 @@ services:
|
||||||
- ../services/filestore/config:/overleaf/services/filestore/config
|
- ../services/filestore/config:/overleaf/services/filestore/config
|
||||||
|
|
||||||
history-v1:
|
history-v1:
|
||||||
command: [ "npm", "run", "nodemon" ]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9239:9229"
|
- "127.0.0.1:9239:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -80,9 +80,9 @@ services:
|
||||||
- ../services/history-v1/migrations:/overleaf/services/history-v1/migrations
|
- ../services/history-v1/migrations:/overleaf/services/history-v1/migrations
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9236:9229"
|
- "127.0.0.1:9236:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -91,9 +91,9 @@ services:
|
||||||
- ../services/notifications/config:/overleaf/services/notifications/config
|
- ../services/notifications/config:/overleaf/services/notifications/config
|
||||||
|
|
||||||
project-history:
|
project-history:
|
||||||
command: [ "npm", "run", "nodemon" ]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9240:9229"
|
- "127.0.0.1:9240:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -102,9 +102,9 @@ services:
|
||||||
- ../services/project-history/config:/overleaf/services/project-history/config
|
- ../services/project-history/config:/overleaf/services/project-history/config
|
||||||
|
|
||||||
real-time:
|
real-time:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9237:9229"
|
- "127.0.0.1:9237:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -113,9 +113,9 @@ services:
|
||||||
- ../services/real-time/config:/overleaf/services/real-time/config
|
- ../services/real-time/config:/overleaf/services/real-time/config
|
||||||
|
|
||||||
web:
|
web:
|
||||||
command: ["npm", "run", "nodemon"]
|
command: ["node", "--watch", "app.js", "--watch-locales"]
|
||||||
environment:
|
environment:
|
||||||
- NODE_APP_OPTIONS=--inspect=0.0.0.0:9229
|
- NODE_OPTIONS=--inspect=0.0.0.0:9229
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9229:9229"
|
- "127.0.0.1:9229:9229"
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
@ -7,4 +7,4 @@ access-token-encryptor
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ fetch-utils
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ logger
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ metrics
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ o-error
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ object-persistor
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ overleaf-editor-core
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ promise-utils
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ ranges-tracker
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ redis-wrapper
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ settings
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,4 +7,4 @@ stream-utils
|
||||||
--is-library=True
|
--is-library=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -6,4 +6,4 @@ chat
|
||||||
--esmock-loader=False
|
--esmock-loader=False
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
|
|
|
@ -8,4 +8,4 @@ clsi
|
||||||
--has-custom-cloudbuild=True
|
--has-custom-cloudbuild=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=True
|
--public-repo=True
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
"format:fix": "prettier --write $PWD/'**/*.js'",
|
||||||
|
|
|
@ -6,4 +6,4 @@ contacts
|
||||||
--esmock-loader=True
|
--esmock-loader=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
"format:fix": "prettier --write $PWD/'**/*.js'",
|
||||||
|
|
|
@ -6,4 +6,4 @@ docstore
|
||||||
--esmock-loader=False
|
--esmock-loader=False
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=True
|
--public-repo=True
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
"format:fix": "prettier --write $PWD/'**/*.js'",
|
||||||
|
|
|
@ -217,7 +217,7 @@ const shutdownCleanly = signal => () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
logger.info({ signal }, 'shutting down')
|
logger.info({ signal }, 'shutting down')
|
||||||
process.exit()
|
process.exit()
|
||||||
}, 10000)
|
}, Settings.delayShutdownMs)
|
||||||
}
|
}
|
||||||
|
|
||||||
const watchForEvent = eventName => {
|
const watchForEvent = eventName => {
|
||||||
|
|
|
@ -6,4 +6,4 @@ document-updater
|
||||||
--esmock-loader=False
|
--esmock-loader=False
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=True
|
--public-repo=True
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -166,4 +166,5 @@ module.exports = {
|
||||||
continuousBackgroundFlush: process.env.CONTINUOUS_BACKGROUND_FLUSH === 'true',
|
continuousBackgroundFlush: process.env.CONTINUOUS_BACKGROUND_FLUSH === 'true',
|
||||||
|
|
||||||
smoothingOffset: process.env.SMOOTHING_OFFSET || 1000, // milliseconds
|
smoothingOffset: process.env.SMOOTHING_OFFSET || 1000, // milliseconds
|
||||||
|
delayShutdownMs: parseInt(process.env.DELAY_SHUTDOWN_MS || '10000', 10),
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
|
"nodemon": "node --watch app.js",
|
||||||
"benchmark:apply": "node benchmarks/apply",
|
"benchmark:apply": "node benchmarks/apply",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
"format:fix": "prettier --write $PWD/'**/*.js'",
|
||||||
|
|
|
@ -7,4 +7,4 @@ filestore
|
||||||
--esmock-loader=False
|
--esmock-loader=False
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=True
|
--public-repo=True
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:run": "mocha --recursive --reporter spec $@ test/unit/js",
|
"test:unit:run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
"format:fix": "prettier --write $PWD/'**/*.js'",
|
||||||
|
|
|
@ -6,4 +6,4 @@ history-v1
|
||||||
--esmock-loader=False
|
--esmock-loader=False
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
"yauzl": "^2.9.1"
|
"yauzl": "^2.9.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"migrate": "knex migrate:latest",
|
"migrate": "knex migrate:latest",
|
||||||
"delete_old_chunks": "node storage/tasks/delete_old_chunks.js",
|
"delete_old_chunks": "node storage/tasks/delete_old_chunks.js",
|
||||||
"fix_duplicate_versions": "node storage/tasks/fix_duplicate_versions.js",
|
"fix_duplicate_versions": "node storage/tasks/fix_duplicate_versions.js",
|
||||||
|
|
|
@ -6,4 +6,4 @@ notifications
|
||||||
--esmock-loader=False
|
--esmock-loader=False
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=True
|
--public-repo=True
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
"format:fix": "prettier --write $PWD/'**/*.js'",
|
||||||
|
|
|
@ -6,4 +6,4 @@ project-history
|
||||||
--esmock-loader=True
|
--esmock-loader=True
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
|
|
|
@ -6,4 +6,4 @@ real-time
|
||||||
--esmock-loader=False
|
--esmock-loader=False
|
||||||
--node-version=18.18.2
|
--node-version=18.18.2
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js",
|
||||||
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
"test:unit": "npm run test:unit:_run -- --grep=$MOCHA_GREP",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
"format:fix": "prettier --write $PWD/'**/*.js'",
|
"format:fix": "prettier --write $PWD/'**/*.js'",
|
||||||
|
|
|
@ -5,6 +5,7 @@ import Settings from '@overleaf/settings'
|
||||||
import logger from '@overleaf/logger'
|
import logger from '@overleaf/logger'
|
||||||
import { app } from './app/js/server.js'
|
import { app } from './app/js/server.js'
|
||||||
import * as ASpell from './app/js/ASpell.js'
|
import * as ASpell from './app/js/ASpell.js'
|
||||||
|
import Metrics from '@overleaf/metrics'
|
||||||
|
|
||||||
const { host = 'localhost', port = 3005 } = Settings.internal?.spelling ?? {}
|
const { host = 'localhost', port = 3005 } = Settings.internal?.spelling ?? {}
|
||||||
|
|
||||||
|
@ -21,5 +22,6 @@ process.on('SIGTERM', () => {
|
||||||
ASpell.stopCacheDump()
|
ASpell.stopCacheDump()
|
||||||
server.close(() => {
|
server.close(() => {
|
||||||
logger.info({ host, port }, 'spelling HTTP server closed')
|
logger.info({ host, port }, 'spelling HTTP server closed')
|
||||||
|
Metrics.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,4 +7,4 @@ spelling
|
||||||
--esmock-loader=True
|
--esmock-loader=True
|
||||||
--node-version=18.18.2-buster
|
--node-version=18.18.2-buster
|
||||||
--public-repo=False
|
--public-repo=False
|
||||||
--script-version=4.4.0
|
--script-version=4.5.0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile:app": "([ -e app/coffee ] && coffee -m $COFFEE_OPTIONS -o app/js -c app/coffee || echo 'No CoffeeScript folder to compile') && ( [ -e app.coffee ] && coffee -m $COFFEE_OPTIONS -c app.coffee || echo 'No CoffeeScript app to compile')",
|
"compile:app": "([ -e app/coffee ] && coffee -m $COFFEE_OPTIONS -o app/js -c app/coffee || echo 'No CoffeeScript folder to compile') && ( [ -e app.coffee ] && coffee -m $COFFEE_OPTIONS -c app.coffee || echo 'No CoffeeScript app to compile')",
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
"test:acceptance:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
|
||||||
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
|
||||||
"test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js",
|
"test:unit:_run": "LOG_LEVEL=fatal mocha --loader=esmock --recursive --reporter spec $@ test/unit/js",
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"compile:unit_tests": "[ ! -e test/unit/coffee ] && echo 'No unit tests to compile' || coffee -o test/unit/js -c test/unit/coffee",
|
"compile:unit_tests": "[ ! -e test/unit/coffee ] && echo 'No unit tests to compile' || coffee -o test/unit/js -c test/unit/coffee",
|
||||||
"compile:acceptance_tests": "[ ! -e test/acceptance/coffee ] && echo 'No acceptance tests to compile' || coffee -o test/acceptance/js -c test/acceptance/coffee",
|
"compile:acceptance_tests": "[ ! -e test/acceptance/coffee ] && echo 'No acceptance tests to compile' || coffee -o test/acceptance/js -c test/acceptance/coffee",
|
||||||
"compile:all": "npm run compile:app && npm run compile:unit_tests && npm run compile:acceptance_tests && npm run compile:smoke_tests",
|
"compile:all": "npm run compile:app && npm run compile:unit_tests && npm run compile:acceptance_tests && npm run compile:smoke_tests",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js",
|
"nodemon": "node --watch app.js",
|
||||||
"compile:smoke_tests": "[ ! -e test/smoke/coffee ] && echo 'No smoke tests to compile' || coffee -o test/smoke/js -c test/smoke/coffee",
|
"compile:smoke_tests": "[ ! -e test/smoke/coffee ] && echo 'No smoke tests to compile' || coffee -o test/smoke/js -c test/smoke/coffee",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix .",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
"test:unit:app": "npm run test:unit:run_dir -- test/unit/src",
|
"test:unit:app": "npm run test:unit:run_dir -- test/unit/src",
|
||||||
"test:frontend": "NODE_ENV=test TZ=GMT mocha --recursive --timeout 5000 --exit --extension js,jsx,mjs,ts,tsx --grep=$MOCHA_GREP --require test/frontend/bootstrap.js --ignore '**/*.spec.{js,jsx,ts,tsx}' test/frontend modules/*/test/frontend",
|
"test:frontend": "NODE_ENV=test TZ=GMT mocha --recursive --timeout 5000 --exit --extension js,jsx,mjs,ts,tsx --grep=$MOCHA_GREP --require test/frontend/bootstrap.js --ignore '**/*.spec.{js,jsx,ts,tsx}' test/frontend modules/*/test/frontend",
|
||||||
"test:frontend:coverage": "c8 --all --include 'frontend/js' --include 'modules/*/frontend/js' --exclude 'frontend/js/vendor' --reporter=lcov --reporter=text-summary npm run test:frontend",
|
"test:frontend:coverage": "c8 --all --include 'frontend/js' --include 'modules/*/frontend/js' --exclude 'frontend/js/vendor' --reporter=lcov --reporter=text-summary npm run test:frontend",
|
||||||
"start": "node $NODE_APP_OPTIONS app.js",
|
"start": "node app.js",
|
||||||
"nodemon": "node --watch $NODE_APP_OPTIONS app.js --watch-locales",
|
"nodemon": "node --watch app.js --watch-locales",
|
||||||
"webpack": "webpack serve --config webpack.config.dev.js",
|
"webpack": "webpack serve --config webpack.config.dev.js",
|
||||||
"webpack:production": "webpack --config webpack.config.prod.js",
|
"webpack:production": "webpack --config webpack.config.prod.js",
|
||||||
"webpack:profile": "webpack --config webpack.config.prod.js --profile --json > stats.json",
|
"webpack:profile": "webpack --config webpack.config.prod.js --profile --json > stats.json",
|
||||||
|
|
Loading…
Reference in a new issue