Files
appRobotHoming/docker-compose.yaml
2026-06-25 17:34:41 +02:00

38 lines
1.6 KiB
YAML
Executable File

services:
appRobotHoming:
image: node:20-bullseye
container_name: appRobot_Homing
working_dir: /app
volumes:
- /home/chk/Documents/appRobotHoming:/app
environment:
- HTTPS_PORT=2093
# host.docker.internal zeigt auf den Docker-Host → erreicht andere Stacks per Port
- PYTHON_BIN=python3
- WEBCAM_URL=http://host.docker.internal:8444
- BODYTRACKER_URL=http://host.docker.internal:8446
# Driver-WebSocket (Plain-Text-G-Code, self-signed). Homing sendet G92
# hierhin (= Motorposition setzen ohne Bewegung).
# WICHTIG: Der Input-WS lauscht container-intern auf 2095 (startRobot.js:
# PORT||2095) und ist NICHT per host-port veröffentlicht. Die Driver-Ports
# 2081 (Node --inspect) und 2098 (Info/Status) sind NICHT dieser WS.
# Variante A (robust): beide Container im selben Netz (approbots), per Name:
- DRIVER_WS_URL=wss://appRobot_Driver:2095
# Variante B (über Host): im Driver `- "2095:2095"` veröffentlichen, dann
# DRIVER_WS_URL=wss://host.docker.internal:2095
extra_hosts:
# Macht host.docker.internal auf Linux verfügbar (Standard auf macOS/Windows)
- "host.docker.internal:host-gateway"
ports:
- "2093:2093"
command: >
/bin/bash -lc "apt-get update -qq && apt-get install -y --no-install-recommends python3-pip && pip3 install --quiet --no-cache-dir opencv-python-headless numpy scipy && npm ci || npm install && node server/server.js"
networks:
- approbots
restart: unless-stopped
networks:
approbots:
external: true
name: approbots