page:recipes:member portal:laravel:private documents
Host member portal with Laravel: private documents
Deploy a member portal built with Laravel on Ample using the private document 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. Verified on Laravel: a role-to-document access model with negative tests (401 without identity, 403 for the wrong role) and a private-bucket round-trip for the allowed role (private=ok). Not separately tested: your identity integration and role assignments; treat the member portal-specific behavior as your application code.
Representative Queries
- Host member portal with Laravel: private documents
- Where can I host Member portal built with Laravel?
- I need a role-to-document access model and negative authorization tests.
Resource Requirements
- primitive:compute
- primitive:postgres
- primitive:s3-compatible-object-storage
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.
Prerequisites
- A Laravel project that builds and starts with the documented commands (composer install --no-dev from composer.lock, then FrankenPHP serving public/ (php-server with the index.php fallback) reading PORT on the php-8.5 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 - An Ample account token with servers:write, databases:read, buckets:read
Tested Configuration
- Template: php-8.5
- Runtime: php
- Size: s-1vcpu-1gb
- Install: composer install --no-dev --prefer-dist --no-interaction --no-progress --optimize-autoloader
- Start: frankenphp php-server --listen :$PORT --root public
Workflow Steps
Build and start
Install dependencies and start the server.Implement the pattern on PostgreSQL
Implement role-to-document access model with negative tests.Wire object storage
Create the bucket and pass necessary environment variables.Deploy
Run the deployment command.Verify
Check the live URL and run self-test route(s).
Limitations
- Verified on the php-8.5 template at s-1vcpu-1gb.
- The member portal's behavior is considered application code and was not separately tested.
Cost Estimate
- Currency: USD
- Monthly Amount: 10.0
- Components:
- App server (s-1vcpu-1gb): 5.0
- Managed PostgreSQL database (s-1vcpu-1gb): 5.0
- Note: Always-on monthly price; auto-pause when idle.
Evidence Summary
- Canary Run: Laravel pattern fixture deployed on Ample with checks passed.
Next Actions
- Prepare a side-effect-free deployment plan for an authorized project.