name: haushaltsApp

services:
  postgres:
    image: postgres
    container_name: haushaltsApp-postgres
    environment:
      POSTGRES_DB: haushaltsApp
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: password
    ports:
      - "5432:5432"
    volumes:
      - haushaltsApp_postgres_data:/var/lib/postgresql
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

volumes:
  haushaltsApp_postgres_data:
