mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: live-agent-postgres
|
|
environment:
|
|
POSTGRES_DB: live_agent
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
- ./init_db.sql:/docker-entrypoint-initdb.d/init_db.sql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: live-agent-minio
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
ports:
|
|
- "9000:9000" # S3 API port
|
|
- "9001:9001" # Web console port
|
|
volumes:
|
|
- ./data/minio:/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build: .
|
|
container_name: live-agent-api
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
# Override container-specific settings
|
|
DATABASE_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/live_agent
|
|
S3_ENDPOINT_URL: http://minio:9000
|
|
DEBUG: "True"
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
|
|
# All data volumes are now stored in ./data/ directory
|
|
# No named volumes needed
|
|
|