page:recipes:public directory:flask:public media

Host public directory with Flask: object-stored public media

Deploy a public directory built with Flask on Ample using the public media library pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL, a private S3-compatible bucket holds objects with credentials delivered as encrypted environment variables, and a published bucket serves public assets from the CDN host. Verified on Flask: an object written to a published bucket with an immutable Cache-Control header, a mapping row, and the CDN URL serving it publicly. Not separately tested: your media processing, object layout and cache policy; treat the public directory-specific behavior as your application code.

Representative Queries

Resource Requirements

Infrastructure Requirements

Compute

Postgres

S3-Compatible Object Storage

CDN

Prerequisites

Workflow Steps

Build and start

Implement the pattern on PostgreSQL

Wire object storage

Deploy

Verify

Examples

Flask pattern fixture

Success Checks

Limitations

Cost Estimate

Components

Evidence Summary

Formats