Merge pull request #11300 from overleaf/msm-ce-fph

Setup Full Project History services for CE/SP

GitOrigin-RevId: 96e3a5996d1fdc1d396862b6ab430d315dca3320
This commit is contained in:
Miguel Serrano 2023-01-18 16:03:32 +01:00 committed by Copybot
parent 7075a1e513
commit e5858f53ed
7 changed files with 69 additions and 37 deletions

View file

@ -12,6 +12,8 @@ services:
- 30360:30360
- 30130:30130
- 30100:30100
- 30540:30540
- 30640:30640
# Server Pro
- 30070:30070

View file

@ -0,0 +1,9 @@
#!/bin/bash
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - history-v1"
NODE_PARAMS="--inspect=0.0.0.0:30640"
fi
MONGO_CONNECTION_STRING=$SHARELATEX_MONGO_URL NODE_CONFIG_DIR=/overleaf/services/history-v1/config NODE_CONFIG_ENV=overleaf-ce exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /overleaf/services/history-v1/app.js >> /var/log/sharelatex/history-v1.log 2>&1

View file

@ -0,0 +1,9 @@
#!/bin/bash
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - project-history"
NODE_PARAMS="--inspect=0.0.0.0:30540"
fi
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /overleaf/services/project-history/app.js >> /var/log/sharelatex/project-history.log 2>&1

View file

@ -1,58 +1,42 @@
module.exports = [
{
name: 'web',
repo: 'https://github.com/sharelatex/web-sharelatex.git',
version: 'master',
name: 'web'
},
{
name: 'real-time',
repo: 'https://github.com/sharelatex/real-time-sharelatex.git',
version: 'master',
name: 'real-time'
},
{
name: 'document-updater',
repo: 'https://github.com/sharelatex/document-updater-sharelatex.git',
version: 'master',
name: 'document-updater'
},
{
name: 'clsi',
repo: 'https://github.com/sharelatex/clsi-sharelatex.git',
version: 'master',
name: 'clsi'
},
{
name: 'filestore',
repo: 'https://github.com/sharelatex/filestore-sharelatex.git',
version: 'master',
name: 'filestore'
},
{
name: 'track-changes',
repo: 'https://github.com/sharelatex/track-changes-sharelatex.git',
version: 'master',
name: 'track-changes'
},
{
name: 'docstore',
repo: 'https://github.com/sharelatex/docstore-sharelatex.git',
version: 'master',
name: 'docstore'
},
{
name: 'chat',
repo: 'https://github.com/sharelatex/chat-sharelatex.git',
version: 'master',
name: 'chat'
},
{
name: 'spelling',
repo: 'https://github.com/sharelatex/spelling-sharelatex.git',
version: 'master',
name: 'spelling'
},
{
name: 'contacts',
repo: 'https://github.com/sharelatex/contacts-sharelatex.git',
version: 'master',
name: 'contacts'
},
{
name: 'notifications',
repo: 'https://github.com/sharelatex/notifications-sharelatex.git',
version: 'master',
name: 'notifications'
},
{
name: 'project-history'
},
{
name: 'history-v1'
},
]

View file

@ -273,9 +273,6 @@ const settings = {
user: httpAuthUser,
pass: httpAuthPass,
},
project_history: {
enabled: false,
},
},
references: {},
notifications: undefined,

View file

@ -20,6 +20,7 @@ const swaggerDoc = require('./api/swagger')
const security = require('./api/app/security')
const healthChecks = require('./api/controllers/health_checks')
const { mongodb, loadGlobalBlobs } = require('./storage')
const path = require('path')
const app = express()
module.exports = app
@ -64,7 +65,7 @@ function setupSwagger() {
app.use(middleware.swaggerValidator())
app.use(
middleware.swaggerRouter({
controllers: './api/controllers',
controllers: path.join(__dirname, 'api/controllers'),
useStubs: app.get('env') === 'development',
})
)

View file

@ -0,0 +1,30 @@
{
"persistor": {
"s3": {
"endpoint": "http://s3:8080",
"pathStyle": "true"
}
},
"blobStore": {
"globalBucket": "overleaf-blobs",
"projectBucket": "overleaf-project-blobs"
},
"chunkStore": {
"bucket": "overleaf-chunks"
},
"zipStore": {
"bucket": "overleaf-zips"
},
"analytics": {
"bucket": "overleaf-analytics"
},
"useDeleteObjects": "false",
"basicHttpAuth": {
"password": "password"
},
"jwtAuth": {
"key": "secureKey",
"algorithm": "HS256"
},
"mongo": {}
}