47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
version: "3.3"
|
|
services:
|
|
|
|
appvideoserver:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.appvideoserver
|
|
image: appvideoserver:latest
|
|
container_name: AppRobotVideo
|
|
working_dir: /usr/src/app
|
|
# Mount your host folder into the container
|
|
volumes:
|
|
- .:/usr/src/app
|
|
ports:
|
|
- "8448:8443"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
depends_on:
|
|
- roboticsdriver
|
|
|
|
init: true
|
|
command: >
|
|
sh -c "
|
|
if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then
|
|
npm ci || npm install
|
|
else
|
|
npm install
|
|
fi
|
|
&& 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:2095
|
|
|
|
restart: unless-stopped
|
|
networks:
|
|
clouds:
|
|
ipv4_address: 172.20.0.12
|
|
default:
|
|
privileged: true
|
|
cap_add:
|
|
- SYS_ADMIN
|
|
security_opt:
|
|
- seccomp:unconfined |