mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-13 21:35:28 +01:00
1081b1bce7
Co-authored-by: Max Isom <hi@maxisom.me>
41 lines
659 B
Docker
41 lines
659 B
Docker
FROM node:16.13.2-alpine AS base
|
|
|
|
# Install ffmpeg
|
|
RUN apk update && \
|
|
apk add ffmpeg && \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
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 prisma generate && yarn build
|
|
|
|
# Only copy essentials
|
|
FROM base AS prod
|
|
|
|
COPY --from=builder /usr/app/dist dist
|
|
COPY --from=builder /usr/app/schema.prisma .
|
|
COPY --from=builder /usr/app/migrations migrations
|
|
|
|
RUN yarn prisma generate
|
|
|
|
ENV DATA_DIR /data
|
|
|
|
CMD ["yarn", "start"]
|