services:
  postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      POSTGRES_USER: origin
      POSTGRES_PASSWORD: origin
      POSTGRES_DB: origin_merch
    ports:
      - "5432:5432"
    volumes:
      - origin_pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U origin -d origin_merch"]
      interval: 5s
      timeout: 5s
      retries: 10

volumes:
  origin_pgdata:
