Deployment options
Every Breign component is a container image. You can run them wherever containers run; this page describes the setups we use and support.
| Option | When to choose it |
|---|---|
| Kubernetes with the Helm chart | Production, on-premise or in any cloud (OVH, Azure AKS, Google GKE, Scaleway…). The recommended option. |
| Container platforms | You already use Azure Container Apps or Google Cloud Run and prefer managed services. |
| Servers with Docker Compose | A pilot, a test environment, or a small deployment on one or a few servers. |
Whatever the option, try the platform in a test environment before going to production.
Images​
| Image | Component | Port |
|---|---|---|
breign/breign-app | Breign APP | 3000 |
breign/breign-api | Breign API | 8080 (set PORT; our deployments use 80) |
breign/breign-document-api | Breign Document API | 8000 |
breign/breign-scrapping | Breign Scrapping API | 8000 |
breign/breign-node | Execution node | none (outbound connections only) |
The registry address and its credentials come with your license. Images are tagged with their version (for example breign-api:1.52.0); use explicit versions rather than latest, and deploy the versions given together in the release notes. The Guards API image is provided on request.
Breign API, Document API and Scrapping API add the certificates mounted in /usr/local/share/ca-certificates/ to their trusted authorities at start: mount your company CA there if your internal services use it.
Kubernetes with the Helm chart​
The Helm chart intech-breign installs the whole platform. It contains:
- Breign APP, Breign API, Breign Document API and Breign Scrapping API, each with a Deployment, a Service, an optional Ingress or Gateway API
HTTPRoute, an optional horizontal autoscaler (HPA) and a service account; - optionally, the services, if you don't use managed ones: MongoDB (operator and a 3-member replica set, with a daily backup job), Weaviate (3 replicas) and MinIO.
You can turn off each embedded service and point the components to your own managed database, storage and vector database instead — the usual choice in production.
Install​
-
Create a namespace and a pull secret for the Breign registry:
kubectl create namespace breignkubectl -n breign create secret docker-registry breign-registry \--docker-server=<registry> --docker-username=<user> --docker-password=<password> -
Create the secrets referenced by the values (API keys, encryption secret, JWT keys, database and storage credentials). See Environment variables and the security checklist.
-
Copy the chart's
values.yamland set at least: the hosts of the app and the API, your ingress class or gateway, the image tags, the pull secret, the environment variables of each component, and which embedded services you enable. -
Set resources. The chart sets no CPU or memory requests by default: fill them in for each component, using Prerequisites and sizing.
-
With PostgreSQL, enable the migrations (
migrations.enabled: trueon Breign API): an init container applies them before the API starts. -
Install:
helm install breign oci://<registry>/breign/intech-breign --version <version> \-n breign -f values.yaml -
Continue with Initialization.
Good practices​
- Run at least 2 replicas of Breign APP and Breign API in production, and spread them across nodes.
- Keep 1 replica of the Scrapping API and of the Guards API.
- Check your ingress controller's timeouts and buffering: see Network and exposure.
- Run execution nodes as a StatefulSet, as described in Run a cluster of nodes.
Container platforms​
You can run the Breign containers on a managed container platform and use managed services around them.
Azure​
A deployment on Azure Container Apps we run in production uses:
| Component | Azure service | Resources |
|---|---|---|
| Breign API | Container App | 0.5 vCPU, 1 GiB |
| Breign APP | Container App | 0.5 vCPU, 1 GiB |
| Breign Document API | Container App | 1 vCPU, 2 GiB |
| Breign Scrapping API | Container App (single replica) | 0.25 vCPU, 0.5 GiB |
| Weaviate | Container App (single replica) with an Azure Files Premium (NFS) share | 0.75 vCPU, 1.5 GiB |
| Database | Azure Cosmos DB for MongoDB (vCore), private endpoint | — |
| Storage | Azure Blob Storage (SERVICES__FILES__PROVIDER=AZURE) | — |
| Identity provider | Microsoft Entra ID (OpenID Connect) | — |
Notes:
- The containers share a virtual network; only the app and the API are exposed publicly.
- Blob Storage must accept browser uploads (presigned SAS URLs) and its CORS rules must allow the app's domain. See Network and exposure.
- The Scrapping API only writes to S3-compatible storage: with Azure Blob Storage, website knowledge sources are not available.
- Scaling to zero outside office hours cuts costs, but stops automations and indexing while no replica runs. See Scaling.
You can also run the chart on AKS (see above). Azure App Service (Linux containers) works too, with the same managed services.
Google Cloud​
- Cloud Run for Breign API, Breign APP and Breign Document API. Set the request timeout to several minutes (AI Gateway streams, long tool calls) and keep a minimum of one instance of the API if you use automations or scheduled tasks.
- Cloud SQL for PostgreSQL or a MongoDB service (MongoDB Atlas) for the database.
- Cloud Storage for files (
SERVICES__FILES__PROVIDER=GOOGLE, with the service account of the environment). The Scrapping API needs S3-compatible storage (Cloud Storage offers an S3-compatible XML API with HMAC keys). - Weaviate or Qdrant on GKE, on a VM, or as a managed offer (Weaviate Cloud, Qdrant Cloud).
- An identity provider such as Google Identity Platform or Keycloak.
Or run the Helm chart on GKE.
Servers with Docker Compose​
For a pilot or a small deployment, you can run everything on one Linux server (4 vCPU and 8 GiB of memory are enough to start) with Docker or Podman. The example below runs Breign with PostgreSQL, MinIO and Weaviate, behind Caddy, which obtains the TLS certificates.
It assumes three DNS names pointing to the server: breign.example.com (app), api.breign.example.com (API) and files.breign.example.com (storage, reached by browsers).
services:
caddy:
image: caddy:2
ports: ["80:80", "443:443"]
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data
restart: unless-stopped
postgres:
image: postgres:17
environment:
POSTGRES_USER: breign
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_DB: breign
volumes: [postgres-data:/var/lib/postgresql/data]
restart: unless-stopped
minio:
image: minio/minio
command: server /data --console-address :9001
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY}
volumes: [minio-data:/data]
restart: unless-stopped
weaviate:
image: cr.weaviate.io/semitechnologies/weaviate:1.34.0
environment:
AUTHENTICATION_APIKEY_ENABLED: "true"
AUTHENTICATION_APIKEY_ALLOWED_KEYS: ${WEAVIATE_API_KEY}
AUTHENTICATION_APIKEY_USERS: breign
PERSISTENCE_DATA_PATH: /var/lib/weaviate
DEFAULT_VECTORIZER_MODULE: none
CLUSTER_HOSTNAME: node1
volumes: [weaviate-data:/var/lib/weaviate]
restart: unless-stopped
migrate:
image: <registry>/breign/breign-api:<version>
env_file: api.env
command: ["node", "-r", "tsconfig-paths/register", "dist/migrate.js"]
depends_on: [postgres]
restart: "no"
api:
image: <registry>/breign/breign-api:<version>
env_file: api.env
depends_on:
migrate: { condition: service_completed_successfully }
restart: unless-stopped
app:
image: <registry>/breign/breign-app:<version>
env_file: app.env
depends_on: [api]
restart: unless-stopped
document-api:
image: <registry>/breign/breign-document-api:<version>
env_file: document-api.env
depends_on: [postgres, minio]
restart: unless-stopped
volumes:
caddy-data:
postgres-data:
minio-data:
weaviate-data:
breign.example.com {
reverse_proxy app:3000
}
api.breign.example.com {
reverse_proxy api:8080 {
transport http {
read_timeout 10m
}
}
}
files.breign.example.com {
reverse_proxy minio:9000
}
PORT=8080
SERVER__HOSTNAME=0.0.0.0
SERVER__HOST=https://api.breign.example.com
SERVER__APP_HOST=https://breign.example.com
LOGGER__LEVEL=info
SERVICES__PERSISTENCE__TYPE=pg
SERVICES__PG__URI=postgresql://breign:<pg-password>@postgres:5432/breign
SERVICES__FILES__PROVIDER=MINIO
SERVICES__FILES__ENDPOINT=files.breign.example.com
SERVICES__FILES__PORT=443
SERVICES__FILES__USE_SSL=true
SERVICES__FILES__ACCESS_KEY_ID=<s3-access-key>
SERVICES__FILES__SECRET_ACCESS_KEY=<s3-secret-key>
SERVICES__FILES__BUCKET_NAME=breign-files
SERVICES__FILES__PUBLIC_BUCKET_NAME=breign-public
SERVICES__WEAVIATE__HOST=weaviate:8080
SERVICES__WEAVIATE__SCHEME=http
SERVICES__WEAVIATE__AUTHENTICATION=API_KEY
SERVICES__WEAVIATE__API_KEY=<weaviate-api-key>
SERVICES__MAILS__PROVIDER=resend
SERVICES__MAILS__API_KEY=<resend-api-key>
SERVICES__SCHEDULED_TASKS_QUEUE__DRIVER=local
AUTHENTICATION__API_KEY=<platform-api-key>
AUTHENTICATION__AUTH_SECRET=<random-secret>
AUTHENTICATION__TRUSTED_ORIGINS=["https://breign.example.com"]
AUTHENTICATION__JWT__ISSUER=https://api.breign.example.com
AUTHENTICATION__JWT__PRIVATE_KEY=<ed25519-private-key-pem>
AUTHENTICATION__JWT__PUBLIC_KEY=<ed25519-public-key-pem>
ENCRYPTION__SECRET=<random-secret>
SERVICES__DOCUMENTS_SERVICE__API_KEY=<document-api-key>
BETTER_AUTH_URL=https://breign.example.com
BETTER_AUTH_SECRET=<random-secret>
PERSISTENCE_TYPE=pg
PG_URI=postgresql://breign:<pg-password>@postgres:5432/breign
BRAIN_API_ENDPOINT=https://api.breign.example.com
NEXT_PUBLIC_BRAIN_API_ENDPOINT=https://api.breign.example.com
NEXT_PUBLIC_BRAIN_WS_ENDPOINT=wss://api.breign.example.com
BRAIN_API_KEY=<platform-api-key>
RESEND_API_KEY=<resend-api-key>
NEXT_PUBLIC_TEMPLATE_APP=BREIGN
IMAGES_STORAGE_ENDPOINT=files.breign.example.com
IMAGES_STORAGE_PATH=/breign-public/**
API_KEY=<document-api-key>
API_KEY_NAME=x-api-key
ENCRYPTION__SECRET=<same-secret-as-the-api>
SERVICES__PERSISTENCE__TYPE=pg
PG_URI=postgresql://breign:<pg-password>@postgres:5432/breign
FILE_STORAGE__ADAPTER=minio
MINIO_ENDPOINT=minio
MINIO_PORT=9000
MINIO_PROTOCOL=http
MINIO_BUCKET_NAME=breign-files
MINIO_ACCESS_KEY=<s3-access-key>
MINIO_SECRET_KEY=<s3-secret-key>
Then:
- Start the services:
docker compose up -d. - In MinIO (console on port
9001, through an SSH tunnel for example), create the two buckets, makebreign-publicpublicly readable, and allow your app's domain in the CORS rules. - Continue with Initialization.
The full list of variables, including the optional ones, is in Environment variables. To add website knowledge sources, add the Scrapping API the same way (see its variables), reachable by the API on the internal network only.
For more availability, put the database, the storage and the vector database on managed services or dedicated servers, and run the containers on two servers or more behind a load balancer.