A document store for large files: S3, a directory or the database
The REST API has a document store: one place for large files that never change, with three backends an operator chooses by environment variable.
- Three backends:
APIOME_DOCUMENT_STORE=db(the default, in the database),s3(AWS S3, MinIO, Garage, Cloudflare R2, Google Cloud Storage interoperability) orfilesystem(a directory on the REST host). - Choose the folder:
APIOME_DOCUMENT_STORE_PREFIX(defaultapiome) is the folder all Apiome objects are written under, so a bucket can be shared with other applications. - Stored once, per tenant: an object is named by the SHA-256 of its bytes inside its tenant's folder. Writing the same file again writes nothing.
- Larger exports: an export download above
APIOME_EXPORT_ARTIFACT_DB_MAX_BYTESis now kept in the bucket or directory. Before, it failed. - S3 options: path-style or virtual-host addressing, SSE-S3 or SSE-KMS, an IAM role or a static key pair, and multipart upload for large objects.
- No change by default: an installation that sets nothing keeps using the database. The
dbbackend adds one table, in apiome-db migration V402.
See Document store.
