muse/Dockerfile
2020-11-18 14:32:28 -05:00

32 lines
435 B
Docker

FROM node:14-alpine AS base
# Install ffmpeg and build dependencies
RUN apk add --no-cache ffmpeg python make g++
WORKDIR /usr/app
COPY package* ./
# Dependencies
FROM base AS dependencies
RUN npm install
# Build app
FROM dependencies AS builder
COPY . .
RUN npm run build
# Only copy essentials
FROM base AS prod
COPY --from=builder /usr/app/dist dist
RUN npm i --only=prod
ENV DATA_DIR /data
CMD ["npm", "run", "start"]