chore: Update Docker compose files to use named volumes (#6704)

* chore: Update Docker compose files to use named volumes

* chore: Update Docker compose files to use named volumes (prod)
This commit is contained in:
Jon
2026-04-02 13:40:44 +08:00
committed by GitHub
parent 7049167c88
commit 515f1077c8
28 changed files with 498 additions and 167 deletions
@@ -57,12 +57,13 @@ services:
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgres
volumes:
- ./pg/data:/var/lib/postgresql/data
- fastgpt-pg:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'username', '-d', 'postgres']
interval: 5s
timeout: 5s
retries: 10
mongo:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.32 # cpu 不支持 AVX 时候使用 4.4.29
container_name: mongo
@@ -74,7 +75,7 @@ services:
- MONGO_INITDB_ROOT_USERNAME=myusername
- MONGO_INITDB_ROOT_PASSWORD=mypassword
volumes:
- ./mongo/data:/data/db
- fastgpt-mongo:/data/db
healthcheck:
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
interval: 10s
@@ -126,7 +127,7 @@ services:
retries: 3
start_period: 30s
volumes:
- ./redis/data:/data
- fastgpt-redis:/data
fastgpt-minio:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/minio:RELEASE.2025-09-07T16-13-09Z
container_name: fastgpt-minio
@@ -140,7 +141,7 @@ services:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- ./fastgpt-minio:/data
- fastgpt-minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
@@ -403,7 +404,7 @@ services:
restart: unless-stopped
container_name: aiproxy_pg
volumes:
- ./aiproxy_pg:/var/lib/postgresql/data
- fastgpt-aiproxy_pg:/var/lib/postgresql/data
networks:
- aiproxy
environment:
@@ -421,6 +422,20 @@ networks:
aiproxy:
vector:
volumes:
fastgpt-pg:
fastgpt-mongo:
fastgpt-redis:
fastgpt-minio:
fastgpt-milvus-minio:
fastgpt-milvus-etcd:
fastgpt-milvus-data:
fastgpt-ob-data:
fastgpt-ob-config:
fastgpt-seekdb-data:
fastgpt-seekdb-config:
fastgpt-aiproxy_pg:
configs:
opensandbox-config:
content: |
@@ -441,4 +456,4 @@ configs:
# 容器内访问宿主机服务时需要设置为宿主机 IP 或 hostname
# macOS/Windows: host.docker.internalLinux: 宿主机 LAN IP(如 192.168.1.100
host_ip = "host.docker.internal"