page:recipes:client portal:spring boot:tenant workspaces
Host client portal with Spring Boot: tenant-scoped workspaces
Deploy a client portal built with Spring Boot on Ample using the multi-tenant relational data 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. Verified on Spring Boot: a tenant column on every row and query, with a cross-tenant read returning nothing (tenant_isolation=ok). Not separately tested: your tenant model, membership and per-tenant authorization; treat the client portal-specific behavior as your application code.
Inputs
- env: Encrypted environment variables (bucket credentials, secrets)
- name: App name
- path: Project directory or ample.toml service
- release_command: Migration command run before activation
Resource 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.
Prerequisites
- A Spring Boot project that builds and starts with the documented commands (./mvnw -q -DskipTests package or the Gradle wrapper).
- A PostgreSQL driver reading DATABASE_URL at runtime.
- An Ample account token with servers:write, databases:read.
Workflow Steps
- Build and start:
./mvnw -q -DskipTests package, thenjava -jaron the jvm-21 template with server.port read from PORT. - Implement the pattern on PostgreSQL: A tenant column on every row and query, with cross-tenant read returning nothing.
- Deploy:
ample deploy . --name <APP_NAME> --public. - Verify: Fetch the live URL and run your own checks.
Success Checks
- App responds on its public URL
- Multi-tenant-relational-data self-test at
/p/multi-tenant-relational-data
Limitations
- Verified on the jvm-21 template; other versions are not verified.
- The client portal behavior is application-specific code that was not tested separately.
Cost Estimate
- Currency: USD, Monthly Amount: $10.00
Evidence Summary
- Spring Boot pattern fixture deployed on Ample; checks passed for multi-tenant-relational-data.
Formats
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
- Browse Client portal
- Browse Spring Boot
- Browse Multi-tenant relational data
- Browse Deploy web app