diff --git a/conf/settings.js b/conf/settings.js index f6725bb..ed17b95 100644 --- a/conf/settings.js +++ b/conf/settings.js @@ -210,6 +210,10 @@ const settings = { process.env.OVERLEAF_SESSION_SECRET || process.env.CRYPTO_RANDOM, }, + csp: { + enabled: process.env.OVERLEAF_CSP_ENABLED !== 'false', + }, + // These credentials are used for authenticating api requests // between services that may need to go over public channels httpAuthUsers, @@ -405,76 +409,6 @@ if ( } } -// ###################### -// Overleaf Server Pro -// ###################### - -if (parse(process.env.OVERLEAF_IS_SERVER_PRO) === true) { - settings.bypassPercentageRollouts = true - settings.apis.references = { url: 'http://127.0.0.1:3040' } -} - -// Compiler -// -------- -if (process.env.SANDBOXED_COMPILES === 'true') { - settings.clsi = { - dockerRunner: true, - docker: { - image: process.env.TEX_LIVE_DOCKER_IMAGE, - env: { - HOME: '/tmp', - PATH: - process.env.COMPILER_PATH || - '/usr/local/texlive/2015/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - }, - user: 'www-data', - }, - } - - if (settings.path == null) { - settings.path = {} - } - settings.path.synctexBaseDir = () => '/compile' - if (process.env.SANDBOXED_COMPILES_SIBLING_CONTAINERS === 'true') { - console.log('Using sibling containers for sandboxed compiles') - if (process.env.SANDBOXED_COMPILES_HOST_DIR) { - settings.path.sandboxedCompilesHostDir = - process.env.SANDBOXED_COMPILES_HOST_DIR - } else { - console.error( - 'Sibling containers, but SANDBOXED_COMPILES_HOST_DIR not set' - ) - } - } -} - -// Templates -// --------- -if (process.env.OVERLEAF_TEMPLATES_USER_ID) { - settings.templates = { - mountPointUrl: '/templates', - user_id: process.env.OVERLEAF_TEMPLATES_USER_ID, - } - - settings.templateLinks = parse( - process.env.OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS - ) -} - -// /Learn -// ------- -if (process.env.OVERLEAF_PROXY_LEARN != null) { - settings.proxyLearn = parse(process.env.OVERLEAF_PROXY_LEARN) - if (settings.proxyLearn) { - settings.nav.header_extras = [ - { - url: '/learn', - text: 'documentation', - }, - ].concat(settings.nav.header_extras || []) - } -} - // /References // ----------- if (process.env.OVERLEAF_ELASTICSEARCH_URL != null) { diff --git a/conf/variables.env b/conf/variables.env index 367226c..5be306a 100644 --- a/conf/variables.env +++ b/conf/variables.env @@ -71,36 +71,4 @@ OVERLEAF_EMAIL_SMTP_NAME=__APP__@__DOMAIN__ # OVERLEAF_EMAIL_SMTP_IGNORE_TLS=false # OVERLEAF_CUSTOM_EMAIL_FOOTER=This system is run by department x -OT_JWT_AUTH_KEY=__JWT_KEY__ - -################ -## Server Pro ## -################ - -#LDAP_SERVER=ldap://localhost:389 -#LDAP_BASE=ou=users,dc=yunohost,dc=org -#LDAP_BINDDN=uid=%u,ou=users,dc=yunohost,dc=org -#LDAP_USER_FILTER='(&(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org)(uid=%u))' -#LDAP_ADMIN_GROUP_FILTER='(&(permission=cn=__APP__.admin,ou=permission,dc=yunohost,dc=org)(uid=%u))' -#ALLOW_EMAIL_LOGIN=true -#LDAP_CONTACT_FILTER='(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org)' -#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=cn=admin,dc=planetexpress,dc=com -# OVERLEAF_LDAP_BIND_CREDENTIALS=GoodNewsEveryone -# OVERLEAF_LDAP_EMAIL_ATT=mail -# OVERLEAF_LDAP_NAME_ATT=cn -# OVERLEAF_LDAP_LAST_NAME_ATT=sn -# OVERLEAF_LDAP_UPDATE_USER_DETAILS_ON_LOGIN=true - -# OVERLEAF_TEMPLATES_USER_ID=578773160210479700917ee5 -# OVERLEAF_NEW_PROJECT_TEMPLATE_LINKS=[{"name":"All Templates","url":"/templates/all"}] - -# TEX_LIVE_DOCKER_IMAGE=quay.io/OVERLEAF/texlive-full:2021.1 -# ALL_TEX_LIVE_DOCKER_IMAGES=quay.io/OVERLEAF/texlive-full:2021.1,quay.io/OVERLEAF/texlive-full:2020.1 - -# OVERLEAF_PROXY_LEARN=true +OT_JWT_AUTH_KEY=__JWT_KEY__ \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index aebac04..d552712 100644 --- a/manifest.toml +++ b/manifest.toml @@ -71,9 +71,40 @@ ram.runtime = "3G" admin.allowed = "admins" admin.show_tile = false - [resources.ports] + [resources.ports] #Only the web service can customize its port… main.default = 8095 + chat.default = 3010 + chat.fixed = true + + clsi.default = 3013 + clsi.fixed = true + + contacts.default = 3036 + contacts.fixed = true + + docstore.default = 3016 + docstore.fixed = true + + document-updater.default = 3003 + document-updater.fixed = true + + filestore.default = 3009 + filstore.fixed = true + + notifications.default = 3042 + notifications.fixed = true + + project-history.default = 3054 + project-history.fixed = true + + realtime.default = 3026 + realtime.fixed = true + + spelling.default = 3005 + spelling.fixed = true + + [resources.apt] packages = [ # Overleaf dependencies