audiobookshelf/Dockerfile

20 lines
474 B
Docker
Raw Normal View History

### 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
### STAGE 1: Build server ###
2021-08-18 00:01:11 +02:00
FROM node:12-alpine
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
2021-12-13 02:48:29 +01:00
COPY package-lock.json package-lock.json
2021-08-18 00:01:11 +02:00
COPY package.json package.json
COPY server server
2021-12-13 02:48:29 +01:00
RUN npm ci --production
2021-08-18 00:01:11 +02:00
EXPOSE 80
CMD ["npm", "start"]