Explorar o código

Cache pug templates and modules, by using production environment

James Allen %!s(int64=8) %!d(string=hai) anos
pai
achega
ba17c1da14

+ 1 - 1
services/web/config/settings.defaults.coffee

@@ -425,7 +425,7 @@ module.exports = settings =
 	redirects:
 	redirects:
 		"/templates/index": "/templates/"
 		"/templates/index": "/templates/"
 
 
-	reloadModuleViewsOnEachRequest: true
+	reloadModuleViewsOnEachRequest: process.env['NODE_ENV'] != 'production'
 
 
 	domainLicences: [
 	domainLicences: [
 
 

+ 1 - 0
services/web/docker-compose.yml

@@ -19,6 +19,7 @@ services:
       LINKED_URL_PROXY: 'http://localhost:6543'
       LINKED_URL_PROXY: 'http://localhost:6543'
       ENABLED_LINKED_FILE_TYPES: 'url,project_file,project_output_file,mendeley'
       ENABLED_LINKED_FILE_TYPES: 'url,project_file,project_output_file,mendeley'
       SHARELATEX_CONFIG: /app/test/acceptance/config/settings.test.coffee
       SHARELATEX_CONFIG: /app/test/acceptance/config/settings.test.coffee
+      NODE_ENV: production
     depends_on:
     depends_on:
       - redis
       - redis
       - mongo
       - mongo