2021-10-23 13:18:58 +02:00
|
|
|
### STAGE 0: Build client ###
|
2021-08-18 00:01:11 +02:00
|
|
|
FROM node:12-alpine AS build
|
|
|
|
WORKDIR /client
|
|
|
|
COPY /client /client
|
|
|
|
RUN npm install
|
|
|
|
RUN npm run generate
|
|
|
|
|
2021-10-23 13:18:58 +02:00
|
|
|
### STAGE 1: Build server ###
|
2021-08-18 00:01:11 +02:00
|
|
|
FROM node:12-alpine
|
2021-10-23 13:18:58 +02:00
|
|
|
RUN apk update && apk add --no-cache --update ffmpeg
|
2021-08-18 00:01:11 +02:00
|
|
|
ENV NODE_ENV=production
|
|
|
|
COPY --from=build /client/dist /client/dist
|
|
|
|
COPY index.js index.js
|
|
|
|
COPY package.json package.json
|
|
|
|
COPY server server
|
|
|
|
RUN npm install --production
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["npm", "start"]
|