fix(ci): recreate bot through runner docker daemon
Deploy Canina / deploy (push) Successful in 21s

This commit is contained in:
devops committed 2026-10-15 06:55:16 +00:00
1 parent b5dcdec18c
commit 332d400a37
1 file changed
+7 -12
+7 -12
View File
@@ -115,21 +115,16 @@ docker compose --progress plain build \
echo "Building support-chat bot image from committed source..."
BOT_IMAGE="canina-support-bot:${BRANCH}"
DOCKER_BUILDKIT=0 docker build --pull=false -f scripts/support-chat/Dockerfile -t "${BOT_IMAGE}" .
BOT_OVERRIDE="/opt/services/ai/canina-bot/support.override.cicd.yml"
mkdir -p "$(dirname "${BOT_OVERRIDE}")"
cat > "${BOT_OVERRIDE}" <<EOF
services:
canina-bot:
image: ${BOT_IMAGE}
env_file:
- .env
- support.env
EOF
BOT_ENV="${TARGET_DIR}/.support-bot.runtime.env"
docker inspect -f '{{range .Config.Env}}{{println .}}{{end}}' canina-bot > "${BOT_ENV}"
chmod 600 "${BOT_ENV}"
echo "Starting containers..."
docker compose up -d --remove-orphans
echo "Starting support-chat bot container..."
docker compose -p canina-support -f /opt/services/ai/canina-bot/compose.yml -f "${BOT_OVERRIDE}" up -d --no-build --force-recreate canina-bot
docker rm -f canina-bot >/dev/null 2>&1 || true
docker run -d --name canina-bot --restart unless-stopped --env-file "${BOT_ENV}" -e HERMES_HOME=/opt/data -e HERMES_RUNTIME_DIR=/opt/hermes/tools -e API_SERVER_HOST=0.0.0.0 -e API_SERVER_PORT=8642 --network traefik_public -v canina_bot_data:/opt/data "${BOT_IMAGE}" gateway run
docker network connect --ip 172.22.0.15 vpn_net canina-bot
rm -f "${BOT_ENV}"
echo "Waiting for backend to start..."
sleep 15