From e3bef9b3e5600bd9726ba457bb2776e204aee88e Mon Sep 17 00:00:00 2001 From: bmamihai Date: Sat, 10 Dec 2022 02:38:09 +0200 Subject: [PATCH] New dockerfile --- Dockerfile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6eff224..f961eb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,20 @@ -FROM ubuntu +FROM ubuntu:22.04 + +WORKDIR /app + RUN apt-get update && \ apt-get install -y build-essential pip net-tools iputils-ping iproute2 curl -RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - +RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - RUN apt-get install -y nodejs RUN npm install -g watchify +RUN npm install -g pm2 + +COPY server public .env app.js package.json /app/ + +RUN npm install EXPOSE 3000 -EXPOSE 2000-2020 -EXPOSE 10000-10100 \ No newline at end of file +EXPOSE 2000-2200 + +CMD [ "pm2", " start app.js --name video-server -e /app/mediasoup-error.log -o /app/mediasoup-output.log -l /app/mediasoup.log --log-date-format "YYYY-MM-DD HH:mm:ss" --merge-logs --cwd /app/ -i 1" ] \ No newline at end of file