name: call-center-postgres

services:
  postgres:
    container_name: call-center-postgres
    image: postgres:16-alpine
    restart: unless-stopped
    env_file:
      - ../.env.postgres.server
    ports:
      - "127.0.0.1:5434:5432"
    volumes:
      - ../.data_pg:/var/lib/postgresql/data
    healthcheck:
      test:
        - CMD-SHELL
        - pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
      interval: 10s
      timeout: 5s
      retries: 12
      start_period: 15s
