~johanvandegriff/live.johanv.xyz

live.johanv.xyz/Dockerfile -rw-r--r-- 928 bytes
c59722bdJohan Vandegriff ignored whispers 4 months ago
                                                                                
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
31
32
33
34
35
36
37
FROM tiangolo/nginx-rtmp

#https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
# Create app directory
WORKDIR /var/www

#livestream data will be put here
RUN mkdir -p /var/www/live

#nginx settings for rtmp stream forwarding
COPY nginx.conf /etc/nginx/nginx.conf

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN apt-get update -yq \
     && apt-get -yq install curl gnupg ca-certificates apt-utils \
     && curl -L https://deb.nodesource.com/setup_12.x | bash \
     && apt-get update -yq \
     && apt-get install -yq \
         nodejs

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

EXPOSE 8080

#the script contains both the commands below
CMD ["/var/www/cmd.sh"]
#CMD ["node", "server.js"]
#CMD ["nginx", "-g", "daemon off;"]