page:recipes:knowledge base:rails:public media

Host knowledge base with Rails: object-stored public media

Deploy a knowledge base built with Rails 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 Rails: 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 knowledge base-specific behavior as your application code.

Summary

Representative Queries

Resource Requirements

Prerequisites

Workflow Steps

  1. Build and start: bundle install into vendor/bundle and start the server.
  2. Implement the pattern on PostgreSQL: Ensure correct object mappings and headers.
  3. Wire object storage: Set up your S3-compatible buckets and pass necessary settings.
  4. Deploy: Run the deploy command and check the results.
  5. Verify: Ensure the deployment is successful and functions correctly.

Limitations

Cost Estimate

Component Monthly Amount
app server (s-1vcpu-1gb) $5.00
managed PostgreSQL database $5.00
Total $10.00

Examples

Success Checks

Evidence Summary