| # Requires a project `.env` (copy from `.env.example`) for `env_file` and variable substitution. | |
| name: docuaudit-ai | |
| x-app: | |
| build: . | |
| image: docuaudit-ai:${IMAGE_TAG:-local} | |
| services: | |
| api: | |
| <<: | |
| command: uvicorn api.main:app --host 0.0.0.0 --port 8000 | |
| ports: | |
| - "${API_PORT:-8000}:8000" | |
| env_file: | |
| - .env | |
| environment: | |
| CHROMA_PERSIST_DIRECTORY: /data/chroma | |
| AUDIT_DB_PATH: /data/audit.db | |
| JOBS_DB_PATH: /data/jobs.db | |
| OLLAMA_BASE_URL: ${OLLAMA_BASE_URL:-http://host.docker.internal:11434} | |
| volumes: | |
| - docuaudit_data:/data | |
| extra_hosts: | |
| - "host.docker.internal:host-gateway" | |
| healthcheck: | |
| test: | |
| [ | |
| "CMD", | |
| "python", | |
| "-c", | |
| "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=5)", | |
| ] | |
| interval: 15s | |
| timeout: 5s | |
| retries: 5 | |
| start_period: 40s | |
| streamlit: | |
| <<: | |
| command: > | |
| streamlit run app.py | |
| --server.port=8501 | |
| --server.address=0.0.0.0 | |
| --server.headless=true | |
| --browser.gatherUsageStats=false | |
| ports: | |
| - "${STREAMLIT_PORT:-8501}:8501" | |
| env_file: | |
| - .env | |
| environment: | |
| DOC_AUDI_API_BASE: http://api:8000 | |
| STREAMLIT_BACKEND_URL: http://api:8000 | |
| depends_on: | |
| api: | |
| condition: service_healthy | |
| ollama: | |
| image: ollama/ollama:latest | |
| profiles: ["ollama"] | |
| ports: | |
| - "${OLLAMA_HOST_PORT:-11434}:11434" | |
| volumes: | |
| - ollama_data:/root/.ollama | |
| volumes: | |
| docuaudit_data: | |
| ollama_data: | |