Search code examples
docker-composeparse-platform

Parse Server docker-compose lockout policy


I'm trying to add lockout policy to parse platform docker-compose configuration, but encountering an error:

 /parse-server/lib/Config.js:235
parse        |         throw 'Account lockout duration should be greater than 0 and less than 100000';

Here is the piece of docker-compose:

  parse:
    container_name: 'parse'
    image: parseplatform/parse-server
    restart: always
    ports:
      - '127.0.0.1:1337:1337'
    depends_on:
      - mongodb
    environment:
      - PARSE_SERVER_APPLICATION_ID=random_id
      - PARSE_SERVER_MASTER_KEY=random_key
      - PARSE_SERVER_DATABASE_URI=mongodb://mongodb/random
      - PARSE_SERVER_ENABLE_ANON_USERS=false
      - PARSE_SERVER_ALLOW_CUSTOM_OBJECT_ID=true
      - PARSE_SERVER_MOUNT_PATH=/
      - PARSE_SERVER_ACCOUNT_LOCKOUT=true
      - PARSE_SERVER_ACCOUNT_LOCKOUT_DURATION=9
      - PARSE_SERVER_ACCOUNT_LOCKOUT_THRESHOLD=6

Why is there an issue with duration, when it is clearly provided?

Thank you.


Solution

  • parse:
        container_name: 'parse'
        image: parseplatform/parse-server
        restart: always
        ports:
          - '127.0.0.1:1337:1337'
        depends_on:
          - mongodb
        environment:
          - PARSE_SERVER_APPLICATION_ID=random_id
          - PARSE_SERVER_MASTER_KEY=random_key
          - PARSE_SERVER_DATABASE_URI=mongodb://mongodb/random
          - PARSE_SERVER_ENABLE_ANON_USERS=false
          - PARSE_SERVER_ALLOW_CUSTOM_OBJECT_ID=true
          - PARSE_SERVER_MOUNT_PATH=/
          - PARSE_SERVER_ACCOUNT_LOCKOUT={"duration":9,"threshold":6,"unlockOnPasswordReset":true}