aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2020-10-24 15:19:35 -0400
committerMax Isom <[email protected]>2020-10-24 15:19:35 -0400
commita51c712da8e5d723aa7fbf666c2aa460f9a5d10d (patch)
treee3c9f59d6eb6a92de2d95c1939c4bf492483a047 /Dockerfile
parentf941dbbdddd765e44eb0aa789fda88631e943a65 (diff)
downloadmuse-a51c712da8e5d723aa7fbf666c2aa460f9a5d10d.tar.xz
muse-a51c712da8e5d723aa7fbf666c2aa460f9a5d10d.zip
Switch back to NPM, optimize Dockerfile
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"]