Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ nltk_data/
.lh/
.venv
docker/data
docker/oceanbase/data
docker/oceanbase/conf


#--------------------------------------------------#
Expand Down
9 changes: 8 additions & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ OB_LOG_DISK_SIZE=20G
# Note that the meta and doc databases need to be created first.
OCEANBASE_HOST=oceanbase
OCEANBASE_PORT=2881
OCEANBASE_USER=root@${OB_TENANT_NAME}
# OCEANBASE_USER configuration:
# The docker-compose files are configured for different user formats depending on the OceanBase image:
# - docker-compose.yml (seekdb): expects 'root'
# - docker-compose-oceanbase.yml (oceanbase-ce): expects 'root@${OB_TENANT_NAME}'
#
# You can override this value in your .env file if needed, but usually it's not necessary.
# Default value below is for seekdb (the default docker-compose.yml):
OCEANBASE_USER=root
OCEANBASE_PASSWORD=${OB_TENANT_PASSWORD}
OCEANBASE_META_DBNAME=powerrag
OCEANBASE_DOC_DBNAME=powerrag_doc
Expand Down
95 changes: 95 additions & 0 deletions docker/docker-compose-oceanbase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
services:
powerrag:
depends_on:
oceanbase:
condition: service_healthy
image: ${POWERRAG_IMAGE}
ports:
- ${SVR_WEB_HTTP_PORT}:80
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- ${SVR_MCP_PORT}:9382 # entry for MCP (host_port:docker_port). The docker_port must match the value you set for `mcp-port` above.
- ${POWERRAG_SVR_HTTP_PORT:-6000}:6000 # entry for PowerRAG server (host_port:docker_port). The docker_port must match the value you set for `powerrag-port` above.
volumes:
- ./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.conf
- ../history_data_agent:/ragflow/history_data_agent
- ./service_conf.yaml.template:/ragflow/conf/service_conf.yaml.template
- ./entrypoint.sh:/ragflow/entrypoint.sh
env_file: .env
environment:
- TZ=${TIMEZONE}
- HF_ENDPOINT=${HF_ENDPOINT-}
- MACOS=${MACOS-}
networks:
- powerrag
restart: on-failure
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9380/v1/system/healthz && curl -f http://localhost:6000/health"]
interval: 10s
timeout: 15s
retries: 30
start_period: 300s
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"

oceanbase:
image: oceanbase/oceanbase-ce:4.4.1.0-100000032025101610
profiles:
- oceanbase
ports:
- ${EXPOSE_OB_PORT:-2881}:2881
env_file: .env
environment:
- OB_CLUSTER_NAME=${OB_CLUSTER_NAME:-powerrag}
- OB_SERVER_IP=127.0.0.1
volumes:
- ./oceanbase/init.d:/root/boot/init.d
- ./oceanbase/data:/root/ob
- ./oceanbase/conf:/root/.obd/cluster
networks:
- powerrag
restart: on-failure
healthcheck:
test: [ 'CMD-SHELL', 'obclient -h127.0.0.1 -P2881 -uroot@${OB_TENANT_NAME} -p${OB_TENANT_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS ${OCEANBASE_META_DBNAME:-powerrag}; CREATE DATABASE IF NOT EXISTS ${OCEANBASE_DOC_DBNAME:-powerrag_doc};"' ]
interval: 10s
retries: 30
start_period: 30s
timeout: 10s

# Gotenberg service for document conversion
gotenberg:
image: gotenberg/gotenberg:8
env_file: .env
environment:
- CHROMIUM_DISABLE_SANDBOX=true
- LIBREOFFICE_DISABLE_SANDBOX=true
- API_TIMEOUT=60s
- LOG_LEVEL=info
deploy:
resources:
limits:
cpus: '2'
memory: 4G
reservations:
cpus: '1'
memory: 1G
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:3000/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- powerrag

networks:
powerrag:
driver: bridge

16 changes: 11 additions & 5 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,36 @@ services:
networks:
- powerrag
restart: on-failure
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9380/v1/system/healthz && curl -f http://localhost:6000/health"]
interval: 10s
timeout: 15s
retries: 30
start_period: 300s
# https://docs.docker.com/engine/daemon/prometheus/#create-a-prometheus-configuration
# If you use Docker Desktop, the --add-host flag is optional. This flag ensures that the host's internal IP is exposed to the Prometheus container.
extra_hosts:
- "host.docker.internal:host-gateway"

oceanbase:
image: oceanbase/oceanbase-ce:4.4.1.0-100000032025101610
image: oceanbase/seekdb:1.0.0.0-100000262025111218
profiles:
- oceanbase
ports:
- ${EXPOSE_OB_PORT:-2881}:2881
env_file: .env
environment:
- OB_CLUSTER_NAME=${OB_CLUSTER_NAME:-powerrag}
- ROOT_PASSWORD=${OCEANBASE_PASSWORD:-powerrag}
- OB_SERVER_IP=127.0.0.1
volumes:
- ./oceanbase/data:/var/lib/oceanbase/store
- ./oceanbase/conf:/var/lib/oceanbase/etc
- ./oceanbase/init.d:/root/boot/init.d
- ./oceanbase/data:/root/ob
- ./oceanbase/conf:/root/.obd/cluster
networks:
- powerrag
restart: on-failure
healthcheck:
test: [ 'CMD-SHELL', 'obclient -h127.0.0.1 -P2881 -uroot@${OB_TENANT_NAME} -p${OB_TENANT_PASSWORD} -e "CREATE DATABASE IF NOT EXISTS ${OCEANBASE_META_DBNAME:-powerrag}; CREATE DATABASE IF NOT EXISTS ${OCEANBASE_DOC_DBNAME:-powerrag_doc};"' ]
test: [ 'CMD-SHELL', 'mysql -h127.0.0.1 -P2881 -uroot -p${ROOT_PASSWORD:-powerrag} -e "CREATE DATABASE IF NOT EXISTS ${OCEANBASE_META_DBNAME:-powerrag}; CREATE DATABASE IF NOT EXISTS ${OCEANBASE_DOC_DBNAME:-powerrag_doc};"' ]
interval: 10s
retries: 30
start_period: 30s
Expand Down