services: mysql: image: mysql:8.0 container_name: ai-chat-mysql restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: root command: - --default-authentication-plugin=mysql_native_password # ports: # - "3306:3306" volumes: - /data/mysql:/var/lib/mysql - /home/lian/share/aichat/init/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql:ro healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-proot"] interval: 15s timeout: 5s retries: 10 pgvector: image: pgvector/pgvector:pg16 container_name: ai-chat-pgvector restart: unless-stopped environment: POSTGRES_DB: ai_chat POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - "15432:5432" volumes: - /data/pgvector:/var/lib/postgresql/data - /home/lian/share/aichat/init/pgvector-init.sql:/docker-entrypoint-initdb.d/pgvector-init.sql:ro tokenizer: image: tokenizer:1.0.0 container_name: tokenizer # 容器内端口:3002 ports: - "3002:3002" restart: unless-stopped sensitive-filter: image: keywords-filter:1.0.0 container_name: sensitive-filter # 容器内端口:50053 volumes: - /home/lian/share/aichat/keywords-filter/dev.config.yaml:/app/config.yaml:ro - /home/lian/share/aichat/keywords-filter/dict.txt:/app/dict.txt:ro command: - --config=/app/config.yaml - --dict=/app/dict.txt ports: - "50053:50053" restart: unless-stopped keywords-filter: image: keywords-filter:1.0.0 container_name: keywords-filter # 容器内端口:50054 volumes: - /home/lian/share/aichat/keywords-filter/dev.kw.config.yaml:/app/config.yaml:ro - /home/lian/share/aichat/keywords-filter/keyword-dict.txt:/app/dict.txt:ro command: - --config=/app/config.yaml - --dict=/app/dict.txt ports: - "50054:50054" restart: unless-stopped ai-chat-service: build: context: ./ai-chat-service image: ai-chat-service:1.0.0 container_name: ai-chat-service volumes: - /home/lian/share/aichat/ai-chat-service/docker.config.yaml:/app/config.yaml:ro extra_hosts: - "host.docker.internal:host-gateway" ports: - "50055:50055" depends_on: - mysql - tokenizer - sensitive-filter - keywords-filter - pgvector healthcheck: test: ["CMD", "grpc_health_probe", "-addr=:50055"] interval: 15s timeout: 5s retries: 5 restart: unless-stopped chatgpt-web-backend: build: context: ./ai-chat-backend image: ai-chat-backend:1.0.0 container_name: chatgpt-web-backend # 容器内端口:7080 volumes: - /home/lian/share/aichat/ai-chat-backend/docker.config.yaml:/app/config.yaml:ro depends_on: - ai-chat-service restart: unless-stopped chatgpt-web-frontend: image: chatgpt-web-frontend:1.0.0 container_name: chatgpt-web-frontend depends_on: - chatgpt-web-backend # 容器内端口:80 ports: - "${FRONTEND_PORT}:80" restart: unless-stopped