audiobookshelf/Dockerfile

37 lines
673 B
Docker
Raw Normal View History

### STAGE 0: Build client ###
FROM node:16-alpine AS build
2021-08-18 00:01:11 +02:00
WORKDIR /client
COPY /client /client
RUN npm ci && npm cache clean --force
2021-08-18 00:01:11 +02:00
RUN npm run generate
### STAGE 1: Build server ###
FROM sandreas/tone:v0.1.5 AS tone
FROM node:16-alpine
2021-08-18 00:01:11 +02:00
ENV NODE_ENV=production
RUN apk update && \
apk add --no-cache --update \
curl \
tzdata \
ffmpeg \
make \
python3 \
g++
COPY --from=tone /usr/local/bin/tone /usr/local/bin/
2021-08-18 00:01:11 +02:00
COPY --from=build /client/dist /client/dist
COPY index.js package* /
2021-08-18 00:01:11 +02:00
COPY server server
RUN npm ci --only=production
RUN apk del make python3 g++
ENV NODE_OPTIONS=--max-old-space-size=4096
2023-07-17 23:48:46 +02:00
2021-08-18 00:01:11 +02:00
EXPOSE 80
CMD ["node", "index.js"]