Merge pull request #2805 from overleaf/jpa-bg-bcrypt-rounds-env

[misc] configure the bcrypt rounds via the env variable BCRYPT_ROUNDS

GitOrigin-RevId: 68a2f5b491c7162e943edfbb7e05758114d2b3d8
This commit is contained in:
Miguel Serrano 2020-05-06 12:01:59 +02:00 committed by Copybot
parent e1cc614da7
commit 0ba6a1f11d
3 changed files with 3 additions and 1 deletions

View file

@ -220,7 +220,7 @@ module.exports = settings =
# --------
security:
sessionSecret: sessionSecret
bcryptRounds: if process.env['NODE_ENV'] == 'test' then 1 else 12 # number of rounds used to hash user passwords (raised to power 2)
bcryptRounds: (parseInt(process.env['BCRYPT_ROUNDS'], 10) || 12) # number of rounds used to hash user passwords (raised to power 2)
httpAuthUsers: httpAuthUsers

View file

@ -16,6 +16,7 @@ services:
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
working_dir: /app
environment:
BCRYPT_ROUNDS: 1
REDIS_HOST: redis
MONGO_URL: "mongodb://mongo/sharelatex"
SHARELATEX_ALLOW_PUBLIC_ACCESS: 'true'

View file

@ -21,6 +21,7 @@ services:
- .:/app
working_dir: /app
environment:
BCRYPT_ROUNDS: 1
REDIS_HOST: redis
MONGO_URL: "mongodb://mongo/sharelatex"
SHARELATEX_ALLOW_PUBLIC_ACCESS: 'true'