Skip to content

Web Components

Web components are the primary building block. They create a Deployment, Service, and optionally Ingress paths.

Minimal Web Component

components:
  backend:
    type: web
    image: ghcr.io/example/backend:latest
    port: 8000
backend = web(
    image=image("ghcr.io/example/backend:latest"),
    port=8000,
)

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

components:
  backend:
    image: myapp:latest
    port: 8000
    replicas: 3

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:

apiVersion: helm-me/v1alpha1
kind: Application
metadata:
  name: my-platform

components:
  backend:
    image: ghcr.io/example/backend:latest
    port: 8000
    replicas: 2

  frontend:
    image: ghcr.io/example/frontend:latest
    port: 80

  admin:
    image: ghcr.io/example/admin:latest
    port: 3000