page:recipes:admin dashboard:flask:public profiles
Host Admin Dashboard with Flask: Public Profile Assets
Deploy an admin dashboard built with Flask on Ample using the public image delivery 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: public objects in a published bucket served from the CDN URL, kept separate from private objects in an unpublished bucket that require authorization (private=ok only for the allowed role). Not separately tested: your image processing and profile-media rules; treat the admin dashboard-specific behavior as your application code.
Representative Queries
- Host admin dashboard with Flask: public profile assets
- Where can I host Admin dashboard built with Flask?
- I need separate public profile media from private data, with CDN cache rules.
Prerequisites
- A Flask project that builds and starts with the documented commands (pip install into .ample/python from requirements.txt, then waitress from app.py reading PORT on the python-3.12 template).
- A PostgreSQL driver reading DATABASE_URL at runtime (auto-provisioned when omitted, or supplied with --env).
- A bucket from
ample bucket createwith its credentials passed as encrypted S3_* environment variables and a second, published bucket for public assets (CDN_*). - An Ample account token with servers:write, databases:read, buckets:read.
Technical Details
- Framework: Flask
- Workload: Admin dashboard
- Release Status: Published
- Support Status: Verified
- Execution Status: Ready
Limitations
- Verified on the python-3.12 template at s-1vcpu-1gb with the example fixture; other sizes, templates, and Flask major versions are not verified.
- The admin dashboard itself was not separately tested.
Cost Estimate
- Monthly Amount: $10.00
- Components:
- app server (s-1vcpu-1gb): $5.00
- managed PostgreSQL database (s-1vcpu-1gb): $5.00
Workflow Steps
- Build and Start: pip install into .ample/python from requirements.txt, then waitress from app.py reading PORT on the python-3.12 template. The server must bind 0.0.0.0 on PORT.
- Implement the pattern on PostgreSQL: The fixture's module implements public image delivery.
- Wire Object Storage: Create the bucket(s), passing endpoint, region, bucket, and keys as --env values.
- Deploy: Run the synchronous deploy once and read the result.
- Verify: Fetch the live URL and run checks.
Success Checks
- App responds on its public URL.
- Public-media-library self-test successful.
- Private-document-library self-test verifies proper authorization.
Evidence Summary
- Canary Run Summary: Flask pattern fixture deployed; checks passed for public and private access.
Next Actions
- Browse the catalog index.
- Search published recipes by intent, stack, and constraints.
- Prepare a side-effect-free deployment plan.
- Read the existing agent authentication setup.