docker probleme
This commit is contained in:
@@ -7,19 +7,26 @@ services:
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN pip install --no-cache-dir .
|
||||
ENV ROBOT_JSON=/config/robot.json
|
||||
# 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", "/config/robot.json", \
|
||||
"--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"
|
||||
volumes:
|
||||
- ./config/robot.json:/config/robot.json:ro
|
||||
environment:
|
||||
- ROBOT_JSON=/config/robot.json
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user