Skip to content

Latest commit

 

History

History
34 lines (32 loc) · 1.2 KB

File metadata and controls

34 lines (32 loc) · 1.2 KB

Setup Persistence Layer

By default, iam-service uses in-memory persistence mode, which is very convenient for testing purposes or simple deployments. However, for real deployment is recommended to use file-system or mongo-db persistence layer.

Supported Persistence modes

  • in-memory (default, no persistence) - application.yml configuration contains:

    iam-service:
      data-model:
       persistence: in-memory
    
  • file-system - data is persisted into single JSON file on each model change. On service startup, data is loaded from same JSON file. In this case application.yml configuration contains:

    iam-service:
      data-model:
        persistence: file-system
        path: /path/to/model-storage.json
    
  • mongo-db - data is persisted into MongoDB. In this case application.yml configuration contains:

    iam-service:
      data-model:
        persistence: mongo-db
        mongo-host: localhost
        mongo-port: 27017
        mongo-database: iam-service-db
        mongo-username: iam-admin
        mongo-password: secret
    
  • next step: Setup Cache Layer

  • MongoDB cheat sheet