mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-27 00:59:14 +01:00
c7b4b3bd3e
Addresses #1703. Paths with quotations were not handled by tone<v0.1.3.
33 lines
696 B
Docker
33 lines
696 B
Docker
### STAGE 0: Build client ###
|
|
FROM node:16-alpine AS build
|
|
WORKDIR /client
|
|
COPY /client /client
|
|
RUN npm ci && npm cache clean --force
|
|
RUN npm run generate
|
|
|
|
### STAGE 1: Build server ###
|
|
FROM sandreas/tone:v0.1.5 AS tone
|
|
FROM node:16-alpine
|
|
|
|
ENV NODE_ENV=production
|
|
RUN apk update && \
|
|
apk add --no-cache --update \
|
|
curl \
|
|
tzdata \
|
|
ffmpeg
|
|
|
|
COPY --from=tone /usr/local/bin/tone /usr/local/bin/
|
|
COPY --from=build /client/dist /client/dist
|
|
COPY index.js package* /
|
|
COPY server server
|
|
|
|
RUN npm ci --only=production
|
|
|
|
EXPOSE 80
|
|
HEALTHCHECK \
|
|
--interval=30s \
|
|
--timeout=3s \
|
|
--start-period=10s \
|
|
CMD curl -f http://127.0.0.1/healthcheck || exit 1
|
|
CMD ["node", "index.js"]
|