Skip to content

Commit

Permalink
Merge pull request #17 from vzakharchenko/Error_when_running_using_Do…
Browse files Browse the repository at this point in the history
…cker

Docker image issue
  • Loading branch information
vzakharchenko authored May 11, 2021
2 parents b3f4aa5 + 8099932 commit a3dc512
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 29 deletions.
27 changes: 8 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,18 @@ RUN wget -qO- https://deb.nodesource.com/setup_14.x | bash
RUN apt-get update && apt-get install -y ffmpeg yarn nodejs curl
RUN npm i pm2 -g
# Bundle APP files
RUN mkdir -p /opt/rtsp-samsung-tv/
COPY package.json /opt/rtsp-samsung-tv/package.json
COPY videoStream.js /opt/rtsp-samsung-tv/videoStream.js
COPY server.js /opt/rtsp-samsung-tv/server.js
COPY mpeg1muxer.js /opt/rtsp-samsung-tv/mpeg1muxer.js
COPY authenticationConnection.js /opt/rtsp-samsung-tv/authenticationConnection.js
COPY index.js /opt/rtsp-samsung-tv/index.js
COPY login /opt/rtsp-samsung-tv/login
RUN mkdir -p /opt/rtsp-samsung-tv/camera-admin-ui
RUN mkdir -p /opt/rtsp-samsung-tv/camera-admin-ui/build
COPY camera-admin-ui/package.json /opt/rtsp-samsung-tv/camera-admin-ui/package.json
COPY camera-admin-ui/public /opt/rtsp-samsung-tv/camera-admin-ui/public
COPY camera-admin-ui/src /opt/rtsp-samsung-tv/camera-admin-ui/src
COPY camera-admin-ui/config-overrides.js /opt/rtsp-samsung-tv/camera-admin-ui/config-overrides.js
RUN cd /opt/rtsp-samsung-tv/ && npm install
RUN cd /opt/rtsp-samsung-tv/camera-admin-ui/ && yarn --network-timeout 100000
RUN cd /opt/rtsp-samsung-tv/camera-admin-ui/ && yarn install
RUN cd /opt/rtsp-samsung-tv/camera-admin-ui/ && yarn build

RUN npm i [email protected] -g
# Install app dependencies
ENV NPM_CONFIG_LOGLEVEL warn
COPY entrypoint.sh /opt/entrypoint.sh
RUN chmod +x /opt/entrypoint.sh
EXPOSE 3004
EXPOSE 9999
EXPOSE 10000
EXPOSE 10001
EXPOSE 10002
EXPOSE 10003
EXPOSE 10004

ENTRYPOINT ["/opt/entrypoint.sh"]
#CMD [ "pm2-runtime", "start", "pm2.json" ]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ open ```http:\\<SERVER_IP>:3004``` (Default Login: **admin**, Default Password:

# Run Inside docker container
```
docker run -d --name=rtsp-samsung-tv -p 3004:3004 --restart=always vassio/rtsp-samsung-tv:latest
docker run -d --name=rtsp-samsung-tv -p 3004:3004 -p 9999-10004:9999-10004 --restart=always vassio/rtsp-samsung-tv:latest
```
## Configuration on Host:
```
echo "{}" >/opt/channels.json
docker run -d --name=smartthings-phone-presence-sensor -p 3004:3004 -v /opt/channels.json:/opt/config/channels.json --restart=always vassio/rtsp-samsung-tv:latest
docker run -d --name=rtsp-samsung-tv -p 3004:3004 -p 9999-10004:9999-10004 -v /opt/channels.json:/opt/config/channels.json --restart=always vassio/rtsp-samsung-tv:latest
```
## Keycloak Protection
```
echo "{}" >/opt/channels.json
docker run -d --name=smartthings-phone-presence-sensor -p 3004:3004 -v /opt/channels.json:/opt/config/channels.json -v `pwd`/keycloak.json:/opt/config/keycloak.json --restart=always vassio/rtsp-samsung-tv:latest
docker run -d --name=rtsp-samsung-tv -p 3004:3004 -p 9999-10004:9999-10004 -v /opt/channels.json:/opt/config/channels.json -v `pwd`/keycloak.json:/opt/config/keycloak.json --restart=always vassio/rtsp-samsung-tv:latest
```


Expand Down
2 changes: 1 addition & 1 deletion local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ docker rm rtsp-samsung-tv
# docker image prune -a -f

docker build -t rtsp-samsung-tv .
docker run --name=rtsp-samsung-tv -p 3004:3004 -v /home/vzakharchenko/home/rtsp-samsung-tv/config/channels.json:/opt/config/channels.json rtsp-samsung-tv
docker run --name=rtsp-samsung-tv -p 3004:3004 -p 9999-10004:9999-10004 -v /home/vzakharchenko/home/rtsp-samsung-tv/config/channels.json:/opt/config/channels.json rtsp-samsung-tv
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rtsp-samsung-tv",
"version": "1.1.21",
"version": "1.1.22",
"description": "Display RTSP streams from IP Cameras on Samsung smart TV (Tizen TV)",
"main": "server.js",
"scripts": {
Expand Down Expand Up @@ -47,22 +47,22 @@
"cron": "^1.8.2",
"express": "^4.17.1",
"express-session": "^1.17.1",
"keycloak-connect": "^12.0.1",
"keycloak-connect": "^13.0.0",
"mkdirp": "^1.0.4",
"node-rtsp-stream": "0.0.9",
"passport": "^0.4.1",
"passport-local": "^1.0.0",
"querystring": "^0.2.0",
"ws": "^7.4.2"
"querystring": "^0.2.1",
"ws": "^7.4.5"
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^7.18.0",
"eslint": "^7.26.0",
"eslint-config": "^0.3.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0"
"eslint-plugin-react": "^7.23.2"
},
"bin": {
"RtspSamsung": "./bin/RtspSamsungServer"
Expand Down

0 comments on commit a3dc512

Please sign in to comment.