# ─────────────────────────────────────────────────────────────────────────────
# MODEL_BACKEND
# ─────────────────────────────────────────────────────────────────────────────
# Controls where draw.io model files (.drawio) are loaded from.
#
#   local  — load from the local filesystem (app directory). No cloud needed.
#   cos    — load from an object-storage bucket (IBM COS or MinIO).
#
MODEL_BACKEND=cos


# ─────────────────────────────────────────────────────────────────────────────
# OPTION A – IBM Cloud Object Storage  (IAM-based authentication)
# ─────────────────────────────────────────────────────────────────────────────
# Used when MODEL_BACKEND=cos and COS_ACCESS_KEY_ID is NOT set.
#
# COS_APIKEY=<your-ibm-cos-api-key>
# COS_RESOURCE_INSTANCE_ID=<crn:v1:...>
# COS_ENDPOINT=https://s3.us-south.cloud-object-storage.appdomain.cloud
# COS_BUCKET=<your-bucket-name>
# COS_MODEL_PREFIX=<optional-path-prefix-inside-bucket>

# Active IBM COS credentials (comment out or remove if using MinIO):
COS_APIKEY=
COS_RESOURCE_INSTANCE_ID=
COS_ENDPOINT=https://s3.us-south.cloud-object-storage.appdomain.cloud
COS_BUCKET=bucket-drawio
COS_MODEL_PREFIX=


# ─────────────────────────────────────────────────────────────────────────────
# OPTION B – MinIO (or any S3-compatible store)  (access-key authentication)
# ─────────────────────────────────────────────────────────────────────────────
# Used when MODEL_BACKEND=cos and COS_ACCESS_KEY_ID IS set.
# Takes priority over IBM COS credentials if both are present.
#
# Docker / local example:
#   COS_ENDPOINT=http://localhost:9000
#
# Kubernetes example:
#   COS_ENDPOINT=http://minio-service:9000
#
# COS_ENDPOINT=http://localhost:9000
# COS_BUCKET=drawio-models
# COS_MODEL_PREFIX=
# COS_ACCESS_KEY_ID=minioadmin
# COS_SECRET_ACCESS_KEY=minioadmin


# ─────────────────────────────────────────────────────────────────────────────
# STATE BACKEND (Cloudant)
# ─────────────────────────────────────────────────────────────────────────────
# Cloudant settings are NOT configured here.
# They go into the draw.io model's custom properties (model metadata or start node).
# See PODMAN.md → "Connectivity options" for the full property reference.


# ─────────────────────────────────────────────────────────────────────────────
# API AUTHENTICATION  (optional)
# ─────────────────────────────────────────────────────────────────────────────
# Protects the workflow engine HTTP endpoints with HTTP Basic Authentication.
#
# Rules:
#   - If BOTH API_USERNAME and API_PASSWORD are present and non-empty,
#     every API request must carry a valid "Authorization: Basic ..." header.
#   - If either field is absent, empty, or commented out, the server runs
#     with NO authentication (all endpoints open — suitable for local dev or
#     when access is controlled by a network boundary / ingress).
#   - The /health endpoint is ALWAYS open regardless of this setting.
#
# Priority: environment variables take precedence over values set here.
# For containers / serverless, prefer injecting credentials via env vars
# (e.g. Kubernetes Secret, Cloud Run Secret Manager) rather than baking
# them into this file.
#
# To enable via this file, uncomment and fill in both fields:
#
# API_USERNAME=admin
# API_PASSWORD=changeme


# ─────────────────────────────────────────────────────────────────────────────
# ENGINE URL  (required for resilient parallel branches on serverless platforms)
# ─────────────────────────────────────────────────────────────────────────────
# The publicly reachable base URL of this engine instance.
# Used when ENGINE_URL is set to dispatch each parallel branch as an independent
# HTTP child request instead of a thread, making parallel workflows resilient
# to platform execution timeouts (e.g. IBM Code Engine's 300-second limit).
#
# When NOT set (default): branches run as threads within the same request.
# Suitable for CLI mode, VMs, and Kubernetes where timeouts are not a concern.
#
# Priority: environment variable takes precedence over this value.
# For Code Engine, set via the deployment environment variable rather than
# baking the URL into this file (the URL is known after first deploy).
#
# Example:
#   ENGINE_URL=https://my-engine.abc12345.eu-de.codeengine.appdomain.cloud
#
# ENGINE_URL=

#ENGINE_URL=http://127.0.0.1:8080