version: "3.8"

services:
  pocketbase:
    image: elestio/pocketbase:${SOFTWARE_VERSION_TAG}
    restart: always
    user: "0:0"
    expose:
      - 8090
    volumes:
      - pocketbase-data:/pb_data
    environment:
      - EMAIL=${EMAIL}
      - ADMIN_PASSWORD=${ADMIN_PASSWORD}
    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://localhost:8090/_/"]
      interval: 30s
      timeout: 10s
      retries: 3

volumes:
  pocketbase-data: {}
