mirror of
https://github.com/BluemediaDev/muse.git
synced 2024-11-27 04:05:28 +01:00
35 lines
504 B
Docker
35 lines
504 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.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
|
|
|
|
CMD ["yarn", "start"]
|