Files
TERES_fastapi_backend/docker/docker-compose-base.yml

218 lines
5.8 KiB
YAML
Raw Normal View History

2025-10-13 13:18:03 +08:00
services:
2025-11-07 11:48:05 +08:00
opensearch01:
container_name: ragflow-opensearch-01
2025-11-04 16:06:36 +08:00
profiles:
2025-11-07 11:48:05 +08:00
- opensearch
2025-11-10 17:14:15 +08:00
image: hub.icert.top/opensearchproject/opensearch:3.3.2
2025-10-13 13:18:03 +08:00
volumes:
2025-11-07 11:48:05 +08:00
- osdata01:/usr/share/opensearch/data
2025-10-13 13:18:03 +08:00
ports:
2025-11-07 11:48:05 +08:00
- ${OS_PORT}:9201
2025-10-13 13:18:03 +08:00
env_file: .env
environment:
2025-11-07 11:48:05 +08:00
- node.name=opensearch01
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}
2025-10-13 13:18:03 +08:00
- bootstrap.memory_lock=false
- discovery.type=single-node
2025-11-07 11:48:05 +08:00
- plugins.security.disabled=false
- plugins.security.ssl.http.enabled=false
- plugins.security.ssl.transport.enabled=true
2025-10-13 13:18:03 +08:00
- cluster.routing.allocation.disk.watermark.low=5gb
- cluster.routing.allocation.disk.watermark.high=3gb
- cluster.routing.allocation.disk.watermark.flood_stage=2gb
- TZ=${TIMEZONE}
2025-11-07 11:48:05 +08:00
- http.port=9201
2025-10-13 13:18:03 +08:00
mem_limit: ${MEM_LIMIT}
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
2025-11-07 11:48:05 +08:00
test: ["CMD-SHELL", "curl http://localhost:9201"]
2025-10-13 13:18:03 +08:00
interval: 10s
timeout: 10s
retries: 120
networks:
- ragflow
restart: on-failure
2025-11-10 17:14:15 +08:00
opensearch-dashboards:
container_name: ragflow-opensearch-dashboards
profiles:
- opensearch
image: opensearchproject/opensearch-dashboards:3.3.0
env_file: .env
environment:
- OPENSEARCH_HOSTS=["http://opensearch01:9201"]
- OPENSEARCH_USERNAME=admin
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- TZ=${TIMEZONE}
ports:
- 5601:5601
depends_on:
- opensearch01
networks:
- ragflow
restart: on-failure
es01:
container_name: ragflow-es-01
profiles:
- elasticsearch
image: elasticsearch:${STACK_VERSION}
volumes:
- esdata01:/usr/share/elasticsearch/data
ports:
- ${ES_PORT}:9200
env_file: .env
environment:
- 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
- cluster.routing.allocation.disk.watermark.low=5gb
- cluster.routing.allocation.disk.watermark.high=3gb
- cluster.routing.allocation.disk.watermark.flood_stage=2gb
- TZ=${TIMEZONE}
mem_limit: ${MEM_LIMIT}
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:9200"]
interval: 10s
timeout: 10s
retries: 120
networks:
- ragflow
restart: on-failure
2025-11-04 17:26:44 +08:00
postgres:
image: postgres:15
container_name: ragflow-postgres
2025-10-13 13:18:03 +08:00
env_file: .env
environment:
2025-11-04 17:26:44 +08:00
- POSTGRES_DB=${POSTGRES_DBNAME}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
2025-10-13 13:18:03 +08:00
- TZ=${TIMEZONE}
2025-11-04 17:26:44 +08:00
ports:
- ${POSTGRES_PORT-5440}:5432
volumes:
- postgres_data:/var/lib/postgresql/data
2025-11-04 16:06:36 +08:00
networks:
- ragflow
2025-11-18 15:30:23 +08:00
mem_limit: ${MEM_LIMIT}
2025-11-04 16:06:36 +08:00
healthcheck:
2025-11-04 17:26:44 +08:00
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DBNAME}"]
2025-11-04 16:06:36 +08:00
interval: 10s
2025-11-04 17:26:44 +08:00
timeout: 5s
retries: 5
2025-11-04 16:06:36 +08:00
restart: on-failure
sandbox-executor-manager:
container_name: ragflow-sandbox-executor-manager
profiles:
- sandbox
image: ${SANDBOX_EXECUTOR_MANAGER_IMAGE-infiniflow/sandbox-executor-manager:latest}
privileged: true
2025-10-13 13:18:03 +08:00
ports:
2025-11-04 16:06:36 +08:00
- ${SANDBOX_EXECUTOR_MANAGER_PORT-9385}:9385
env_file: .env
2025-10-13 13:18:03 +08:00
volumes:
2025-11-04 16:06:36 +08:00
- /var/run/docker.sock:/var/run/docker.sock
2025-10-13 13:18:03 +08:00
networks:
- ragflow
2025-11-04 16:06:36 +08:00
security_opt:
- no-new-privileges:true
environment:
- TZ=${TIMEZONE}
- SANDBOX_EXECUTOR_MANAGER_POOL_SIZE=${SANDBOX_EXECUTOR_MANAGER_POOL_SIZE:-3}
- SANDBOX_BASE_PYTHON_IMAGE=${SANDBOX_BASE_PYTHON_IMAGE:-infiniflow/sandbox-base-python:latest}
- SANDBOX_BASE_NODEJS_IMAGE=${SANDBOX_BASE_NODEJS_IMAGE:-infiniflow/sandbox-base-nodejs:latest}
- SANDBOX_ENABLE_SECCOMP=${SANDBOX_ENABLE_SECCOMP:-false}
- SANDBOX_MAX_MEMORY=${SANDBOX_MAX_MEMORY:-256m}
- SANDBOX_TIMEOUT=${SANDBOX_TIMEOUT:-10s}
2025-11-18 15:30:23 +08:00
mem_limit: ${MEM_LIMIT}
2025-10-13 13:18:03 +08:00
healthcheck:
2025-11-04 16:06:36 +08:00
test: ["CMD", "curl", "http://localhost:9385/healthz"]
2025-10-13 13:18:03 +08:00
interval: 10s
timeout: 5s
retries: 5
restart: on-failure
minio:
image: quay.io/minio/minio:RELEASE.2025-06-13T11-33-47Z
container_name: ragflow-minio
command: server --console-address ":9001" /data
ports:
- ${MINIO_PORT}:9000
- ${MINIO_CONSOLE_PORT}:9001
env_file: .env
environment:
- MINIO_ROOT_USER=${MINIO_USER}
- MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
- TZ=${TIMEZONE}
volumes:
- minio_data:/data
networks:
- ragflow
restart: on-failure
2025-11-18 15:30:23 +08:00
mem_limit: ${MEM_LIMIT}
2025-10-13 13:18:03 +08:00
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
redis:
# swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/valkey/valkey:8
2025-11-04 16:06:36 +08:00
image: valkey/valkey:8
2025-10-13 13:18:03 +08:00
container_name: ragflow-redis
command: redis-server --requirepass ${REDIS_PASSWORD} --maxmemory 128mb --maxmemory-policy allkeys-lru
env_file: .env
ports:
- ${REDIS_PORT}:6379
volumes:
- redis_data:/data
networks:
- ragflow
restart: on-failure
2025-11-18 15:30:23 +08:00
mem_limit: ${MEM_LIMIT}
2025-10-13 13:18:03 +08:00
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 5s
timeout: 3s
retries: 3
start_period: 10s
volumes:
esdata01:
2025-11-04 17:26:44 +08:00
name: ragflow_esdata01
2025-10-13 13:18:03 +08:00
osdata01:
2025-11-04 17:26:44 +08:00
name: ragflow_osdata01
2025-10-13 13:18:03 +08:00
infinity_data:
2025-11-04 17:26:44 +08:00
name: ragflow_infinity_data
2025-10-13 13:18:03 +08:00
mysql_data:
2025-11-04 17:26:44 +08:00
name: ragflow_mysql_data
2025-10-13 13:18:03 +08:00
minio_data:
2025-11-04 17:26:44 +08:00
name: ragflow_minio_data
2025-10-13 13:18:03 +08:00
redis_data:
2025-11-04 17:26:44 +08:00
name: ragflow_redis_data
postgres_data:
name: ragflow_postgres_data
2025-10-13 13:18:03 +08:00
networks:
ragflow:
2025-11-04 17:26:44 +08:00
name: ragflow
2025-10-13 13:18:03 +08:00
driver: bridge