# Lokale Postgres-Instanz für Entwicklung (dev branch).
# Start:  docker compose -f docker-compose.dev.yml up -d
# Stop:   docker compose -f docker-compose.dev.yml down
# Reset:  docker compose -f docker-compose.dev.yml down -v   (löscht alle Daten!)

services:
  postgres:
    image: postgres:16-alpine
    container_name: flixcooks-postgres-dev
    restart: unless-stopped
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: flixcooks
      POSTGRES_PASSWORD: flixcooks_dev
      POSTGRES_DB: flixcooks_dev
    volumes:
      - flixcooks_pg_dev:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U flixcooks -d flixcooks_dev"]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  flixcooks_pg_dev:
