version: '3.8'

services:
  # PostgreSQL Database (for local development)
  postgres:
    image: postgres:16-alpine
    container_name: wcag-ada-postgres-dev
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: wcag_ada_dev
    volumes:
      - postgres_dev_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d wcag_ada_dev"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - wcag-ada-dev-network

  # Redis (for local development)
  redis:
    image: redis:7-alpine
    container_name: wcag-ada-redis-dev
    command: redis-server --appendonly yes
    volumes:
      - redis_dev_data:/data
    ports:
      - "6379:6379"
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - wcag-ada-dev-network

networks:
  wcag-ada-dev-network:
    driver: bridge

volumes:
  postgres_dev_data:
  redis_dev_data: