# [doc->REQ-DEP-03]
# Source: 05-RESEARCH.md §Pattern 3 + 05-CONTEXT.md D-03/D-20
# Tigris credentials are auto-injected by `fly storage create -a <app>`:
#   AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ENDPOINT_URL_S3, BUCKET_NAME
# docker-entrypoint.sh exports these into LITESTREAM_* before invoking litestream.

dbs:
  - path: /data/rebno.db
    # journal_mode=WAL + synchronous=NORMAL pinned by Phase 4 D-15 (apps/server/src/db.ts).
    replicas:
      - type: s3
        endpoint: ${AWS_ENDPOINT_URL_S3}
        bucket: ${BUCKET_NAME}
        path: rebno
        region: auto
        sync-interval: 1s
        snapshot-interval: 6h
        retention: 24h
        retention-check-interval: 1h
