-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 772 Bytes
/
Dockerfile
File metadata and controls
30 lines (21 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:boron
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install
COPY . /usr/src/app
EXPOSE 8000
EXPOSE 8000/udp
EXPOSE 8080
EXPOSE 8081
CMD ["node", "index.js"]
# This is for swarm mode load balancing, since this thing doesn't work fast
# enough on a single xeon core with over 150 viewers.
# Set up 4 workers on one quad core machine:
# docker build -t dregu/visio .
# docker swarm init
# docker network create --driver overlay --subnet 10.0.9.0/24 visionet
# docker service create --replicas 4 --name visio --network visionet --publish 8081:8081 dregu/visio
# ws://127.0.0.1:8081/ should be balanced between the 4 workers.
# Now just duplicate the video stream to all the workers.
# Check raspi.sh for examples...