services:
  postgres:
    image: postgres:17-alpine
    container_name: panel-postgres
    restart: unless-stopped
    environment:
      POSTGRES_USER: panel
      POSTGRES_PASSWORD: panel_dev
      POSTGRES_DB: panel
    ports:
      - "127.0.0.1:5432:5432"
    volumes:
      - panel_pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U panel -d panel"]
      interval: 5s
      timeout: 3s
      retries: 10

volumes:
  panel_pgdata:
