page:recipes:member portal:rails:public profiles
Host member portal with Rails: public profile assets
Summary
Deploy a member portal built with Rails 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.
Representative Queries
- Host member portal with Rails: public profile assets
- Where can I host Member portal built with Rails?
- I need separate public profile media from private data, with CDN cache rules.
Resource Requirements
- Compute
- Postgres
- S3-compatible object storage
- CDN
Infrastructure Requirements
- Compute: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
- Postgres: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.
- S3-compatible object storage: Buckets are S3-compatible with issued credentials; PutObject and GetObject are verified by canary. Other S3 operations are not verified.
- CDN: The CDN host serves objects from published buckets. It does not front app compute and is not a cache or key-value store.
Prerequisites
- A Rails project that builds and starts with the documented commands.
- A PostgreSQL driver reading DATABASE_URL at runtime.
- A bucket with its credentials passed as encrypted S3_* environment variables and a second, published bucket for public assets.
- An Ample account token with necessary permissions.
Workflow Steps
- Build and start: Execute
bundle installand then start withrails server. - Implement the pattern on PostgreSQL: Copy the public image delivery approach into your schema.
- Wire object storage: Create the bucket(s) and configure environment values.
- Deploy: Run the synchronous deploy.
- Verify: Fetch the live URL and run your own checks against self-test routes.
Success Checks
- App responds on its public URL.
- Self-test for public-media-library passes.
- Self-test for private-document-library passes.
Limitations
- Verified only on the ruby-3.4 template and s-1vcpu-1gb size; other configurations not verified.
- The application code itself was not separately tested.
Cost Estimate
- Monthly Amount: $10.00 (USD)
- Note: This is the always-on monthly price for tested sizes; additional costs may apply for bucket storage.
Evidence Summary
- Rails pattern fixture deployed successfully with checks passing.
- Canary runs observed for both public and private tests.