60 lines
1.2 KiB
YAML
60 lines
1.2 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:2096
|
|
|
|
restart: unless-stopped
|
|
networks:
|
|
- appRobotNet
|
|
- default
|
|
privileged: true
|
|
cap_add:
|
|
- SYS_ADMIN
|
|
security_opt:
|
|
- seccomp:unconfined
|
|
|
|
|
|
# docker network create appRobotNet
|
|
# 1406d60f37e191ccb5bf763b35f5488e4c594ae7e53d590aad4a14428e9459a3
|
|
|
|
|
|
networks:
|
|
|
|
default: # this is the default network for this stack
|
|
driver: bridge
|
|
appRobotNet:
|
|
external: true
|
|
|