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

Resource Requirements

Prerequisites

  1. A Spring Boot project that builds and starts with the documented commands (./mvnw -q -DskipTests package or the Gradle wrapper).
  2. A PostgreSQL driver reading DATABASE_URL at runtime.
  3. An Ample account token with servers:write, databases:read.

Workflow Steps

  1. Build and start: ./mvnw -q -DskipTests package, then java -jar on the jvm-21 template with server.port read from PORT.
  2. Implement the pattern on PostgreSQL: A tenant column on every row and query, with cross-tenant read returning nothing.
  3. Deploy: ample deploy . --name <APP_NAME> --public.
  4. Verify: Fetch the live URL and run your own checks.

Success Checks

Limitations

Cost Estimate

Evidence Summary

Formats

Next Actions