#mkdir -pv /data/volumes/postgres/data
#pull:: docker compose --env-file ./dbSer/postgres/env.cfg -f ./dbSer/postgres/prod.stack.yml pull
#run::  docker compose -p prod-dbs  --env-file ./dbSer/postgres/env.cfg -f ./dbSer/postgres/prod.stack.yml up -d
services:

  postgres:
    image: ${IMAGE_TAG}
    container_name: prod-postgres
    restart: always
    shm_size: 256mb
    environment:
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD}
      - POSTGRES_INITDB_ARGS=--auth-host=${POSTGRES_HOST_AUTH_METHOD}
      - TZ=Asia/Shanghai
    volumes:
      - /data/volumes/postgres/data:/var/lib/postgresql/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "5432:5432"