services:
  frontend:
    build: .
    restart: unless-stopped
    environment:
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
    ports:
      - "8080:80"

  pocketbase-learning:
    image: ghcr.io/muchobien/pocketbase:latest
    container_name: pocketbase-learning
    restart: unless-stopped
    working_dir: /pb
    env_file:
      # Optional: absent .env.local must not block `docker compose up` (issue #18).
      - path: .env.local
        required: false
    command: ["serve", "--http=0.0.0.0:8090", "--dir=/pb/pb_data", "--migrationsDir=/pb/pb_migrations"]
    ports:
      - "8090:8090"
    volumes:
      - pb_data:/pb/pb_data
      - ./pb_migrations:/pb/pb_migrations

volumes:
  pb_data:
