A. 最终效果
B. 文件修改
include:- path: ./docker-compose-base.ymlenv_file: ./.envservices:ragflow:depends_on:mysql:condition: service_healthyes01:condition: service_healthyimage: ${RAGFLOW_IMAGE}container_name: ragflow-serverports:- ${SVR_HTTP_PORT}:9380- 9980:80 - 8443:443 - 5678:5678volumes:- ./service_conf.yaml:/ragflow/conf/service_conf.yaml- ./ragflow-logs:/ragflow/logs- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf- ./nginx/proxy.conf:/etc/nginx/proxy.conf- ./nginx/nginx.conf:/etc/nginx/nginx.confenvironment:- TZ=${TIMEZONE}- HF_ENDPOINT=${HF_ENDPOINT}- MACOS=${MACOS}networks:- ragflowrestart: always
services:es01:container_name: ragflow-es-01privileged: true image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- esdata01:/usr/share/elasticsearch/dataports:- ${ES_PORT}:9200environment:- node.name=es01- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}- bootstrap.memory_lock=false- discovery.type=single-node- xpack.security.enabled=true- xpack.security.http.ssl.enabled=false- xpack.security.transport.ssl.enabled=false- TZ=${TIMEZONE}mem_limit: ${MEM_LIMIT}ulimits:nproc: 65535 healthcheck:test: ["CMD-SHELL", "curl http://localhost:9200"]interval: 10stimeout: 10sretries: 120networks:- ragflowrestart: alwaysmysql:image: mysql:8.0.39container_name: ragflow-mysqlenvironment:- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}- TZ=${TIMEZONE}command:--max_connections=1000--character-set-server=utf8mb4--collation-server=utf8mb4_general_ci--default-authentication-plugin=mysql_native_password--tls_version="TLSv1.2,TLSv1.3"--init-file /data/application/init.sqlports:- ${MYSQL_PORT}:3306volumes:- mysql_data:/var/lib/mysql- ./init.sql:/data/application/init.sqlnetworks:- ragflowhealthcheck:test: ["CMD", "mysqladmin" ,"ping", "-uroot", "-p${MYSQL_PASSWORD}"]interval: 10stimeout: 10sretries: 3restart: alwaysminio:image: quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Zcontainer_name: ragflow-miniocommand: server --console-address ":9001" /dataports:- ${MINIO_PORT}:9000- ${MINIO_CONSOLE_PORT}:9001environment:- MINIO_ROOT_USER=${MINIO_USER}- MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}- TZ=${TIMEZONE}volumes:- minio_data:/datanetworks:- ragflowrestart: alwaysredis:image: redis:7.2.4container_name: ragflow-rediscommand: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lruports:- ${REDIS_PORT}:6379volumes:- redis_data:/datanetworks:- ragflowrestart: alwaysvolumes:esdata01:driver: localmysql_data:driver: localminio_data:driver: localredis_data:driver: localnetworks:ragflow:driver: bridge
C. 参考文献
- infiniflow/ragflow: RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.