Files
ERP/bot/integration/erp-compose-service.yml
T
whqreza 638076dbaa refactor(bot)!: rename 'ai procurement' -> 'bot/' so the compose build context is committed
The bot service in docker-compose.yml builds from ./bot, but the agent code lived in 'ai procurement/' and ./bot was only a Windows junction on reza.g's machine (and was gitignored) — exactly as the team reported: 'bot/ was never committed — prod-v7's bot is un-buildable from the repo.'

- junction removed; 'ai procurement/' renamed to 'bot/' via git mv (all 41 files keep their history as pure renames)
- 'bot/' dropped from .gitignore (voice/ stays ignored — runtime voice notes; bot/.env stays ignored by bot/.gitignore)
- compose needs no change: context: ./bot and ./bot/app now resolve to committed files
- bot/INTEGRATION-REPORT.md added: full story (problem, root cause, git state, security note on the committed BALE_BOT_TOKEN / AI_API_KEY compose defaults, and usage instructions for the team)

Verified: 41 renames staged with zero secret/cache files; voice/ and bot/.env still ignored.
2026-10-02 12:52:25 +03:30

40 lines
1.7 KiB
YAML

# ==========================================================================
# Add this service to the ERP stack's docker-compose.yml (and mirror it in
# docker-compose.coolify.yml with `container_name: procurement-bot`).
#
# It expects THIS repository checked out (or vendored) next to the ERP repo
# as `./bot` — either `git clone … bot` inside the ERP checkout, or change
# `context:` to an absolute/relative path to this repo.
#
# In-container URLs are unaffected by host port remaps (postgres/api are
# reached over the compose network, not host ports).
# ==========================================================================
services:
bot:
build:
context: ./bot # ← path to this repository
dockerfile: Dockerfile
container_name: procurement-bot
environment:
PROCUREMENT_BOT_BOT_TOKEN: ${BALE_BOT_TOKEN:-}
PROCUREMENT_BOT_BALE_API_BASE: ${BALE_API_BASE:-https://tapi.bale.ai}
PROCUREMENT_BOT_API_BASE_URL: http://api:8000/api/v1
PROCUREMENT_BOT_DATABASE_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/procurement
PROCUREMENT_BOT_AI_BASE_URL: ${AI_BASE_URL:-}
PROCUREMENT_BOT_AI_API_KEY: ${AI_API_KEY:-}
PROCUREMENT_BOT_STT_MODEL: ${AI_STT_MODEL:-whisper-1}
PROCUREMENT_BOT_STT_BASE_URL: ${AI_STT_BASE_URL:-}
PROCUREMENT_BOT_STT_API_KEY: ${AI_STT_API_KEY:-}
PROCUREMENT_BOT_LLM_MODEL: ${AI_LLM_MODEL:-gpt-4o-mini}
PROCUREMENT_BOT_ADMIN_CHAT_IDS: ${BALE_ADMIN_CHAT_IDS:-}
PROCUREMENT_BOT_SERVICE_TOKEN: ${BALE_SERVICE_TOKEN:-}
depends_on:
postgres:
condition: service_healthy
api:
condition: service_started
restart: unless-stopped