version: "3.8"

services:
  #######################################
  # PostgreSQL: Database for the application
  #######################################
  wine_matchDb:
    image: postgres:16.8
    container_name: wine_match_db
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: wine_match_db
      POSTGRES_USER: wine_match_user
      POSTGRES_PASSWORD: wine_match123
    healthcheck:
      test: ["CMD-SHELL", "pg_isready"]
      interval: 10s
      timeout: 5s
      retries: 5
    ports:
      - 5434:5432

volumes:
  postgres_data: