muse/Dockerfile
Federico fuji97 Rapetti 19848ba9f7 Edit Docker templates
2022-01-11 23:33:12 +01:00

36 lines
534 B
Docker

FROM node:16.13.0-alpine AS base
# Install ffmpeg and build dependencies
RUN apk add --no-cache ffmpeg python2 make g++
WORKDIR /usr/app
COPY package.json .
COPY yarn.lock .
# Install prod dependencies
RUN yarn install --prod
# Dependencies
FROM base AS dependencies
# Install dev dependencies
RUN yarn install
# Build app
FROM dependencies AS builder
COPY . .
RUN yarn build
# Only copy essentials
FROM base AS prod
COPY --from=builder /usr/app/dist dist
ENV DATA_DIR /data
ENV NODE_ENV production
CMD ["yarn", "start"]