Added docker

This commit is contained in:
2023-02-13 18:09:48 +07:00
parent ee571aa276
commit d7ba3ef4bf
2 changed files with 38 additions and 0 deletions

14
.dockerignore Normal file
View File

@@ -0,0 +1,14 @@
.dockerignore
Dockerfile
docker-compose.yml
.git
.gitignore
node_modules
.env
dist
config
.vscode
video.mp4

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM node:18 as build
WORKDIR /home/node/app
COPY . .
RUN apt-get update -y
RUN apt-get install -y ffmpeg
RUN yarn
RUN yarn build
FROM node:18
WORKDIR /home/node/app
RUN apt-get update -y
RUN apt-get install -y ffmpeg
COPY --from=build /home/node/app/package.json .
COPY --from=build /home/node/app/yarn.lock .
RUN yarn
COPY --from=build /home/node/app/dist .
CMD ["node", "index.js"]