Vijey Deepan
01/27/2023, 8:24 AMcerbos: error: failed to create audit log: failed to create backend: failed to create logger: open sink "/auditlogs/audit.log": open /auditlogs/audit.log: no such file or directoryVijey Deepan
01/27/2023, 8:31 AMaudit:
  enabled: true 
  accessLogsEnabled: true 
  decisionLogsEnabled: true 
  backend: file
  file:
    path: /auditlogs/audit.logVijey Deepan
01/27/2023, 8:31 AMVijey Deepan
01/27/2023, 8:32 AMVijey Deepan
01/27/2023, 8:41 AMVijey Deepan
01/27/2023, 8:48 AMaudit:
  enabled: true 
  accessLogsEnabled: true 
  decisionLogsEnabled: true 
  backend: file
  file:
    path: stdoutVijey Deepan
01/27/2023, 8:49 AMVijey Deepan
01/27/2023, 9:00 AMCharith (Cerbos)
-v argument to Docker. Something like:
docker run -it -v $(pwd):/auditlogs <http://ghcr.io/cerbos/cerbos:latest|ghcr.io/cerbos/cerbos:latest>Vijey Deepan
01/27/2023, 9:06 AMVijey Deepan
01/27/2023, 9:07 AMVijey Deepan
01/27/2023, 9:13 AMcerbos:
    container_name: cerbos
    image: <http://ghcr.io/cerbos/cerbos:latest|ghcr.io/cerbos/cerbos:latest>
    restart: always
    command: ["server", "--config=/config/conf.yaml", "--log-level=warn"]
    volumes:
      - ./config:/config
      - ${PWD}/auditlogs:/auditlogs/audit.log
    depends_on:
      - database
    ports:
      - 3592:3592
      - 3593:3593
    networks:
      - intranetVijey Deepan
01/27/2023, 9:13 AMaudit:
  enabled: true 
  accessLogsEnabled: true 
  decisionLogsEnabled: true 
  backend: file
  file:
    path: /auditlogs/audit.logVijey Deepan
01/27/2023, 9:14 AMCharith (Cerbos)
cerbos:
    container_name: cerbos
    image: <http://ghcr.io/cerbos/cerbos:latest|ghcr.io/cerbos/cerbos:latest>
    restart: always
    command: ["server", "--config=/config/conf.yaml", "--log-level=warn"]
    volumes:
      - ./config:/config
      - ./auditlogs:/auditlogs
    depends_on:
      - database
    ports:
      - 3592:3592
      - 3593:3593
    networks:
      - intranet
Make sure that you have a directory named auditlogs created in the same directory as your Compose fileVijey Deepan
01/27/2023, 9:18 AMVijey Deepan
01/27/2023, 9:19 AMvolumes:
      - ./config:/config
      - ${PWD}/auditlogs/audit.log:/auditlogs/audit.logVijey Deepan
01/27/2023, 9:20 AMVijey Deepan
01/27/2023, 9:20 AM