Files
appRobotVideoControls/install_inside_docker.yaml
2026-04-26 20:38:41 +02:00

54 lines
1.6 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: "3.3"
services:
appvideoserver:
image: node:lts-bookworm-slim # Standard-Image, kein Build nötig
container_name: AppRobotVideo
working_dir: /usr/src/app
volumes:
- .:/usr/src/app # Mountet dein Workspace (inkl. install_inside_docker.sh und .installed)
ports:
- "8448:8443"
extra_hosts:
- "host.docker.internal:host-gateway"
init: true
command: >
sh -c "
# Einmalige Installation: Checke Flag-File (.installed im gemounteten Volume)
if [ ! -f .installed ]; then
echo 'Running first-time installation...'
./install_inside_docker.sh && touch .installed
else
echo 'Installation already done, skipping...'
fi &&
# NPM-Installation (einmalig machen, wenn gewünscht hier immer, aber du kannst es anpassen)
if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then
npm ci || npm install
else
npm install
fi &&
# Starte die App
npm start"
environment:
- NODE_ENV=production
- HOST_UID=${UID-1000}
- HOST_GID=${GID-1000}
- DEV0=/dev/video0
- DEV1=/dev/video2
- TARGET_SERVER=wss://host.docker.internal:2096
# Optional: Env-Var für dein Script (z.B. um es zu überspringen)
- SKIP_INSTALL=false # Kannst du setzen, um manuell zu überspringen
restart: unless-stopped
networks:
- appRobotNet
- default
privileged: true
cap_add:
- SYS_ADMIN
security_opt:
- seccomp:unconfined
networks:
default:
driver: bridge
appRobotNet:
external: true