Files
replypier/docker-compose.prod.yml
T
WangShen007 54b949b392 chore(brand): rename the product to ReplyPier
The upstream project name is gone from code, assets, docs and build
output: brand strings, domains (replypier.site and its app/api/docs/help
subdomains), env prefixes, image and network names, the widget's public
JS API (window.ReplyPier, replypierId/BaseUrl/Config/Token), CSS tokens
(--rp-*), file and directory names, and the WordPress plugin package.

- widget loader is now webclient/replypier.min.js; both bundles rebuilt
  from source (backend/assets/widget.{js,css}, frontend/public/webclient)
- NOTICE, llms.txt, CONTRIBUTING, HELP_CENTER_INFRA and config.dev.js
  rewritten rather than string-swapped; the demo config no longer ships
  the previous vendor's Firebase/Razorpay/Google keys
- new migration replypier_ai_model_001 adds REPLYPIER to the managed
  AIModelType and rewrites pre-rename rows
- local compose project, database, role and volume renamed; LOCAL_DEPLOY
  documents carrying the old local data over
2026-10-26 00:51:03 +08:00

200 lines
4.9 KiB
YAML

version: '3.8'
services:
frontend:
image: replypier/frontend:latest
ports:
- "80:80"
env_file:
- ./frontend/.env
depends_on:
- backend
networks:
- replypier-network
restart: unless-stopped
backend:
image: replypier/backend:latest
ports:
- "8000:8000"
environment:
- REDIS_ENABLED=true
- REDIS_URL=redis://redis:6379/0
- WORKERS=1
- TIMEOUT=120
- LOG_LEVEL=info
# HuggingFace caching configuration
- HF_HOME=/app/.cache/huggingface
- HF_HUB_CACHE=/app/.cache/huggingface/hub
- HF_HUB_DISABLE_TELEMETRY=1
# Reduce parallelism to avoid conflicts
- EMBEDDING_MAX_WORKERS=4
- KB_MAX_WORKERS=4
# Enable safe embedding mode for Docker
- EMBEDDING_SINGLE_THREADED=true
- EMBEDDING_SEQUENTIAL_FALLBACK=true
env_file:
- ./backend/.env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- replypier-network
restart: unless-stopped
volumes:
- backend_data:/app/uploads
- temp_data:/app/temp
- ./config:/app/config
# Add caching volumes for models
- huggingface_cache:/app/.cache/huggingface
healthcheck:
test: ["CMD", "curl", "-X", "GET", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
knowledge_processor:
image: replypier/backend:latest
command: python -m app.workers.knowledge_processor
environment:
- REDIS_ENABLED=true
- REDIS_URL=redis://redis:6379/0
- LOG_LEVEL=info
- PYTHONUNBUFFERED=1
# HuggingFace caching configuration (shared with backend)
- HF_HOME=/app/.cache/huggingface
- HF_HUB_CACHE=/app/.cache/huggingface/hub
- HF_HUB_DISABLE_TELEMETRY=1
# PyTorch configuration (shared with backend)
# Reduce parallelism to avoid conflicts
- EMBEDDING_MAX_WORKERS=2
- KB_MAX_WORKERS=2
# Enable safe embedding mode for Docker
- EMBEDDING_SINGLE_THREADED=true
- EMBEDDING_SEQUENTIAL_FALLBACK=true
env_file:
- ./backend/.env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- replypier-network
restart: always
volumes:
- backend_data:/app/uploads
- temp_data:/app/temp
- ./config:/app/config
# Share the same caching volumes with backend
- huggingface_cache:/app/.cache/huggingface
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
crm_sync:
image: replypier/backend:latest
command: python -m app.workers.crm_sync
environment:
- LOG_LEVEL=info
- PYTHONUNBUFFERED=1
env_file:
- ./backend/.env
depends_on:
db:
condition: service_healthy
networks:
- replypier-network
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
ticket_investigator:
image: replypier/backend:latest
command: python -m app.workers.ticket_investigator
environment:
- REDIS_ENABLED=true
- REDIS_URL=redis://redis:6379/0
- LOG_LEVEL=info
- PYTHONUNBUFFERED=1
# FastEmbed (dedup embeddings) shares the HuggingFace cache
- HF_HOME=/app/.cache/huggingface
- HF_HUB_CACHE=/app/.cache/huggingface/hub
- HF_HUB_DISABLE_TELEMETRY=1
env_file:
- ./backend/.env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- replypier-network
restart: always
volumes:
- huggingface_cache:/app/.cache/huggingface
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
db:
build:
context: .
dockerfile: Dockerfile.postgres
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=replypier
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- replypier-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- replypier-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
networks:
replypier-network:
driver: bridge
volumes:
postgres_data:
redis_data:
backend_data:
temp_data:
# Add new volumes for model caching
huggingface_cache: