aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile30
1 files changed, 22 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index d4f64df..607a4b0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,19 +1,33 @@
-FROM jrottenberg/ffmpeg:4.0-scratch
-FROM node:13
+FROM node:14-alpine AS base
-# Copy ffmpeg bins
-COPY --from=0 / /
+# Install ffmpeg
+RUN apk add --no-cache ffmpeg
WORKDIR /usr/app
-COPY package.json .
+COPY package* ./
-RUN yarn install
+# Dependencies
+FROM base AS dependencies
+
+RUN npm install
+
+# Build app
+FROM dependencies AS builder
COPY . .
-RUN yarn run build
+RUN npm run build
+
+RUN ls
+
+# Only copy essentials
+FROM base AS prod
+RUN ls
+COPY --from=builder /usr/app/dist dist
+
+RUN npm i --only=prod
ENV DATA_DIR /data
-CMD ["yarn", "start"]
+CMD ["npm", "run", "start"]