# LOCAL DEVELOPMENT ONLY — do NOT use this file for staging or production deployments.
# For dev server:  docker-compose.staging.yml
# For production:  docker-compose.prod.yml
version: '3.8'

services:
  backend:
    build: .
    ports:
      - "8000:8000"
    env_file:
      - .env
    volumes:
      - .:/app
      # Mount local ADC credentials for Firebase (from `gcloud auth application-default login`)
      # On Linux/macOS: ~/.config/gcloud → /root/.config/gcloud inside the container
      - ${HOME}/.config/gcloud:/root/.config/gcloud:ro
    depends_on:
      redis:
        condition: service_healthy
    networks:
      - blob-network

  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 5
    networks:
      - blob-network

networks:
  blob-network:
    driver: bridge
