Azure
Run the ByteChef container on Azure Container Apps with Azure Database for PostgreSQL.
ByteChef runs on Azure as the container image docker.bytechef.io/bytechef/bytechef:latest on port 8080. Azure Container Apps is the simplest managed target; the same image also runs on Azure Kubernetes Service (AKS) using the Helm chart or on a plain VM as in the AWS EC2 guide.
Prerequisites
- An Azure subscription and the
azCLI. - An Azure Database for PostgreSQL 15+ (Flexible Server) instance, with connectivity from the Container App and the
bytechefdatabase created. - A Container Apps environment.
Provision the database
Create an Azure Database for PostgreSQL Flexible Server, add a bytechef database, and allow access from your Container Apps environment (VNet integration or the server's firewall rules). Note the host, username, and password.
Create the Container App
Deploy the image as a Container App exposing port 8080 externally:
az containerapp create \
--name bytechef \
--resource-group <resource-group> \
--environment <container-apps-env> \
--image docker.bytechef.io/bytechef/bytechef:latest \
--target-port 8080 \
--ingress external \
--cpu 2 --memory 4Gi \
--min-replicas 1 --max-replicas 1 \
--secrets db-password=<db-password> encryption-key=<stable-encryption-key> remember-me-key=<stable-remember-me-key> \
--env-vars \
BYTECHEF_DATASOURCE_URL="jdbc:postgresql://<pg-host>:5432/bytechef?sslmode=require" \
BYTECHEF_DATASOURCE_USERNAME="<db-user>" \
BYTECHEF_DATASOURCE_PASSWORD=secretref:db-password \
BYTECHEF_ENCRYPTION_PROVIDER=PROPERTY \
BYTECHEF_ENCRYPTION_PROPERTY_KEY=secretref:encryption-key \
BYTECHEF_SECURITY_REMEMBER_ME_KEY=secretref:remember-me-key \
BYTECHEF_PUBLIC_URL="https://bytechef.example.com"Use stable values for the encryption and remember-me keys, held in Container Apps secrets, so stored credentials and sessions survive revision restarts.
Azure Database for PostgreSQL Flexible Server requires TLS by default, hence sslmode=require. --min-replicas 1 keeps one replica running: with scale to zero, schedules and polling triggers stop firing while no HTTP traffic arrives. --max-replicas 1 keeps a single coordinator; see the scaling notes below.
Configure health probes and scaling
- Set the Container App's readiness/liveness probe to
GET /actuator/health/readinessandGET /actuator/health/livenesson port8080. - Set
BYTECHEF_PUBLIC_URLto the Container App's public FQDN so webhook and OAuth2 redirect URLs resolve. - Because schema migrations run at container startup, keep the app at a single replica during the first deploy and any upgrade. Every replica runs the coordinator, and more than one coordinator requires Enterprise Edition. Before you scale beyond one replica, apply the settings in Running multiple instances: a shared encryption key, a shared message broker, shared file storage, a shared session store and cache provider, and a clustered scheduler.
Access the instance
Open the Container App's ingress URL and click Create account to register the first user.
Storage note
Container Apps replicas have ephemeral local storage, and file storage defaults to FILESYSTEM - so set BYTECHEF_FILE_STORAGE_PROVIDER=JDBC explicitly to keep files in the database, or attach durable object storage of your own. Leaving the default in place writes files to a disk that disappears with the replica. See File storage.
How is this guide?
Last updated on