version: "3.9"

services:
  postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    ports:
      - "${DB_PORT:-5432}:5432"
    environment:
      POSTGRES_DB: ${DB_NAME:-calendar_run}
      POSTGRES_USER: ${DB_USER:-calendar_user}
      POSTGRES_PASSWORD: ${DB_PASSWORD:-calendar_pass}
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:
