diff --git a/server-ce/docker-compose.yml b/server-ce/docker-compose.yml index 07db7756a9..70ae0cdbd6 100644 --- a/server-ce/docker-compose.yml +++ b/server-ce/docker-compose.yml @@ -49,7 +49,7 @@ services: ## Server Pro ## ################ - # SANDBOXED_COMPILES: "true" + # SANDBOXED_COMPILES:true # SHARELATEX_LDAP_HOST: 'ldap://ldap.forumsys.com' # SHARELATEX_LDAP_DN: 'uid=:userKey,dc=example,dc=com' diff --git a/server-ce/grunt/ProjectSize.coffee b/server-ce/grunt/ProjectSize.coffee new file mode 100644 index 0000000000..1c8745a8e0 --- /dev/null +++ b/server-ce/grunt/ProjectSize.coffee @@ -0,0 +1,24 @@ +require("coffee-script") + +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 + + ids = _.keys projects + console.log "project \t size" + ids.forEach (id)-> + console.log id + "\t" + projects[id]