services:
  postgres:
    user: 1000:1000
    image: postgres:16.1
    volumes:
      - /home/user/fineractdb/postgres:/var/lib/postgresql/data
    restart: unless-stopped
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: postgres
    ports:
      - 5432:5432
  mock-oauth2-server:
    user: 1000:1000
    image: ghcr.io/navikt/mock-oauth2-server:2.1.10
    ports:
      - 9000:9000
    environment:
      SERVER_PORT: 9000
      JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }'
    restart: unless-stopped
