@@ -3,7 +3,10 @@ ARG NODE_VERSION=lts
3
3
FROM node:$NODE_VERSION-alpine AS builder
4
4
ENV YARN_CACHE_FOLDER=/opt/yarncache
5
5
WORKDIR /opt/app
6
- COPY package.json yarn.lock .yarnrc.yml .yarn/ ./
6
+
7
+ # Copy only the necessary files for Yarn
8
+ COPY .yarnrc.yml package.json yarn.lock ./
9
+
7
10
RUN corepack enable && yarn install --immutable
8
11
# patch logging for requestHandler
9
12
RUN sed -Ei \
@@ -13,7 +16,7 @@ RUN sed -Ei \
13
16
14
17
ENV NODE_ENV=production
15
18
ENV NEXT_TELEMETRY_DISABLED=1
16
- ENV VLLM_URL="http://localhost:8000 "
19
+ ENV VLLM_URL=""
17
20
ENV VLLM_API_KEY=""
18
21
19
22
COPY . .
@@ -23,8 +26,8 @@ RUN yarn build
23
26
FROM node:$NODE_VERSION-alpine AS runner
24
27
WORKDIR /opt/app
25
28
26
- ENV NODE_ENV production
27
- ENV NEXT_TELEMETRY_DISABLED 1
29
+ ENV NODE_ENV= production
30
+ ENV NEXT_TELEMETRY_DISABLED= 1
28
31
29
32
RUN addgroup --system --gid 1001 nodejs
30
33
RUN adduser --system --uid 1001 nextjs
@@ -40,17 +43,16 @@ RUN chown nextjs:nodejs .next
40
43
COPY --from=builder --chown=nextjs:nodejs /opt/app/.next/standalone ./
41
44
COPY --from=builder --chown=nextjs:nodejs /opt/app/.next/static ./.next/static
42
45
43
- # Copy Yarn Berry files for runtime (if needed for PnP or CLI usage)
46
+ # Copy only the necessary files for runtime
44
47
COPY --from=builder /opt/app/.yarnrc.yml ./
45
- COPY --from=builder /opt/app/.yarn ./.yarn
46
48
COPY --from=builder /opt/app/package.json ./
47
49
COPY --from=builder /opt/app/yarn.lock ./
48
50
49
51
USER nextjs
50
52
51
53
EXPOSE 3000
52
54
53
- ENV PORT 3000
55
+ ENV PORT= 3000
54
56
# set hostname to localhost
55
- ENV HOSTNAME "0.0.0.0"
57
+ ENV HOSTNAME= "0.0.0.0"
56
58
CMD ["node" , "server.js" ]
0 commit comments