Merge pull request #11782 from overleaf/jpa-server-ce-history-s3

[server-ce] s3 settings for history-v1

GitOrigin-RevId: 51d5c6b3a67339b126ccbaa61d78f3cd36377e79
This commit is contained in:
Jakob Ackermann 2023-02-10 15:57:34 +00:00 committed by Copybot
parent c7f03c1b23
commit 4e885da597
4 changed files with 59 additions and 15 deletions

View file

@ -64,6 +64,7 @@ COPY server-ce/config/settings.js /etc/sharelatex/settings.js
# Copy history-v1 files
# -----------------------
COPY server-ce/config/production.json /overleaf/services/history-v1/config/production.json
COPY server-ce/config/custom-environment-variables.json /overleaf/services/history-v1/config/custom-environment-variables.json
# Copy grunt thin wrapper
# -----------------------
@ -89,6 +90,13 @@ ENV OPTIMISE_PDF "true"
ENV SHARELATEX_FPH_INITIALIZE_NEW_PROJECTS "true"
ENV SHARELATEX_FPH_DISPLAY_NEW_PROJECTS "true"
ENV SHARELATEX_HISTORY_BACKEND "fs"
ENV SHARELATEX_HISTORY_BLOBS_BUCKET "/var/lib/sharelatex/data/history/overleaf-blobs"
ENV SHARELATEX_HISTORY_PROJECT_BLOBS_BUCKET "/var/lib/sharelatex/data/history/overleaf-project-blobs"
ENV SHARELATEX_HISTORY_CHUNKS_BUCKET "/var/lib/sharelatex/data/history/overleaf-chunks"
ENV SHARELATEX_HISTORY_ZIPS_BUCKET "/var/lib/sharelatex/data/history/overleaf-zips"
ENV SHARELATEX_HISTORY_ANALYTICS_BUCKET "/var/lib/sharelatex/data/history/overleaf-analytics"
ENV NODE_ENV "production"
ENV LOG_LEVEL "info"

View file

@ -0,0 +1,50 @@
{
"databaseUrl": "HISTORY_CONNECTION_STRING",
"herokuDatabaseUrl": "DATABASE_URL",
"databasePoolMin": "DATABASE_POOL_MIN",
"databasePoolMax": "DATABASE_POOL_MAX",
"persistor": {
"backend": "SHARELATEX_HISTORY_BACKEND",
"s3": {
"key": "SHARELATEX_HISTORY_S3_ACCESS_KEY_ID",
"secret": "SHARELATEX_HISTORY_S3_SECRET_ACCESS_KEY",
"maxRetries": "SHARELATEX_HISTORY_S3_MAX_RETRIES",
"endpoint": "SHARELATEX_HISTORY_S3_ENDPOINT",
"pathStyle": "SHARELATEX_HISTORY_S3_PATH_STYLE",
"region": "SHARELATEX_HISTORY_S3_REGION",
"httpOptions": {
"timeout": "SHARELATEX_HISTORY_S3_TIMEOUT"
}
}
},
"blobStore": {
"globalBucket": "SHARELATEX_HISTORY_BLOBS_BUCKET",
"projectBucket": "SHARELATEX_HISTORY_PROJECT_BLOBS_BUCKET"
},
"chunkStore": {
"historyStoreConcurrency": "HISTORY_STORE_CONCURRENCY",
"bucket": "SHARELATEX_HISTORY_CHUNKS_BUCKET"
},
"zipStore": {
"bucket": "SHARELATEX_HISTORY_ZIPS_BUCKET",
"zipTimeoutMs": "ZIP_STORE_ZIP_TIMEOUT_MS"
},
"analytics": {
"bucket": "SHARELATEX_HISTORY_ANALYTICS_BUCKET"
},
"mongo": {
"uri": "MONGO_CONNECTION_STRING"
},
"basicHttpAuth": {
"password": "STAGING_PASSWORD",
"oldPassword": "BASIC_HTTP_AUTH_OLD_PASSWORD"
},
"jwtAuth": {
"key": "OT_JWT_AUTH_KEY",
"oldKey": "OT_JWT_AUTH_OLD_KEY",
"algorithm": "OT_JWT_AUTH_ALG"
},
"clusterWorkers": "CLUSTER_WORKERS",
"maxFileUploadSize": "MAX_FILE_UPLOAD_SIZE",
"httpsOnly": "HTTPS_ONLY"
}

View file

@ -1,21 +1,7 @@
{
"persistor": {
"backend": "fs",
"useSubdirectories": true
},
"blobStore": {
"globalBucket": "/var/lib/sharelatex/data/history/overleaf-blobs",
"projectBucket": "/var/lib/sharelatex/data/history/overleaf-project-blobs"
},
"chunkStore": {
"bucket": "/var/lib/sharelatex/data/history/overleaf-chunks"
},
"zipStore": {
"bucket": "/var/lib/sharelatex/data/history/overleaf-zips"
},
"analytics": {
"bucket": "/var/lib/sharelatex/data/history/overleaf-analytics"
},
"basicHttpAuth": {
"password": "password"
},

View file

@ -755,7 +755,7 @@ switch (process.env.SHARELATEX_FILESTORE_BACKEND) {
process.env.AWS_ACCESS_KEY_ID,
secret:
process.env.SHARELATEX_FILESTORE_S3_SECRET_ACCESS_KEY ||
process.env.AWS_ACCESS_KEY_ID,
process.env.AWS_SECRET_ACCESS_KEY,
endpoint: process.env.SHARELATEX_FILESTORE_S3_ENDPOINT,
pathStyle: process.env.SHARELATEX_FILESTORE_S3_PATH_STYLE === 'true',
region: