services:
  postgres:
    image: postgres:15-alpine
    container_name: paperburner-postgres
    restart: unless-stopped
    environment:
      POSTGRES_USER: paperburner
      POSTGRES_PASSWORD: paperburner123
      POSTGRES_DB: paperburner
    ports:
      - "15432:5432"
    volumes:
      - paperburner-pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U paperburner"]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  paperburner-pgdata: