mirror of
https://github.com/YunoHost-Apps/overleaf_ynh.git
synced 2024-09-03 19:56:27 +02:00
revert to Overleaf < 5.0 (not yet released) + minor tweaks and adjustments
This commit is contained in:
parent
8ed3f7d88b
commit
998358f1c4
7 changed files with 157 additions and 140 deletions
198
conf/settings.js
198
conf/settings.js
|
@ -18,12 +18,10 @@ const Path = require('path')
|
|||
|
||||
// These credentials are used for authenticating api requests
|
||||
// between services that may need to go over public channels
|
||||
const httpAuthUser = process.env.WEB_API_USER
|
||||
const httpAuthUser = 'sharelatex'
|
||||
const httpAuthPass = process.env.WEB_API_PASSWORD
|
||||
const httpAuthUsers = {}
|
||||
if (httpAuthUser && httpAuthPass) {
|
||||
httpAuthUsers[httpAuthUser] = httpAuthPass
|
||||
}
|
||||
httpAuthUsers[httpAuthUser] = httpAuthPass
|
||||
|
||||
const parse = function (option) {
|
||||
if (option != null) {
|
||||
|
@ -57,30 +55,30 @@ const settings = {
|
|||
port: __PORT__,
|
||||
|
||||
allowAnonymousReadAndWriteSharing:
|
||||
process.env.OVERLEAF_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING === 'true',
|
||||
process.env.SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING === 'true',
|
||||
|
||||
// Databases
|
||||
// ---------
|
||||
|
||||
// Overleaf Community Edition's main persistent data store is MongoDB (http://www.mongodb.org/)
|
||||
// ShareLaTeX's main persistent 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: process.env.OVERLEAF_MONGO_URL || 'mongodb://dockerhost/sharelatex',
|
||||
url: process.env.SHARELATEX_MONGO_URL || 'mongodb://dockerhost/sharelatex',
|
||||
},
|
||||
|
||||
// Redis is used in Overleaf Community Edition for high volume queries, like real-time
|
||||
// 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: (redisConfig = {
|
||||
host: process.env.OVERLEAF_REDIS_HOST || 'dockerhost',
|
||||
port: process.env.OVERLEAF_REDIS_PORT || '6379',
|
||||
password: process.env.OVERLEAF_REDIS_PASS || undefined,
|
||||
host: process.env.SHARELATEX_REDIS_HOST || 'dockerhost',
|
||||
port: process.env.SHARELATEX_REDIS_PORT || '6379',
|
||||
password: process.env.SHARELATEX_REDIS_PASS || undefined,
|
||||
key_schema: {
|
||||
// document-updater
|
||||
blockingKey({ doc_id }) {
|
||||
|
@ -179,35 +177,35 @@ const settings = {
|
|||
// Server Config
|
||||
// -------------
|
||||
|
||||
// Where your instance of Overleaf Community Edition can be found publicly. This is used
|
||||
// Where your instance of ShareLaTeX can be found publicly. This is used
|
||||
// when emails are sent out and in generated links:
|
||||
siteUrl: (siteUrl = process.env.OVERLEAF_SITE_URL || 'http://localhost'),
|
||||
siteUrl: (siteUrl = process.env.SHARELATEX_SITE_URL || 'http://localhost'),
|
||||
|
||||
// Status page URL as displayed on the maintenance/500 pages.
|
||||
statusPageUrl: process.env.OVERLEAF_STATUS_PAGE_URL,
|
||||
statusPageUrl: process.env.SHARELATEX_STATUS_PAGE_URL,
|
||||
|
||||
// The name this is used to describe your Overleaf Community Edition Installation
|
||||
appName: process.env.OVERLEAF_APP_NAME || 'Overleaf Community Edition',
|
||||
// The name this is used to describe your ShareLaTeX Installation
|
||||
appName: process.env.SHARELATEX_APP_NAME || 'ShareLaTeX (Community Edition)',
|
||||
|
||||
restrictInvitesToExistingAccounts:
|
||||
process.env.OVERLEAF_RESTRICT_INVITES_TO_EXISTING_ACCOUNTS === 'true',
|
||||
process.env.SHARELATEX_RESTRICT_INVITES_TO_EXISTING_ACCOUNTS === 'true',
|
||||
|
||||
nav: {
|
||||
title:
|
||||
process.env.OVERLEAF_NAV_TITLE ||
|
||||
process.env.OVERLEAF_APP_NAME ||
|
||||
'Overleaf Community Edition',
|
||||
process.env.SHARELATEX_NAV_TITLE ||
|
||||
process.env.SHARELATEX_APP_NAME ||
|
||||
'ShareLaTeX Community Edition',
|
||||
},
|
||||
|
||||
// The email address which users will be directed to as the main point of
|
||||
// contact for this installation of Overleaf Community Edition.
|
||||
adminEmail: process.env.OVERLEAF_ADMIN_EMAIL || 'placeholder@example.com',
|
||||
// contact for this installation of ShareLaTeX.
|
||||
adminEmail: process.env.SHARELATEX_ADMIN_EMAIL || 'placeholder@example.com',
|
||||
|
||||
// If provided, a sessionSecret is used to sign cookies so that they cannot be
|
||||
// spoofed. This is recommended.
|
||||
security: {
|
||||
sessionSecret:
|
||||
process.env.OVERLEAF_SESSION_SECRET || process.env.CRYPTO_RANDOM,
|
||||
process.env.SHARELATEX_SESSION_SECRET || process.env.CRYPTO_RANDOM,
|
||||
},
|
||||
|
||||
// These credentials are used for authenticating api requests
|
||||
|
@ -222,36 +220,36 @@ const settings = {
|
|||
// but should be set to true in production.
|
||||
cacheStaticAssets: true,
|
||||
|
||||
// If you are running Overleaf Community Edition over https, set this to true to send the
|
||||
// If you are running ShareLaTeX over https, set this to true to send the
|
||||
// cookie with a secure flag (recommended).
|
||||
secureCookie: process.env.OVERLEAF_SECURE_COOKIE != null,
|
||||
secureCookie: process.env.SHARELATEX_SECURE_COOKIE != null,
|
||||
|
||||
// If you are running Overleaf Community Edition behind a proxy (like Apache, Nginx, etc)
|
||||
// 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: process.env.OVERLEAF_BEHIND_PROXY || false,
|
||||
trustedProxyIps: process.env.OVERLEAF_TRUSTED_PROXY_IPS,
|
||||
behindProxy: process.env.SHARELATEX_BEHIND_PROXY || false,
|
||||
trustedProxyIps: process.env.SHARELATEX_TRUSTED_PROXY_IPS,
|
||||
|
||||
// The amount of time, in milliseconds, until the (rolling) cookie session expires
|
||||
cookieSessionLength: parseInt(
|
||||
process.env.OVERLEAF_COOKIE_SESSION_LENGTH || 5 * 24 * 60 * 60 * 1000, // default 5 days
|
||||
process.env.SHARELATEX_COOKIE_SESSION_LENGTH || 5 * 24 * 60 * 60 * 1000, // default 5 days
|
||||
10
|
||||
),
|
||||
|
||||
redisLockTTLSeconds: parseInt(
|
||||
process.env.OVERLEAF_REDIS_LOCK_TTL_SECONDS || '60',
|
||||
process.env.SHARELATEX_REDIS_LOCK_TTL_SECONDS || '60',
|
||||
10
|
||||
),
|
||||
|
||||
i18n: {
|
||||
subdomainLang: {
|
||||
www: {
|
||||
lngCode: process.env.OVERLEAF_SITE_LANGUAGE || 'en',
|
||||
lngCode: process.env.SHARELATEX_SITE_LANGUAGE || 'en',
|
||||
url: siteUrl,
|
||||
},
|
||||
},
|
||||
defaultLng: process.env.OVERLEAF_SITE_LANGUAGE || 'en',
|
||||
defaultLng: process.env.SHARELATEX_SITE_LANGUAGE || 'en',
|
||||
},
|
||||
|
||||
currentImageName: process.env.TEX_LIVE_DOCKER_IMAGE,
|
||||
|
@ -271,7 +269,7 @@ const settings = {
|
|||
user: 'staging',
|
||||
pass: process.env.STAGING_PASSWORD,
|
||||
requestTimeout: parseInt(
|
||||
process.env.OVERLEAF_HISTORY_V1_HTTP_REQUEST_TIMEOUT || '300000', // default is 5min
|
||||
process.env.SHARELATEX_HISTORY_V1_HTTP_REQUEST_TIMEOUT || '300000', // default is 5min
|
||||
10
|
||||
),
|
||||
},
|
||||
|
@ -293,35 +291,48 @@ const settings = {
|
|||
|
||||
// # OPTIONAL CONFIGURABLE SETTINGS
|
||||
|
||||
if (process.env.OVERLEAF_LEFT_FOOTER != null) {
|
||||
if (process.env.SHARELATEX_LEFT_FOOTER != null) {
|
||||
try {
|
||||
settings.nav.left_footer = JSON.parse(process.env.OVERLEAF_LEFT_FOOTER)
|
||||
settings.nav.left_footer = JSON.parse(process.env.SHARELATEX_LEFT_FOOTER)
|
||||
} catch (error) {
|
||||
e = error
|
||||
console.error('could not parse OVERLEAF_LEFT_FOOTER, not valid JSON')
|
||||
console.error('could not parse SHARELATEX_LEFT_FOOTER, not valid JSON')
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.OVERLEAF_RIGHT_FOOTER != null) {
|
||||
settings.nav.right_footer = process.env.OVERLEAF_RIGHT_FOOTER
|
||||
if (process.env.SHARELATEX_RIGHT_FOOTER != null) {
|
||||
settings.nav.right_footer = process.env.SHARELATEX_RIGHT_FOOTER
|
||||
try {
|
||||
settings.nav.right_footer = JSON.parse(process.env.OVERLEAF_RIGHT_FOOTER)
|
||||
settings.nav.right_footer = JSON.parse(process.env.SHARELATEX_RIGHT_FOOTER)
|
||||
} catch (error1) {
|
||||
e = error1
|
||||
console.error('could not parse OVERLEAF_RIGHT_FOOTER, not valid JSON')
|
||||
console.error('could not parse SHARELATEX_RIGHT_FOOTER, not valid JSON')
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.OVERLEAF_HEADER_IMAGE_URL != null) {
|
||||
settings.nav.custom_logo = process.env.OVERLEAF_HEADER_IMAGE_URL
|
||||
if (process.env.SHARELATEX_HEADER_IMAGE_URL != null) {
|
||||
settings.nav.custom_logo = process.env.SHARELATEX_HEADER_IMAGE_URL
|
||||
}
|
||||
|
||||
if (process.env.OVERLEAF_HEADER_EXTRAS != null) {
|
||||
if (process.env.SHARELATEX_HEADER_NAV_LINKS != null) {
|
||||
console.error(`\
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||
#
|
||||
# WARNING: SHARELATEX_HEADER_NAV_LINKS is no longer supported
|
||||
# See https://github.com/sharelatex/sharelatex/wiki/Configuring-Headers,-Footers-&-Logo
|
||||
#
|
||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\
|
||||
`)
|
||||
}
|
||||
|
||||
if (process.env.SHARELATEX_HEADER_EXTRAS != null) {
|
||||
try {
|
||||
settings.nav.header_extras = JSON.parse(process.env.OVERLEAF_HEADER_EXTRAS)
|
||||
settings.nav.header_extras = JSON.parse(
|
||||
process.env.SHARELATEX_HEADER_EXTRAS
|
||||
)
|
||||
} catch (error2) {
|
||||
e = error2
|
||||
console.error('could not parse OVERLEAF_HEADER_EXTRAS, not valid JSON')
|
||||
console.error('could not parse SHARELATEX_HEADER_EXTRAS, not valid JSON')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -329,63 +340,64 @@ if (process.env.OVERLEAF_HEADER_EXTRAS != null) {
|
|||
// -------------
|
||||
//
|
||||
// You must configure a mail server to be able to send invite emails from
|
||||
// Overleaf Community Edition. The config settings are passed to nodemailer. See the nodemailer
|
||||
// ShareLaTeX. The config settings are passed to nodemailer. See the nodemailer
|
||||
// documentation for available options:
|
||||
//
|
||||
// http://www.nodemailer.com/docs/transports
|
||||
|
||||
if (process.env.OVERLEAF_EMAIL_FROM_ADDRESS != null) {
|
||||
if (process.env.SHARELATEX_EMAIL_FROM_ADDRESS != null) {
|
||||
settings.email = {
|
||||
fromAddress: process.env.OVERLEAF_EMAIL_FROM_ADDRESS,
|
||||
replyTo: process.env.OVERLEAF_EMAIL_REPLY_TO || '',
|
||||
driver: process.env.OVERLEAF_EMAIL_DRIVER,
|
||||
fromAddress: process.env.SHARELATEX_EMAIL_FROM_ADDRESS,
|
||||
replyTo: process.env.SHARELATEX_EMAIL_REPLY_TO || '',
|
||||
driver: process.env.SHARELATEX_EMAIL_DRIVER,
|
||||
parameters: {
|
||||
// AWS Creds
|
||||
AWSAccessKeyID: process.env.OVERLEAF_EMAIL_AWS_SES_ACCESS_KEY_ID,
|
||||
AWSSecretKey: process.env.OVERLEAF_EMAIL_AWS_SES_SECRET_KEY,
|
||||
AWSAccessKeyID: process.env.SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID,
|
||||
AWSSecretKey: process.env.SHARELATEX_EMAIL_AWS_SES_SECRET_KEY,
|
||||
|
||||
// SMTP Creds
|
||||
host: process.env.OVERLEAF_EMAIL_SMTP_HOST,
|
||||
port: process.env.OVERLEAF_EMAIL_SMTP_PORT,
|
||||
secure: parse(process.env.OVERLEAF_EMAIL_SMTP_SECURE),
|
||||
ignoreTLS: parse(process.env.OVERLEAF_EMAIL_SMTP_IGNORE_TLS),
|
||||
name: process.env.OVERLEAF_EMAIL_SMTP_NAME,
|
||||
logger: process.env.OVERLEAF_EMAIL_SMTP_LOGGER === 'true',
|
||||
host: process.env.SHARELATEX_EMAIL_SMTP_HOST,
|
||||
port: process.env.SHARELATEX_EMAIL_SMTP_PORT,
|
||||
secure: parse(process.env.SHARELATEX_EMAIL_SMTP_SECURE),
|
||||
ignoreTLS: parse(process.env.SHARELATEX_EMAIL_SMTP_IGNORE_TLS),
|
||||
name: process.env.SHARELATEX_EMAIL_SMTP_NAME,
|
||||
logger: process.env.SHARELATEX_EMAIL_SMTP_LOGGER === 'true',
|
||||
},
|
||||
|
||||
textEncoding: process.env.OVERLEAF_EMAIL_TEXT_ENCODING,
|
||||
textEncoding: process.env.SHARELATEX_EMAIL_TEXT_ENCODING,
|
||||
template: {
|
||||
customFooter: process.env.OVERLEAF_CUSTOM_EMAIL_FOOTER,
|
||||
customFooter: process.env.SHARELATEX_CUSTOM_EMAIL_FOOTER,
|
||||
},
|
||||
}
|
||||
|
||||
if (process.env.OVERLEAF_EMAIL_AWS_SES_REGION != null) {
|
||||
settings.email.parameters.region = process.env.OVERLEAF_EMAIL_AWS_SES_REGION
|
||||
if (process.env.SHARELATEX_EMAIL_AWS_SES_REGION != null) {
|
||||
settings.email.parameters.region =
|
||||
process.env.SHARELATEX_EMAIL_AWS_SES_REGION
|
||||
}
|
||||
|
||||
if (
|
||||
process.env.OVERLEAF_EMAIL_SMTP_USER != null ||
|
||||
process.env.OVERLEAF_EMAIL_SMTP_PASS != null
|
||||
process.env.SHARELATEX_EMAIL_SMTP_USER != null ||
|
||||
process.env.SHARELATEX_EMAIL_SMTP_PASS != null
|
||||
) {
|
||||
settings.email.parameters.auth = {
|
||||
user: process.env.OVERLEAF_EMAIL_SMTP_USER,
|
||||
pass: process.env.OVERLEAF_EMAIL_SMTP_PASS,
|
||||
user: process.env.SHARELATEX_EMAIL_SMTP_USER,
|
||||
pass: process.env.SHARELATEX_EMAIL_SMTP_PASS,
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH != null) {
|
||||
if (process.env.SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH != null) {
|
||||
settings.email.parameters.tls = {
|
||||
rejectUnauthorized: parse(
|
||||
process.env.OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH
|
||||
process.env.SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// i18n
|
||||
if (process.env.OVERLEAF_LANG_DOMAIN_MAPPING != null) {
|
||||
if (process.env.SHARELATEX_LANG_DOMAIN_MAPPING != null) {
|
||||
settings.i18n.subdomainLang = parse(
|
||||
process.env.OVERLEAF_LANG_DOMAIN_MAPPING
|
||||
process.env.SHARELATEX_LANG_DOMAIN_MAPPING
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -394,24 +406,24 @@ if (process.env.OVERLEAF_LANG_DOMAIN_MAPPING != null) {
|
|||
// These restrict the passwords users can use when registering
|
||||
// opts are from http://antelle.github.io/passfield
|
||||
if (
|
||||
process.env.OVERLEAF_PASSWORD_VALIDATION_PATTERN ||
|
||||
process.env.OVERLEAF_PASSWORD_VALIDATION_MIN_LENGTH ||
|
||||
process.env.OVERLEAF_PASSWORD_VALIDATION_MAX_LENGTH
|
||||
process.env.SHARELATEX_PASSWORD_VALIDATION_PATTERN ||
|
||||
process.env.SHARELATEX_PASSWORD_VALIDATION_MIN_LENGTH ||
|
||||
process.env.SHARELATEX_PASSWORD_VALIDATION_MAX_LENGTH
|
||||
) {
|
||||
settings.passwordStrengthOptions = {
|
||||
pattern: process.env.OVERLEAF_PASSWORD_VALIDATION_PATTERN || 'aA$3',
|
||||
pattern: process.env.SHARELATEX_PASSWORD_VALIDATION_PATTERN || 'aA$3',
|
||||
length: {
|
||||
min: process.env.OVERLEAF_PASSWORD_VALIDATION_MIN_LENGTH || 8,
|
||||
max: process.env.OVERLEAF_PASSWORD_VALIDATION_MAX_LENGTH || 72,
|
||||
min: process.env.SHARELATEX_PASSWORD_VALIDATION_MIN_LENGTH || 8,
|
||||
max: process.env.SHARELATEX_PASSWORD_VALIDATION_MAX_LENGTH || 72,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ######################
|
||||
// Overleaf Server Pro
|
||||
// ShareLaTeX Server Pro
|
||||
// ######################
|
||||
|
||||
if (parse(process.env.OVERLEAF_IS_SERVER_PRO) === true) {
|
||||
if (parse(process.env.SHARELATEX_IS_SERVER_PRO) === true) {
|
||||
settings.bypassPercentageRollouts = true
|
||||
settings.apis.references = { url: 'http://localhost:3040' }
|
||||
}
|
||||
|
@ -452,21 +464,21 @@ if (process.env.SANDBOXED_COMPILES === 'true') {
|
|||
|
||||
// Templates
|
||||
// ---------
|
||||
if (process.env.OVERLEAF_TEMPLATES_USER_ID) {
|
||||
if (process.env.SHARELATEX_TEMPLATES_USER_ID) {
|
||||
settings.templates = {
|
||||
mountPointUrl: '/templates',
|
||||
user_id: process.env.OVERLEAF_TEMPLATES_USER_ID,
|
||||
user_id: process.env.SHARELATEX_TEMPLATES_USER_ID,
|
||||
}
|
||||
|
||||
settings.templateLinks = parse(
|
||||
process.env.OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS
|
||||
process.env.SHARELATEX_NEW_PROJECT_TEMPLATE_LINKS
|
||||
)
|
||||
}
|
||||
|
||||
// /Learn
|
||||
// -------
|
||||
if (process.env.OVERLEAF_PROXY_LEARN != null) {
|
||||
settings.proxyLearn = parse(process.env.OVERLEAF_PROXY_LEARN)
|
||||
if (process.env.SHARELATEX_PROXY_LEARN != null) {
|
||||
settings.proxyLearn = parse(process.env.SHARELATEX_PROXY_LEARN)
|
||||
if (settings.proxyLearn) {
|
||||
settings.nav.header_extras = [
|
||||
{
|
||||
|
@ -479,33 +491,33 @@ if (process.env.OVERLEAF_PROXY_LEARN != null) {
|
|||
|
||||
// /References
|
||||
// -----------
|
||||
if (process.env.OVERLEAF_ELASTICSEARCH_URL != null) {
|
||||
if (process.env.SHARELATEX_ELASTICSEARCH_URL != null) {
|
||||
settings.references.elasticsearch = {
|
||||
host: process.env.OVERLEAF_ELASTICSEARCH_URL,
|
||||
host: process.env.SHARELATEX_ELASTICSEARCH_URL,
|
||||
}
|
||||
}
|
||||
|
||||
// filestore
|
||||
switch (process.env.OVERLEAF_FILESTORE_BACKEND) {
|
||||
switch (process.env.SHARELATEX_FILESTORE_BACKEND) {
|
||||
case 's3':
|
||||
settings.filestore = {
|
||||
backend: 's3',
|
||||
stores: {
|
||||
user_files: process.env.OVERLEAF_FILESTORE_USER_FILES_BUCKET_NAME,
|
||||
user_files: process.env.SHARELATEX_FILESTORE_USER_FILES_BUCKET_NAME,
|
||||
template_files:
|
||||
process.env.OVERLEAF_FILESTORE_TEMPLATE_FILES_BUCKET_NAME,
|
||||
process.env.SHARELATEX_FILESTORE_TEMPLATE_FILES_BUCKET_NAME,
|
||||
},
|
||||
s3: {
|
||||
key:
|
||||
process.env.OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID ||
|
||||
process.env.SHARELATEX_FILESTORE_S3_ACCESS_KEY_ID ||
|
||||
process.env.AWS_ACCESS_KEY_ID,
|
||||
secret:
|
||||
process.env.OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY ||
|
||||
process.env.SHARELATEX_FILESTORE_S3_SECRET_ACCESS_KEY ||
|
||||
process.env.AWS_SECRET_ACCESS_KEY,
|
||||
endpoint: process.env.OVERLEAF_FILESTORE_S3_ENDPOINT,
|
||||
pathStyle: process.env.OVERLEAF_FILESTORE_S3_PATH_STYLE === 'true',
|
||||
endpoint: process.env.SHARELATEX_FILESTORE_S3_ENDPOINT,
|
||||
pathStyle: process.env.SHARELATEX_FILESTORE_S3_PATH_STYLE === 'true',
|
||||
region:
|
||||
process.env.OVERLEAF_FILESTORE_S3_REGION ||
|
||||
process.env.SHARELATEX_FILESTORE_S3_REGION ||
|
||||
process.env.AWS_DEFAULT_REGION,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
OVERLEAF_APP_NAME="YunoHost Overleaf Community Edition"
|
||||
OVERLEAF_PORT=__PORT__
|
||||
SHARELATEX_APP_NAME="YunoHost Overleaf Community Edition"
|
||||
SHARELATEX_PORT=__PORT__
|
||||
|
||||
OVERLEAF_CONFIG="__INSTALL_DIR__/settings.js"
|
||||
SHARELATEX_CONFIG="__INSTALL_DIR__/settings.js"
|
||||
ADMIN_PRIVILEGE_AVAILABLE=true
|
||||
OPTIMISE_PDF=true
|
||||
NODE_ENV=production
|
||||
|
@ -11,19 +11,19 @@ WEB_API_USER="__APP__"
|
|||
WEB_API_PASSWORD=__WEB_API_PASSWORD__
|
||||
CRYPTO_RANDOM=__CRYPTO_RANDOM__
|
||||
|
||||
OVERLEAF_MONGO_URL="mongodb://127.0.0.1:27017/__DB_NAME__"
|
||||
SHARELATEX_MONGO_URL="mongodb://127.0.0.1:27017/__DB_NAME__"
|
||||
|
||||
OVERLEAF_REDIS_HOST="localhost"
|
||||
SHARELATEX_REDIS_HOST="localhost"
|
||||
|
||||
REDIS_HOST="localhost"
|
||||
REDIS_PORT=6379
|
||||
|
||||
OVERLEAF_SITE_LANGUAGE="__LANGUAGE__"
|
||||
SHARELATEX_SITE_LANGUAGE="__LANGUAGE__"
|
||||
|
||||
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
|
||||
|
||||
OVERLEAF_ALLOW_PUBLIC_ACCESS=true
|
||||
OVERLEAF_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING=true
|
||||
SHARELATEX_ALLOW_PUBLIC_ACCESS=true
|
||||
SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING=true
|
||||
|
||||
# Enables Thumbnail generation using ImageMagick
|
||||
ENABLE_CONVERSIONS=true
|
||||
|
@ -40,32 +40,32 @@ TEXMFVAR=__INSTALL_DIR__/tmp/texmf-var
|
|||
# NGINX_WORKER_CONNECTIONS=768
|
||||
|
||||
## Set for TLS via nginx-proxy
|
||||
OVERLEAF_BEHIND_PROXY=true
|
||||
OVERLEAF_SECURE_COOKIE=false
|
||||
SHARELATEX_BEHIND_PROXY=true
|
||||
SHARELATEX_SECURE_COOKIE=false
|
||||
|
||||
OVERLEAF_SITE_URL=https://__DOMAIN__
|
||||
# OVERLEAF_NAV_TITLE=Our Overleaf Instance
|
||||
# OVERLEAF_HEADER_IMAGE_URL=http://somewhere.com/mylogo.png
|
||||
OVERLEAF_ADMIN_EMAIL=__APP__@__DOMAIN__
|
||||
SHARELATEX_SITE_URL=https://__DOMAIN__
|
||||
# SHARELATEX_NAV_TITLE=Our Overleaf Instance
|
||||
# SHARELATEX_HEADER_IMAGE_URL=http://somewhere.com/mylogo.png
|
||||
SHARELATEX_ADMIN_EMAIL=__APP__@__DOMAIN__
|
||||
|
||||
# OVERLEAF_LEFT_FOOTER=[{"text":"Powered by Overleaf © 2021", "url": "https://www.overleaf.com"}, {"text": "Contact your support team", "url": "mailto:support@example.com"} ]
|
||||
# OVERLEAF_RIGHT_FOOTER=[{"text":"Hello I am on the Right"}]
|
||||
# SHARELATEX_LEFT_FOOTER=[{"text":"Powered by Overleaf © 2021", "url": "https://www.overleaf.com"}, {"text": "Contact your support team", "url": "mailto:support@example.com"} ]
|
||||
# SHARELATEX_RIGHT_FOOTER=[{"text":"Hello I am on the Right"}]
|
||||
|
||||
OVERLEAF_EMAIL_FROM_ADDRESS=__APP__@__DOMAIN__
|
||||
SHARELATEX_EMAIL_FROM_ADDRESS=__APP__@__DOMAIN__
|
||||
|
||||
# OVERLEAF_EMAIL_AWS_SES_ACCESS_KEY_ID=
|
||||
# OVERLEAF_EMAIL_AWS_SES_SECRET_KEY=
|
||||
# SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID=
|
||||
# SHARELATEX_EMAIL_AWS_SES_SECRET_KEY=
|
||||
|
||||
OVERLEAF_EMAIL_SMTP_HOST=__MAIN_DOMAIN__
|
||||
OVERLEAF_EMAIL_SMTP_PORT=587
|
||||
# OVERLEAF_EMAIL_SMTP_SECURE=true
|
||||
OVERLEAF_EMAIL_SMTP_USER=__APP__
|
||||
OVERLEAF_EMAIL_SMTP_PASS=__MAIL_PWD__
|
||||
OVERLEAF_EMAIL_SMTP_NAME=__APP__@__DOMAIN__
|
||||
# OVERLEAF_EMAIL_SMTP_LOGGER=false
|
||||
# OVERLEAF_EMAIL_SMTP_TLS_REJECT_UNAUTH=true
|
||||
# OVERLEAF_EMAIL_SMTP_IGNORE_TLS=false
|
||||
# OVERLEAF_CUSTOM_EMAIL_FOOTER=This system is run by department x
|
||||
SHARELATEX_EMAIL_SMTP_HOST=__MAIN_DOMAIN__
|
||||
SHARELATEX_EMAIL_SMTP_PORT=587
|
||||
# SHARELATEX_EMAIL_SMTP_SECURE=true
|
||||
SHARELATEX_EMAIL_SMTP_USER=__APP__
|
||||
SHARELATEX_EMAIL_SMTP_PASS=__MAIL_PWD__
|
||||
SHARELATEX_EMAIL_SMTP_NAME=__APP__@__DOMAIN__
|
||||
# SHARELATEX_EMAIL_SMTP_LOGGER=false
|
||||
# SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH=true
|
||||
# SHARELATEX_EMAIL_SMTP_IGNORE_TLS=false
|
||||
# SHARELATEX_CUSTOM_EMAIL_FOOTER=This system is run by department x
|
||||
|
||||
OT_JWT_AUTH_KEY=__JWT_KEY__
|
||||
|
||||
|
@ -83,20 +83,20 @@ OT_JWT_AUTH_KEY=__JWT_KEY__
|
|||
#LDAP_CONTACTS=false
|
||||
|
||||
# EXTERNAL_AUTH=ldap
|
||||
# OVERLEAF_LDAP_URL=ldap://localhost:389
|
||||
# OVERLEAF_LDAP_SEARCH_BASE=ou=users,dc=yunohost,dc=org
|
||||
# OVERLEAF_LDAP_SEARCH_FILTER="(uid={{username}})"
|
||||
# OVERLEAF_LDAP_BIND_DN=''
|
||||
# OVERLEAF_LDAP_BIND_CREDENTIALS=''
|
||||
# OVERLEAF_LDAP_EMAIL_ATT=mail
|
||||
# OVERLEAF_LDAP_NAME_ATT=cn
|
||||
# OVERLEAF_LDAP_LAST_NAME_ATT=sn
|
||||
# OVERLEAF_LDAP_UPDATE_USER_DETAILS_ON_LOGIN=true
|
||||
# SHARELATEX_LDAP_URL=ldap://localhost:389
|
||||
# SHARELATEX_LDAP_SEARCH_BASE=ou=users,dc=yunohost,dc=org
|
||||
# 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
|
||||
|
||||
# OVERLEAF_TEMPLATES_USER_ID=578773160210479700917ee5
|
||||
# OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS=[{"name":"All Templates","url":"/templates/all"}]
|
||||
# SHARELATEX_TEMPLATES_USER_ID=578773160210479700917ee5
|
||||
# SHARELATEX_NEW_PROJECT_TEMPLATE_LINKS=[{"name":"All Templates","url":"/templates/all"}]
|
||||
|
||||
# TEX_LIVE_DOCKER_IMAGE=quay.io/sharelatex/texlive-full:2021.1
|
||||
# ALL_TEX_LIVE_DOCKER_IMAGES=quay.io/sharelatex/texlive-full:2021.1,quay.io/sharelatex/texlive-full:2020.1
|
||||
|
||||
# OVERLEAF_PROXY_LEARN=true
|
||||
# SHARELATEX_PROXY_LEARN=true
|
|
@ -7,7 +7,7 @@ name = "Overleaf"
|
|||
description.en = "Online real-time collaborative LaTeX editor"
|
||||
description.fr = "Éditeur LaTeX collaboratif en ligne et en temps réel"
|
||||
|
||||
version = "2024.02.16~ynh1"
|
||||
version = "2024.01.26~ynh1"
|
||||
|
||||
maintainers = []
|
||||
|
||||
|
@ -51,9 +51,9 @@ ram.runtime = "3G"
|
|||
[resources]
|
||||
[resources.sources]
|
||||
[resources.sources.main]
|
||||
url = "https://github.com/overleaf/overleaf/archive/c473527bd85a18fc6570be2cee8070c0729ed879.tar.gz"
|
||||
sha256 = "f98f44a283b950ff3e406f140b0d072888adaaf02f01c59179dd1345bd557934"
|
||||
autoupdate.stategy = "latest_github_commit"
|
||||
url = "https://github.com/overleaf/overleaf/archive/fdf8ebe001ec91dc3ab5c23b47bbbb03dc03d1bb.tar.gz"
|
||||
sha256 = "802e3c0add7690c211fc039f94e1fceffe83040e7e60b0c340f35703087f1704"
|
||||
autoupdate.strategy = "latest_github_commit"
|
||||
|
||||
[resources.system_user]
|
||||
allow_email = true
|
||||
|
@ -78,6 +78,7 @@ ram.runtime = "3G"
|
|||
packages = [
|
||||
# Overleaf dependencies
|
||||
"texlive", "texlive-xetex", "texlive-base", "texlive-font-utils", "redis-server", "latexmk", "python3-pygments",
|
||||
|
||||
# Aspell dependencies
|
||||
"aspell-ar", "aspell-ar-large",
|
||||
"aspell-bg", "aspell-br", "aspell-ca", "aspell-cs", "aspell-cy", "aspell-da", "aspell-de", "aspell-de-1901",
|
||||
|
@ -92,4 +93,4 @@ ram.runtime = "3G"
|
|||
|
||||
# clsi dependencies
|
||||
"poppler-utils",
|
||||
]
|
||||
]
|
|
@ -53,6 +53,7 @@ ynh_mongo_setup_db --db_user=$db_user --db_name=$db_name
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring MongoDB..." --weight=10
|
||||
|
||||
ynh_replace_string --match_string="# engine:" --replace_string=" engine: wiredTiger" --target_file="/etc/mongod.conf"
|
||||
ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs0" --target_file="/etc/mongod.conf"
|
||||
|
||||
ynh_exec_warn_less systemctl enable mongod --quiet
|
||||
|
@ -224,4 +225,4 @@ ynh_systemd_action --service_name="$app-web" --action="start" --log_path="/var/l
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Installation of $app completed"
|
||||
ynh_script_progression --message="Installation of $app completed"
|
|
@ -111,6 +111,7 @@ ynh_script_progression --message="Removing the MongoDB database..."
|
|||
# Remove a database if it exists, along with the associated user
|
||||
ynh_mongo_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
ynh_replace_string --match_string="engine: wiredTiger" --replace_string="# engine:" --target_file="/etc/mongod.conf"
|
||||
ynh_replace_string --match_string="replication:" --replace_string="#replication:" --target_file="/etc/mongod.conf"
|
||||
ynh_replace_string --match_string=" replSetName: rs0" --replace_string="" --target_file="/etc/mongod.conf"
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ ynh_mongo_setup_db --db_user=$db_user --db_name=$db_name
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring MongoDB..." --weight=10
|
||||
|
||||
ynh_replace_string --match_string="# engine:" --replace_string=" engine: wiredTiger" --target_file="/etc/mongod.conf"
|
||||
ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs0" --target_file="/etc/mongod.conf"
|
||||
|
||||
ynh_exec_warn_less systemctl enable mongod --quiet
|
||||
|
|
|
@ -57,6 +57,7 @@ ynh_script_progression --message="Ensuring downward compatibility..."
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring MongoDB..." --weight=10
|
||||
|
||||
ynh_replace_string --match_string="# engine:" --replace_string=" engine: wiredTiger" --target_file="/etc/mongod.conf"
|
||||
ynh_replace_string --match_string="#replication:" --replace_string="replication:\n replSetName: rs0" --target_file="/etc/mongod.conf"
|
||||
|
||||
ynh_exec_warn_less systemctl enable mongod --quiet
|
||||
|
|
Loading…
Reference in a new issue