Object Storage
MinIO local development, Backblaze B2 for backups and planned production media storage.
Object Storage
ByteBite uses an S3-compatible abstraction for uploaded media (restaurant logos, category/menu imagery). ADR-018 defines the provider split. Application wiring for local MinIO landed with Menu → Object Storage. Staging and production B2 media remain undeployed.
Current state
| Environment | Provider | Status |
|---|---|---|
| Local dev | MinIO (minio/minio in compose.yml) | Active — dashboard uploads write here |
| Staging | — | Not deployed (B2 media not configured) |
| Production | Backblaze B2 (planned for media) | Not deployed |
Backblaze B2 — two distinct use cases
| Use case | Status | Detail |
|---|---|---|
| PostgreSQL backup storage | Implemented | Encrypted off-host backups via Restic → B2 S3-compatible API |
| Application media/object storage | Planned | Staging/production B2 media is not wired (ADR-018) |
Do not confuse these. B2 is actively used for database backups. B2 for general application media remains undeployed in staging and production.
See Backups for the PostgreSQL backup architecture.
Local development (MinIO)
| Setting | Value |
|---|---|
| Container | minio in compose.yml |
| API endpoint (inside Docker) | http://minio:9000 |
| Console | http://localhost:9001 (host-published) |
| Default bucket | bytebite (from .env.example) |
| Credentials | Local dev placeholders in .env.example — not production secrets |
| Key prefix | restaurants/:restaurantId/... |
The API container receives S3_ENDPOINT=http://minio:9000 via Compose override regardless of host .env values, plus S3_REGION, S3_BUCKET, keys, and S3_FORCE_PATH_STYLE=true.
The API creates the bytebite bucket on first upload if it is missing. Missing credentials fail the upload with a clear error; there is no filesystem fallback.
Browser apps do not talk to MinIO. Persisted URLs are same-origin /api/media/... (see Object storage uploads).
Planned application media storage (Backblaze B2)
| Aspect | Status |
|---|---|
| Provider decision | Accepted (ADR-018) |
| Bucket names | Not established |
| Application credentials | Not configured |
| Application wiring | Placeholders in .env.example only |
| Staging object storage | Not deployed |
| Production object storage | Not deployed |
Backup B2 credentials (dedicated, root-only on the APP VM) are separate from future application S3 credentials. This slice does not deploy staging or production B2 media.
CDN strategy is still not established. Local serving uses the API media route, not a public guessable MinIO URL.
Related
- Object storage uploads
- ADR-018 Object Storage
- Backups — B2 for PostgreSQL backups
- Environments — per-environment storage
- Secrets — S3 credential inventory
- Known gaps