Web Components¶
Web components are the primary building block. They create a Deployment, Service, and optionally Ingress paths.
Minimal Web Component¶
Tip
type: web is the default — you can omit it.
Image Configuration¶
components:
backend:
image:
repository: ghcr.io/example/backend
tag: "1.2.0"
pull_policy: IfNotPresent
Available pull policies: Always, IfNotPresent, Never.
Environment Variables¶
components:
backend:
image: myapp:latest
port: 8000
env:
DEBUG: "false"
LOG_LEVEL: "info"
PYTHONUNBUFFERED: "1"
Replicas¶
Custom Command¶
Override the container entrypoint:
components:
backend:
image: myapp:latest
port: 8000
command: ["gunicorn", "app:create_app()", "--bind", "0.0.0.0:8000"]
CORS¶
components:
backend:
image: myapp:latest
port: 8000
cors:
origins:
- "https://app.example.com"
- "https://admin.example.com"
Multiple Components¶
An app can have multiple web components, each with its own Deployment and Service: