OpenVidu Call docker deployment Issue

Hi,

I am facing issue with dockerizing the openvidu-call-front angular application.
Issue log:

npm notice New minor version of npm available! 8.1.2 → 8.5.5 npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.5.5 npm notice Run npm install -g npm@8.5.5 to update! npm notice npm ERR! code ERESOLVE e[0me[91mnpm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm e[0me[91mERR! While resolving: openvidu-call@2.21.0 npm ERR! Found: @angular/common@12.1.3 npm ERR! node_modules/@angular/common npm ERR! @angular/common@“12.1.3” from the root project npm e[0me[91mERR! npm ERR! Could not resolve dependency: npm ERR!e[0me[91m peer @angular/common@"^10.0.6" from ng2-canvas-whiteboard@4.0.1 npm e[0me[91mERR! node_modules/ng2-canvas-whiteboard npme[0me[91m ERR!e[0me[91m ng2-canvas-whiteboard@“4.0.1” from the root project npm ERR!e[0me[91m npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /root/.npm/eresolve-report.txt for a full report. e[0me[91m npm ERR! A complete log of this run can be found in: npme[0me[91m ERR!e[0me[91m /root/.npm/_logs/2022-03-21T12_49_33_726Z-debug.log e[0mThe command ‘/bin/sh -c wget “https://github.com/OpenVidu/openvidu-call/archive/${BRANCH_NAME}.zip” -O openvidu-call.zip && unzip openvidu-call.zip && rm openvidu-call.zip && mv openvidu-call-${BRANCH_NAME}/openvidu-call-front/ . && mv openvidu-call-${BRANCH_NAME}/openvidu-call-back/ . && rm openvidu-call-front/package-lock.json && rm openvidu-call-back/package-lock.json && rm -rf openvidu-call-${BRANCH_NAME} && npm i --prefix openvidu-call-front && npm run build-prod ${BASE_HREF} --prefix openvidu-call-front && rm -rf openvidu-call-front && npm i --prefix openvidu-call-back && npm run build --prefix openvidu-call-back && mv openvidu-call-back/dist . && rm -rf openvidu-call-back’ returned

Kindly help, TIA

Hi,

It seems an upstream depedency conflict (which is really a warning, but NPM decided time ago to fail the installation command by default). Try running the npm install (or npm i) with the flag --force.
We will take a look to the package.json dependencies to fix the conflict.

Hi @pabloFuente ,

This solution worked.
But I am getting error at application level after successfull docker build.
Kindly help. TIA.

Below is the error log:

[32m[nodemon] starting node openvidu-call-server.jse[39m
/opt/openvidu-call/openvidu-call-server.js:161

… ^
Error: URL format incorrect: TypeError [ERR_INVALID_URL]: Invalid URL
at e.setHostnameAndPort (/opt/openvidu-call/openvidu-call-server.js:161:10029)
at new e (/opt/openvidu-call/openvidu-call-server.js:161:2544)
at new e (/opt/openvidu-call/openvidu-call-server.js:321:5408)
at Object. (/opt/openvidu-call/openvidu-call-server.js:321:3133)
at n (/opt/openvidu-call/openvidu-call-server.js:1:233)
at Object. (/opt/openvidu-call/openvidu-call-server.js:161:38610)
at n (/opt/openvidu-call/openvidu-call-server.js:1:233)
at /opt/openvidu-call/openvidu-call-server.js:1:1025
at Object. (/opt/openvidu-call/openvidu-call-server.js:1:1035)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
e[31m[nodemon] app crashed - waiting for file changes before starting…e[39m

Hi @deepak_hegde

Checking your error Error: URL format incorrect: TypeError [ERR_INVALID_URL]: Invalid URL,
you are probably setting an invalid url when runnning the docker container. with the param -e OPENVIDU_URL=<your-openvidu-url>
Please check it out the docs openvidu-call - OpenVidu Docs

Is there any way I can add the URL directly, without mentioning it as -e argument explicitly?
If so, where I can add this?