From 85059077ed27f0c710e900372b633702a5861799 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 19 Oct 2016 11:39:40 +0100 Subject: [PATCH 1/3] added coffeescript and moved admin require to bottom of file --- Gruntfile.coffee | 6 +++++- config/services.js | 2 +- package.json | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 217e06d2f0..aca3b1cbbd 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,3 +1,4 @@ +coffee = require("coffee-script") fs = require "fs" spawn = require("child_process").spawn exec = require("child_process").exec @@ -20,7 +21,6 @@ module.exports = (grunt) -> grunt.loadNpmTasks 'grunt-concurrent' grunt.loadNpmTasks "grunt-contrib-coffee" grunt.loadNpmTasks "grunt-shell" - require('load-grunt-config')(grunt) execute = {} @@ -240,3 +240,7 @@ module.exports = (grunt) -> throw new Error("Can not connect to redis") return callback(err) rclient.on 'error', errorHandler + + + require('load-grunt-config')(grunt) + diff --git a/config/services.js b/config/services.js index 2072964383..e324b129f3 100644 --- a/config/services.js +++ b/config/services.js @@ -3,7 +3,7 @@ module.exports = [{ name: "web", repo: "https://github.com/sharelatex/web-sharelatex.git", - version: "master" + version: "ha-docker" }, { name: "real-time", repo: "https://github.com/sharelatex/real-time-sharelatex.git", diff --git a/package.json b/package.json index 851b4d8af9..3d63f4c5fa 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "An online collaborative LaTeX editor", "dependencies": { "async": "^0.9.0", + "coffee-script": "^1.11.1", "east": "0.5.1", "east-mongo": "^0.1.2", "grunt-shell": "^1.1.1", From 20a2b302b2cc51f3e8a226777e7fb79c75778b7d Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 19 Oct 2016 12:10:27 +0100 Subject: [PATCH 2/3] Update docker-compose.yml --- docker-compose.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 70ae0cdbd6..efba08f4cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,31 +18,31 @@ services: environment: SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex SHARELATEX_REDIS_HOST: redis - SHARELATEX_APP_NAME: 'Our ShareLaTeX' + SHARELATEX_APP_NAME: Our ShareLaTeX #Set for SSL via nginx-proxy #VIRTUAL_HOST: 103.112.212.22 - # SHARELATEX_SITE_URL: "http://sharelatex.mydomain.com" - # SHARELATEX_NAV_TITLE: "Our ShareLaTeX Instance" - # SHARELATEX_HEADER_IMAGE_URL: "http://somewhere.com/mylogo.png" - # SHARELATEX_ADMIN_EMAIL: "support@it.com" + # SHARELATEX_SITE_URL: http://sharelatex.mydomain.com + # SHARELATEX_NAV_TITLE: Our ShareLaTeX Instance + # SHARELATEX_HEADER_IMAGE_URL: http://somewhere.com/mylogo.png + # SHARELATEX_ADMIN_EMAIL: support@it.com # SHARELATEX_LEFT_FOOTER: '[{"text": "Powered by ShareLaTeX 2016"},{"text": "Another page I want to link to can be found here"} ]' # SHARELATEX_RIGHT_FOOTER: '[{"text": "Hello I am on the Right"} ]' # SHARELATEX_EMAIL_FROM_ADDRESS: "team@sharelatex.com" - # SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID: "" - # SHARELATEX_EMAIL_AWS_SES_SECRET_KEY: "" + # SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID: + # SHARELATEX_EMAIL_AWS_SES_SECRET_KEY: - # SHARELATEX_EMAIL_SMTP_HOST: "smtp.mydomain.com" + # SHARELATEX_EMAIL_SMTP_HOST: smtp.mydomain.com # SHARELATEX_EMAIL_SMTP_PORT: 587 - # SHARELATEX_EMAIL_SMTP_SECURE: 'false' - # SHARELATEX_EMAIL_SMTP_USER: "" - # SHARELATEX_EMAIL_SMTP_PASS: "" - # SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH: 'true' - # SHARELATEX_EMAIL_SMTP_IGNORE_TLS: 'false' + # SHARELATEX_EMAIL_SMTP_SECURE: false + # SHARELATEX_EMAIL_SMTP_USER: + # SHARELATEX_EMAIL_SMTP_PASS: + # SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH: true + # SHARELATEX_EMAIL_SMTP_IGNORE_TLS: false # SHARELATEX_CUSTOM_EMAIL_FOOTER:"
This system is run by department x
" ################ From 59f312fb16b8b94527b0dc8cc04f94c0ab4d2153 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 3 Nov 2016 10:59:17 +0000 Subject: [PATCH 3/3] comment out project size for test --- grunt/ProjectSize.coffee | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/grunt/ProjectSize.coffee b/grunt/ProjectSize.coffee index 1c8745a8e0..1d02d33d26 100644 --- a/grunt/ProjectSize.coffee +++ b/grunt/ProjectSize.coffee @@ -1,24 +1,24 @@ -require("coffee-script") +# require("coffee-script") -fs = require("fs") -_ = require("underscore") +# fs = require("fs") +# _ = require("underscore") -if not process.argv[2] - console.log "Usage: coffee project_size.coffee user_files_path" -else - dirPath = process.argv[2] - if not fs.lstatSync(dirPath).isDirectory() - console.log dirPath + " directory not exist" - else - fs.readdir dirPath, (err, files)-> - projects = [] - files.forEach (file)-> - project_id = file.split("_")[0] - if !projects[project_id] - projects[project_id] = 0 - projects[project_id] += fs.lstatSync(dirPath+"/"+file).size +# if not process.argv[2] +# console.log "Usage: coffee project_size.coffee user_files_path" +# else +# dirPath = process.argv[2] +# if not fs.lstatSync(dirPath).isDirectory() +# console.log dirPath + " directory not exist" +# else +# fs.readdir dirPath, (err, files)-> +# projects = [] +# files.forEach (file)-> +# project_id = file.split("_")[0] +# if !projects[project_id] +# projects[project_id] = 0 +# projects[project_id] += fs.lstatSync(dirPath+"/"+file).size - ids = _.keys projects - console.log "project \t size" - ids.forEach (id)-> - console.log id + "\t" + projects[id] +# ids = _.keys projects +# console.log "project \t size" +# ids.forEach (id)-> +# console.log id + "\t" + projects[id]