services:
  recipe-flutter:
    build:
      context: ./flutter
      dockerfile: Dockerfile
      args:
        API_BASE_URL: "/api"
        SOURCE_MAPS: "false"
        WEB_RENDERER: "auto"
    image: recipe-flutter:local
    container_name: recipe-flutter
    restart: unless-stopped
    environment:
      PORT: "5000"
    ports:
      - "5000:5000"
    volumes:
      - recipe_images:/usr/share/caddy/images
    depends_on:
      recipe-api:
        condition: service_healthy
    healthcheck:
      test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:5000 >/dev/null 2>&1 || exit 1"]
      interval: 20s
      timeout: 10s
      retries: 5
      start_period: 60s
    networks:
      - proxy
      - recipe-internal
