- Replaced npm ci with npm install in docker-compose for better package management. - Introduced remote component loading for the VideoStreamingPage with error handling. - Updated the title in index.html to "Experiments Dashboard" for clarity. - Added new video remote service configuration in docker-compose for improved integration. - Removed deprecated files and components related to the video streaming feature to streamline the codebase. - Updated package.json and package-lock.json to include @originjs/vite-plugin-federation for module federation support.
83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
services:
|
|
api:
|
|
build:
|
|
context: ./camera-management-api
|
|
dockerfile: Dockerfile
|
|
working_dir: /app
|
|
volumes:
|
|
- ./camera-management-api:/app
|
|
- /mnt/nfs_share:/mnt/nfs_share
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /etc/timezone:/etc/timezone:ro
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib
|
|
- PYTHONPATH=/app:/app/camera_sdk
|
|
- TZ=America/New_York
|
|
command: >
|
|
sh -lc "
|
|
apt-get update && apt-get install -y libusb-1.0-0-dev;
|
|
|
|
# Install camera SDK if not already installed
|
|
if [ ! -f /lib/libMVSDK.so ] && [ -f 'camera_sdk/linuxSDK_V2.1.0.49(250108)/install.sh' ]; then
|
|
echo 'Installing camera SDK...';
|
|
cd 'camera_sdk/linuxSDK_V2.1.0.49(250108)';
|
|
chmod +x install.sh;
|
|
./install.sh;
|
|
cd /app;
|
|
echo 'Camera SDK installed successfully';
|
|
else
|
|
echo 'Camera SDK already installed or install script not found';
|
|
fi;
|
|
|
|
# Install Python dependencies
|
|
if [ -f requirements.txt ]; then
|
|
pip install --no-cache-dir -r requirements.txt;
|
|
else
|
|
pip install --no-cache-dir -e .;
|
|
fi;
|
|
|
|
# Start the application
|
|
python main.py --config config.compose.json
|
|
"
|
|
network_mode: host
|
|
|
|
web:
|
|
image: node:20-alpine
|
|
working_dir: /app
|
|
env_file:
|
|
- ./management-dashboard-web-app/.env
|
|
volumes:
|
|
- ./management-dashboard-web-app:/app
|
|
environment:
|
|
- CHOKIDAR_USEPOLLING=true
|
|
- TZ=America/New_York
|
|
command: >
|
|
sh -lc "
|
|
npm install;
|
|
npm run dev -- --host 0.0.0.0 --port 8080
|
|
"
|
|
# Ensure the web container can resolve host.docker.internal on Linux
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
video-remote:
|
|
image: node:20-alpine
|
|
working_dir: /app
|
|
environment:
|
|
- TZ=America/New_York
|
|
volumes:
|
|
- ./video-remote:/app
|
|
command: >
|
|
sh -lc "
|
|
npm install;
|
|
npm run build;
|
|
npx http-server dist -p 3001 --cors -c-1
|
|
"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ports:
|
|
- "3001:3001"
|