mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
CI: update docker image for nuxt server target
This commit is contained in:
parent
eecd8be78d
commit
7d0401f463
@ -3,6 +3,9 @@ node_modules
|
|||||||
npm-debug.log
|
npm-debug.log
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
|
.devcontainer/
|
||||||
|
.github/
|
||||||
|
.vscode/
|
||||||
/config
|
/config
|
||||||
/audiobooks
|
/audiobooks
|
||||||
/audiobooks2
|
/audiobooks2
|
||||||
@ -13,4 +16,5 @@ test/
|
|||||||
/client/.nuxt/
|
/client/.nuxt/
|
||||||
/client/dist/
|
/client/dist/
|
||||||
/dist/
|
/dist/
|
||||||
|
/build/
|
||||||
/deploy/
|
/deploy/
|
23
Dockerfile
23
Dockerfile
@ -1,14 +1,19 @@
|
|||||||
### STAGE 0: Build client ###
|
### STAGE 0: Build client ###
|
||||||
FROM node:16-alpine AS build
|
FROM node:16-alpine AS build
|
||||||
WORKDIR /client
|
WORKDIR /client
|
||||||
COPY /client /client
|
|
||||||
|
COPY /client/package*.json /client/
|
||||||
RUN npm ci && npm cache clean --force
|
RUN npm ci && npm cache clean --force
|
||||||
RUN npm run generate
|
|
||||||
|
COPY /client /client
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
### STAGE 1: Build server ###
|
### STAGE 1: Build server ###
|
||||||
FROM sandreas/tone:v0.1.5 AS tone
|
FROM sandreas/tone:v0.1.5 AS tone
|
||||||
FROM node:16-alpine
|
FROM node:16-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add --no-cache --update \
|
apk add --no-cache --update \
|
||||||
@ -17,11 +22,17 @@ RUN apk update && \
|
|||||||
ffmpeg
|
ffmpeg
|
||||||
|
|
||||||
COPY --from=tone /usr/local/bin/tone /usr/local/bin/
|
COPY --from=tone /usr/local/bin/tone /usr/local/bin/
|
||||||
COPY --from=build /client/dist /client/dist
|
COPY package* ./
|
||||||
COPY index.js package* /
|
COPY --from=build /client/package*.json client/
|
||||||
COPY server server
|
|
||||||
|
|
||||||
RUN npm ci --only=production
|
RUN npm ci --omit=dev
|
||||||
|
RUN cd client && npm ci --omit=dev && cd ..
|
||||||
|
|
||||||
|
COPY index.js package* ./
|
||||||
|
COPY server server
|
||||||
|
COPY --from=build /client/nuxt.config.js* client/
|
||||||
|
COPY --from=build /client/.nuxt client/.nuxt
|
||||||
|
COPY --from=build /client/modules client/modules
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
HEALTHCHECK \
|
HEALTHCHECK \
|
||||||
|
Loading…
Reference in New Issue
Block a user