Celerity Website
Celerity resource type for deploying the frontend of a system, as a static site or a server-rendered app
celerity/website
Spec Version: v2026-02-27-draft
Ecosystem Compatibility: Vision
blueprint transform: celerity-2026-02-27-draft
Ecosystem Compatibility
- Vision: Static sites and single-page apps from object storage and a CDN, and server-rendered apps from containers, on AWS, Google Cloud and Azure.
Read more about Celerity versions here.
Design note
celerity/website is part of the vision and is not available yet. This page sets out the current design, which is not committed and may change before it is built.
The celerity/website resource type is used to deploy the frontend of a system: a static site or single-page app, or a server-rendered app.
Celerity can describe every server-side piece of a system, such as APIs, handlers, consumers, schedules, data stores, buckets, caches and networks, but nothing a browser loads. A system built with Celerity still needs a frontend deployed beside it by hand. celerity/website closes that gap.
It is not a hosted frontend platform. Celerity deploys what your framework's build has already produced. The measure of success is sufficiency, not parity with frontend hosting platforms: a team can ship the frontend of a system built with Celerity without leaving Celerity.
What a website does not do
- No framework adapters. There is no understanding of a particular framework's build, no emulation of incremental static regeneration, partial prerendering or edge runtimes, no route-manifest parsing and no splitting of a server-rendered app into functions. Celerity deploys the output of your framework's build.
- No image optimisation, edge middleware, preview deployments, per-branch URLs or analytics. Frontend hosting platforms already cover these.
- No opinion about your frontend toolchain. A build command and an output directory, or a Dockerfile, is the whole contract.
- No general reverse proxy. Routing covers what a web server in front of a single-page app actually does: fallbacks, proxying, redirects and headers. It is not a configuration language.
- No handlers. A website is not a handler host. Server-side logic in Celerity belongs in a
celerity/api.
Modes
A website has one of two modes, sharing one layer for routing, caching, domains and links:
static: a directory of built files, served from object storage behind a CDN, or from a static file server locally. This covers static sites and single-page apps.server: a long-running HTTP server produced by the framework's build, served from a container behind a load balancer. This covers server-side rendering, and anything else that needs a process.
Routing, headers, domains and links work the same way in both modes, so changing mode is a one-line change when a static site grows a server.
A server-mode website is one origin
In server mode, the container serves its own static assets, such as the framework's built JavaScript and public files. Celerity does not move the assets onto a separate bucket origin. That arrangement is often suggested, but it is the wrong trade-off here:
- It needs framework knowledge. Serving assets from another host means configuring the framework to emit absolute asset URLs, which differs for every framework.
- It ties the build to the CDN's domain. Those settings apply at build time, so the same image can no longer be promoted between environments without a rebuild.
- It creates version skew. During a rollout, the container serves HTML that refers to asset hashes, which must already exist on the other origin. Uploads would have to finish before the rollout, and old assets would have to be kept for clients still loading the previous version.
Asset caching comes from a CDN in front of the single origin instead. With cdn.mode set to managed, a CDN sits in front of the load balancer and the headers rules become cache behaviours, so built assets are served from the edge without reaching the container again.
Specification
The specification is the structure of the resource definition that comes under the spec field of the resource in a blueprint.
mode (required)
Whether the website is a directory of built files (static) or a long-running server (server). This determines how the website is deployed on each target environment.
allowed values
static | server
type
string
build
How to produce the website's build output. Optional when sourcePath points at output that is already built.
type
sourcePath
The path to build output that already exists, for teams that build in CI and only want Celerity to deploy. Can't be used together with build.command.
type
string
server
How to run the website's server. Required when mode is server, and rejected when mode is static.
Scaling and sizing come from the existing compute configuration in the app deploy configuration: a website is a compute resource like any other, so it uses the same aws.compute.* options rather than a set of its own.
type
routing
How requests map to files: the index document, the not-found document, single-page app fallback and trailing slashes.
type
routes
An ordered list of proxy, redirect and rewrite rules. The first rule that matches a request applies.
type
array[routeConfiguration]
headers
Response headers for path patterns, chief among them Cache-Control.
Cache rules are a deployment concern. Without a place for them in the deployment, they end up in application code, such as a framework's configuration file.
type
array[headerRule]
domain
The website's custom domain. This is the same type as domain on celerity/api, with domainName, certificateId, basePaths and securityPolicy.
To share a load balancer that another application or a platform project owns, link a website with mode: server to a celerity/gateway.
type
cdn
Whether Celerity provisions a CDN in front of the website.
type
compression
Whether responses are compressed, or the list of MIME types to compress.
type
boolean | array[string]
default value
On for text types.
tracingEnabled
Whether tracing is enabled for the website, as for celerity/api.
type
boolean
Annotations
celerity/website
celerity.app
Groups application components that are part of the same application, with the same meaning as on celerity/api. A website and an API in the same application share one load balancer and one CDN distribution, routed by host or base path.
type
string
celerity/gateway 🔗 celerity/website
celerity.website.gateway.priority
Overrides where the website's routing rules are placed among the rules of every application attached to a shared gateway. See rule ordering.
type
integer
celerity/vpc 🔗 celerity/website
For a website with mode: server, the celerity.website.vpc.subnetType, celerity.website.vpc.lbSubnetType and celerity.website.vpc.egress annotations mirror the celerity/api VPC annotations exactly.
Outputs
id
The ID of the website in the target environment.
type
string
baseUrl
The website's public URL.
type
string
originUrl
The URL of the website's origin, before any CDN.
type
string
cdnDistributionId
The ID of the CDN distribution, when cdn.mode is managed.
type
string
Data Types
buildConfiguration
FIELDS
command
The command that builds the website, such as yarn build.
field type
string
workingDirectory
The directory to run the build command in.
field type
string
outputPath
The directory, relative to the working directory, that the build writes its output to.
field type
string
devCommand
The command that runs the framework's own development server in local development, for a website with mode: server.
field type
string
environment
Build-time environment variables, such as public configuration that the framework inlines into the bundles sent to browsers. These are public only: substituting a celerity/config secret into them is a validation error, because anything set here can end up in the browser.
Secrets that the server needs at runtime belong in server.environment or a linked celerity/config store.
field type
mapping[string, string]
dockerfile
A Dockerfile to build the website's image from. When it is set, command and outputPath are ignored, and Celerity builds and pushes the image. This is the way to deploy anything the build fields can't describe.
field type
string
serverConfiguration
FIELDS
entrypoint
The file that starts the server, relative to the build output.
field type
string
runtime
The runtime to run the server with. container runs the image built from build.dockerfile as it is.
field type
string
allowed values
nodejs24 | nodejs22 | python3.13 | container
port
The port the server listens on.
field type
integer
healthCheckPath
The path the load balancer checks to decide whether the server is healthy.
field type
string
environment
Runtime environment variables for the server.
field type
mapping[string, string]
command
Overrides the command that starts the server.
field type
string
routingConfiguration
FIELDS
indexDocument
The document served for the root and for directory paths.
field type
string
default value
index.html
notFoundDocument
The document served, with a 404 status, for paths that match no file.
field type
string
spaFallback
When true, paths that match no file serve indexDocument with a 200 status, so that a single-page app's client-side router can handle them. A string names a different document to serve.
The difference from notFoundDocument, which is served with a 404, is one that static hosts often get subtly wrong, so it is explicit here.
field type
boolean | string
trailingSlash
How trailing slashes in paths are handled: kept as requested, added, or removed with a redirect.
field type
string
allowed values
preserve | add | remove
cleanUrls
When true, a path such as /about is served from about.html.
field type
boolean
routeConfiguration
Routes are matched in order, and the first match applies. Path patterns use * and :param segments, the same syntax as headers and as celerity/api routes where they overlap.
FIELDS
path
The path pattern to match.
field type
string
proxy.target
Where to proxy matching requests: a celerity/api in the same blueprint, an absolute URL, or a substitution that resolves to one. An API deployed from its own project is typically reached through a variable holding its base URL. See independent deployments.
Targets in the same blueprint also get their security groups managed by the link.
field type
string
proxy.stripPrefix
A path prefix removed before the request is proxied, such as /api. This makes explicit what a web server's trailing-slash rules often do implicitly.
field type
string
proxy.preserveHostHeader
Whether the original Host header is sent to the target.
field type
boolean
default value
false
redirect.to
The location to redirect matching requests to, with :param values interpolated.
field type
string
redirect.status
The redirect status code.
field type
integer
allowed values
301 | 302 | 307 | 308
rewrite.to
A path to serve instead, without redirecting the client.
field type
string
headers
Response headers for this route, overriding the website's headers rules.
field type
mapping[string, string]
Anything beyond these fields, such as upstream pools, connection tuning, rate limiting or authentication requests, is deliberately left out. Those belong to celerity/api or to a dedicated proxy.
headerRule
FIELDS
path
The path pattern the headers apply to.
field type
string
cacheControl
The Cache-Control header for matching responses, such as public, max-age=31536000, immutable for versioned assets or no-store for pages that must never be cached.
field type
string
headers
Other response headers for matching responses.
field type
mapping[string, string]
cdnConfiguration
FIELDS
mode
managed provisions the target environment's CDN in front of the website's origin: the bucket for a static website, or the load balancer for a server website. none provisions nothing and exposes the origin directly.
none is a first-class choice for teams that already run their own CDN or edge. Cache-Control headers are what matter to any CDN, so the headers rules apply either way.
field type
string
allowed values
managed | none
priceClass
The CDN's price class, which limits the edge locations used. Only used when mode is managed.
field type
string
defaultTtl
The default time in seconds that the CDN caches responses without a Cache-Control header. Only used when mode is managed.
field type
integer
invalidateOnDeploy
Whether the CDN's cache is invalidated after each deployment. Only used when mode is managed.
field type
boolean
default value
true
logging
Whether the CDN writes access logs. Only used when mode is managed.
field type
boolean
Linked From
celerity/vpc
When a VPC links to a website with mode: server, the VPC places the website's service. The link is ignored for a website with mode: static.
celerity/gateway
When a celerity/gateway links to a website with mode: server, the website's routes are attached to the shared gateway rather than to a load balancer of its own.
celerity/cluster
When a celerity/cluster links to a website with mode: server, the website runs on that shared cluster.
Links To
celerity/api
A website linking to an API in the same blueprint can proxy to it by name in routes. The link wires the API as an origin or target, manages the security groups between them, and passes the API's base URL to the website as configuration.
An API deployed from its own project can't be linked, since links don't cross blueprints. It is reached through its base URL instead; see independent deployments.
celerity/bucket
Links a bucket to use as the website's asset origin, instead of one Celerity creates.
celerity/config
Gives a website with mode: server runtime secrets and configuration, in the same way as for handlers.
Examples
Server-rendered app
resources:
storefront:
type: celerity/website
metadata:
displayName: Storefront
spec:
mode: server
build:
command: yarn build
workingDirectory: apps/storefront
outputPath: .next/standalone
environment:
NEXT_PUBLIC_API_BASE_URL: "${variables.apiBaseUrl}"
server:
entrypoint: server.js
runtime: nodejs24
port: 3000
healthCheckPath: /healthz
domain:
domainName: shop.example.com
certificateId: "${variables.certificateId}"
cdn:
mode: none
routes:
- path: /api/*
proxy:
target: "${variables.apiBaseUrl}"
stripPrefix: /api
headers:
- path: /catalogue/:version/*
cacheControl: "public, s-maxage=31536000, immutable"
- path: /search/
cacheControl: "no-store"
- path: /account/*
cacheControl: "private, no-store"Single-page app
resources:
adminConsole:
type: celerity/website
linkSelector:
byLabel:
application: admin
spec:
mode: static
build:
command: yarn build
workingDirectory: apps/admin-console
outputPath: dist
domain:
domainName: admin.example.com
certificateId: "${variables.certificateId}"
routing:
indexDocument: index.html
spaFallback: true
routes:
- path: /api/*
proxy:
target: ordersApi
stripPrefix: /apiIndependent Deployments
Every component of a system should be deployable on its own, so that a dependency upgrade or a security fix to the frontend can't touch the API, the load balancer or anything else. A Celerity blueprint is scoped to one project, with one deployment and one rollback, so a frontend and its API are separate projects with separate deployments. Infrastructure they share, such as a load balancer, belongs to a third, platform project.
A parent blueprint that includes the others would make the wiring easy, but it puts the whole system in one deployment: drift anywhere would affect every change, frontend and API deployments would have to wait for each other, and there would be no rollback per component. Includes remain the right tool for things that really do deploy as one unit.
The identifiers each component needs from the others, such as the API's base URL, are passed in as blueprint variables, typically from CI. A future bluelink/instance data source could make this declarative, letting one blueprint read another deployment's exports. The dependency would then be visible in the blueprint, would be resolved when changes are staged, and would show up in the change set when the upstream export changes. That is an improvement on variables, not a prerequisite.
Target Environments
Local Development
🧭 Vision
For a single application, celerity dev run would serve a website with mode: static from its build output, honouring routing, routes and headers. For a website with mode: server, it would run the framework's own development server, from build.devCommand, behind the same route table.
For a system of several projects, lo1 would run them together. lo1 orchestrates a multi-project workspace behind a Caddy proxy with real hostnames and TLS, and its Celerity plugin would read each project's blueprint to derive its services. Under lo1, the routes table becomes Caddy configuration, and a website's references to an API resolve to the local API service instead of a deployed one. lo1's proxy already routes by host and path, the same concept as the routes table, so Celerity doesn't need a competing local proxy.
AWS Serverless
🧭 Vision
A website with mode: static would be deployed to a private S3 bucket behind CloudFront, using origin access control:
routingandheaderscompile to CloudFront Functions (on viewer request for rewrites, fallbacks and trailing slashes, and on viewer response for headers) and response headers policies.routeswithproxycompile to extra CloudFront cache behaviours, with the API Gateway domain as the origin.- A deployment uploads the files, then invalidates the CDN's cache.
A website with mode: server is not a serverless shape, so it uses the containerised AWS target below. There is no Lambda-based adapter for server-side rendering, since that is per-framework work that never ends, and the container path already runs what the framework itself supports.
AWS
🧭 Vision
A website with mode: server would be deployed as an image in ECR, built from build.dockerfile, or from build.outputPath and server.entrypoint using a Celerity base image for the runtime. It runs as an ECS service behind an Application Load Balancer, with listener rules by host or path from domain. Scaling and sizing come from the shared compute configuration.
- A
routesproxy to acelerity/apiin the same application becomes a listener rule on the load balancer. A proxy to an external URL can't be expressed as a listener rule, so the container gets a proxy sidecar generated from the route table. - With
cdn.modeset tomanaged, CloudFront sits in front of the load balancer, with theheadersrules compiled to cache behaviours. Withnone, the load balancer is exposed directly.
To share one load balancer between several applications, link the website to a celerity/gateway.
Default sizing would aim at availability rather than minimum cost, and would be overridable through compute configuration. Tasks would use a soft memory reservation and no CPU reservation by default, so that two copies of a task fit on one instance during a rolling deployment, keeping zero-downtime deployments possible on a single small instance.
Google Cloud
🧭 Vision
On Google Cloud, a website with mode: static would be served from Cloud Storage behind Cloud CDN, and a website with mode: server would run on Cloud Run.
Azure
🧭 Vision
On Azure, a website with mode: static would be served from Blob Storage behind Front Door, and a website with mode: server would run on Container Apps.
Last updated on
Celerity Channel
The Celerity Channel resource type is used to define a real-time channel for pub/sub messaging, presence and targeted broadcasting on top of a WebSocket API.
Platform Projects
How shared infrastructure such as a network, an ingress gateway or a compute cluster could be owned by one Celerity project and used by many applications