#!/bin/sh set -e CONFIG_DIR="/app/config" mkdir -p "${CONFIG_DIR}" API_KEY="${API_KEY:-sk-kiro2api}" ADMIN_API_KEY="${ADMIN_API_KEY:-sk-admin-kiro2api}" PROXY="${HTTPS_PROXY:-${ALL_PROXY:-}}" # Build config JSON, conditionally including proxyUrl if [ -n "${PROXY}" ]; then PROXY_LINE="\"proxyUrl\": \"${PROXY}\"," else PROXY_LINE="" fi cat > "${CONFIG_DIR}/config.json" < "${CONFIG_DIR}/credentials.json" echo "Config generated (port=7860, proxy=${PROXY:+set}${PROXY:-none})" exec ./kiro-rs -c "${CONFIG_DIR}/config.json" --credentials "${CONFIG_DIR}/credentials.json"