fetch_ml/deployments/docker-compose.local.yml
Jeremie Fraeys 5691b06876
fix(deployments): add env var support for data directories
Update all docker-compose files to use environment variables for data paths:

- docker-compose.local.yml: Use LOCAL_DATA_DIR with fallback to ../data/dev
- docker-compose.prod.yml: Use PROD_DATA_DIR with fallback to data/prod
- docker-compose.prod.smoke.yml: Use SMOKE_TEST_DATA_DIR with fallback

This allows smoke tests and local development to use temp directories
instead of repo-relative paths, avoiding file sharing permission issues
on macOS with Docker Desktop or Colima.
2026-02-24 11:43:11 -05:00

47 lines
1.4 KiB
YAML

---
# Docker Compose override for local testing with pre-built images
services:
api-server:
image: fetchml-api:latest
ports:
- "9101:9101"
volumes:
- ${LOCAL_DATA_DIR:-../data/dev}/logs:/logs
- ${LOCAL_DATA_DIR:-../data/dev}/experiments:/data/experiments
- ${LOCAL_DATA_DIR:-../data/dev}/active:/data/active
- ${LOCAL_DATA_DIR:-../data/dev}/workspaces:/data/active/workspaces:delegated
- ../configs/api/dev.yaml:/app/configs/api/dev.yaml
environment:
- LOG_LEVEL=info
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9101/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
worker:
image: fetchml-worker:latest
privileged: true
ports:
- "8888:8888"
volumes:
- ${LOCAL_DATA_DIR:-../data/dev}/logs:/logs
- ${LOCAL_DATA_DIR:-../data/dev}/active:/data/active
- ${LOCAL_DATA_DIR:-../data/dev}/experiments:/data/experiments
- ${LOCAL_DATA_DIR:-../data/dev}/workspaces:/data/active/workspaces:delegated
- ../configs/workers/docker-dev.yaml:/app/configs/worker.yaml
- /sys/fs/cgroup:/sys/fs/cgroup:rw
environment:
- LOG_LEVEL=info
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin123
depends_on:
redis:
condition: service_healthy
api-server:
condition: service_healthy