# Portainer stack — Kaiser Natron dev showcase.
#
# Flow:
#   1. Developer runs `npm run build` locally and commits the updated dist/.
#   2. Portainer → Stacks → Pull and redeploy.
#   3. The image is a tiny nginx with the prebuilt dist copied in.
#
# This is deliberately simple for a showcase box — no container-side npm,
# no hardening, no resource ceilings. Tighten when it graduates to prod.

services:
  web:
    build:
      context: .
      dockerfile: Dockerfile
    image: kaiser-natron:portainer
    # Only build locally — never try to pull from a registry. Portainer's
    # "Pull and redeploy" runs `compose pull` first, which would otherwise
    # try to resolve `kaiser-natron:portainer` against Docker Hub and fail.
    pull_policy: build
    restart: unless-stopped
    ports:
      - "5555:80"
    healthcheck:
      test: ["CMD", "wget", "-q", "-O-", "http://127.0.0.1/health"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 10s
