mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-01-18 00:49:37 +00:00
feat: Updates to docker file and gh action
* Clean up Dockerfile * Add health check to Dockerfile * Update gh action versions
This commit is contained in:
parent
5f2d6f4d5e
commit
4900649908
3 changed files with 40 additions and 23 deletions
18
Dockerfile
18
Dockerfile
|
|
@ -7,13 +7,23 @@ RUN npm run generate
|
|||
|
||||
### STAGE 1: Build server ###
|
||||
FROM node:16-alpine
|
||||
RUN apk update && apk add --no-cache --update ffmpeg
|
||||
ENV NODE_ENV=production
|
||||
RUN apk update && \
|
||||
apk add --no-cache --update \
|
||||
curl \
|
||||
tzdata \
|
||||
ffmpeg
|
||||
|
||||
COPY --from=build /client/dist /client/dist
|
||||
COPY index.js index.js
|
||||
COPY package-lock.json package-lock.json
|
||||
COPY package.json package.json
|
||||
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/ping || exit 1
|
||||
CMD ["npm", "start"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue