# Local development environment for rdev-api
# Usage: docker compose up -d

services:
  postgres:
    image: postgres:15-alpine
    container_name: rdev-postgres
    environment:
      POSTGRES_USER: appuser
      POSTGRES_PASSWORD: localdev
      POSTGRES_DB: rdev
    ports:
      - "5433:5432"  # Use 5433 to avoid conflicts with local postgres
    volumes:
      - rdev-postgres-data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U appuser -d rdev"]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  rdev-postgres-data:
