services:
  postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      POSTGRES_USER: communityrule
      POSTGRES_PASSWORD: communityrule
      POSTGRES_DB: communityrule
    ports:
      - "5432:5432"
    volumes:
      - pgdata:/var/lib/postgresql/data

  # Official image is amd64-only; pin platform so Apple Silicon uses emulation cleanly.
  mailhog:
    image: mailhog/mailhog:v1.0.1
    platform: linux/amd64
    restart: unless-stopped
    ports:
      - "1025:1025"
      - "8025:8025"

volumes:
  pgdata:
