services: pipeline: build: context: . dockerfile_inline: | FROM python:3.11-slim WORKDIR /app COPY . . RUN pip install --no-cache-dir . # robot.json wird per "COPY . ." mit ins Image gebacken und liegt damit # IMMER unter /app/config/robot.json. Kein Bind-Mount noetig -> laeuft # out-of-the-box auch als Portainer-Stack (dort gibt es kein lokales # ./config, ein fehlender Mount-Pfad wuerde sonst ein leeres Verzeichnis # erzeugen und jeden /v1/estimate mit 500 (IsADirectoryError) abbrechen). ENV ROBOT_JSON=/app/config/robot.json EXPOSE 8446 HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \ CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8446/v1/health')" CMD ["python", "-m", "scripts.api", \ "--robot", "/app/config/robot.json", \ "--host", "0.0.0.0", "--port", "8446"] image: approbot/pose-pipeline:1.0.0 container_name: appRobotBodyTracker restart: unless-stopped ports: - "8446:8446" # Optional: eigene robot.json ohne Rebuild einspielen, indem die eingebackene # Kopie ueberlagert wird. NUR aktivieren, wenn die Host-Datei WIRKLICH existiert # (sonst legt Docker dort ein leeres Verzeichnis an -> 500). Im Portainer-Stack # in der Regel nicht noetig, da die robot.json bereits im Image enthalten ist. # volumes: # - /home/chk/Documents/appRobotBodyTracker/config/robot.json:/app/config/robot.json:ro