Aimpress_site/server/docker-compose.yml
Vadym Samoilenko 73b1a0feda Add AI chatbot: FastAPI backend + React chat widget
- Python FastAPI backend (chatbot-api/) with Claude Sonnet 4.6, prompt injection
  protection, rate limiting (30 msg/session), off-topic filtering, Redis session storage
- Rocket.Chat integration for live monitoring and human takeover
- Lead capture via n8n webhook
- React chat widget: floating bubble, auto-greeting after 30s, glassmorphism chat
  window, mobile responsive, lazy loaded, Mixpanel analytics
- Nginx proxy /api/chat → chatbot-api:8000
- Docker: chatbot-api + Redis services added to docker-compose

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 17:14:07 +00:00

51 lines
1.6 KiB
YAML

services:
web:
image: nginx:alpine
container_name: aimpress-website
restart: unless-stopped
networks:
- traefik-public
volumes:
- ./dist:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.aimpress-website.rule=Host(`ai-impress.com`) || Host(`www.ai-impress.com`)"
- "traefik.http.routers.aimpress-website.entrypoints=websecure"
- "traefik.http.routers.aimpress-website.tls.certresolver=cloudflare"
- "traefik.http.services.aimpress-website.loadbalancer.server.port=80"
- "traefik.http.routers.aimpress-website.middlewares=security-headers@file"
email-api:
build: ./email-api
container_name: aimpress-email-api
restart: unless-stopped
networks:
- traefik-public
environment:
- RESEND_API_KEY=${RESEND_API_KEY}
chatbot-api:
build: ./chatbot-api
container_name: aimpress-chatbot-api
restart: unless-stopped
networks:
- traefik-public
environment:
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- REDIS_URL=redis://aimpress-chatbot-redis:6379
- ROCKETCHAT_URL=https://chat.ai-impress.com
- ROCKETCHAT_AUTH_TOKEN=${ROCKETCHAT_AUTH_TOKEN}
- ROCKETCHAT_USER_ID=${ROCKETCHAT_USER_ID}
- N8N_WEBHOOK_URL=https://n8n.ai-impress.com/webhook
chatbot-redis:
image: redis:alpine
container_name: aimpress-chatbot-redis
restart: unless-stopped
networks:
- traefik-public
networks:
traefik-public:
external: true