services: frontend: build: context: . dockerfile: frontend/Dockerfile container_name: law-frontend restart: unless-stopped depends_on: backend: condition: service_healthy chat-service: condition: service_healthy healthcheck: test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1/health >/dev/null 2>&1 && wget -q -O - http://127.0.0.1/chat-health >/dev/null 2>&1"] interval: 20s timeout: 5s retries: 5 start_period: 20s e2e: build: context: . dockerfile: e2e/Dockerfile image: law-e2e-playwright:1.58.2 container_name: law-e2e working_dir: /src/e2e depends_on: frontend: condition: service_healthy volumes: - .:/src - /src/e2e/node_modules environment: NODE_PATH: /opt/e2e/node_modules PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1" backend: build: . container_name: law-backend restart: unless-stopped env_file: .env depends_on: db: condition: service_healthy redis: condition: service_healthy minio: condition: service_started healthcheck: test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=3)\""] interval: 20s timeout: 5s retries: 5 start_period: 25s volumes: [".:/app"] chat-service: build: . container_name: law-chat-service restart: unless-stopped env_file: .env depends_on: db: condition: service_healthy redis: condition: service_healthy command: ["uvicorn", "app.chat_main:app", "--host", "0.0.0.0", "--port", "8001"] healthcheck: test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8001/health', timeout=3)\""] interval: 20s timeout: 5s retries: 5 start_period: 25s volumes: [".:/app"] worker: build: . container_name: law-worker restart: unless-stopped env_file: .env depends_on: db: condition: service_healthy redis: condition: service_healthy minio: condition: service_started command: ["celery","-A","app.workers.celery_app:celery_app","worker","-Q","notifications,maintenance,uploads","-l","INFO"] volumes: [".:/app"] beat: build: . container_name: law-beat restart: unless-stopped env_file: .env depends_on: redis: condition: service_healthy command: ["celery","-A","app.workers.celery_app:celery_app","beat","-l","INFO"] volumes: [".:/app"] db: image: postgres:16 container_name: law-db restart: unless-stopped environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_DB: ${POSTGRES_DB:-legal} volumes: ["pgdata:/var/lib/postgresql/data"] healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d legal"] interval: 10s timeout: 5s retries: 10 start_period: 15s redis: image: redis:7 container_name: law-redis restart: unless-stopped healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 10 start_period: 10s minio: image: minio/minio:latest container_name: law-minio restart: unless-stopped command: server /data --console-address ":9001" environment: MINIO_ROOT_USER: minioadmin MINIO_ROOT_PASSWORD: minioadmin volumes: ["miniodata:/data"] volumes: pgdata: miniodata: