-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (24 loc) · 684 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (24 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM node:22.22.3-alpine AS base
RUN corepack enable
WORKDIR /app
FROM base AS builder
# Run yarn install early to allow a quick
# rebuild if the package.json didn't change
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn .yarn
RUN apk add --no-cache --virtual .gyp g++ make python3 && yarn install
COPY comics next.config.mjs ./
COPY public/ ./public/
COPY server/ ./server/
COPY src/ ./src/
RUN yarn build
FROM base AS runner
RUN apk add --no-cache mupdf-tools
# Symlink volume
VOLUME /comics
VOLUME /cache
RUN ln -s /comics /app/images && ln -s /cache /app/cache
ENV NODE_ENV production
COPY --from=builder /app ./
EXPOSE 8080
CMD [ "node", "server/index.js" ]