Skip to content

Commit 276c97c

Browse files
authored
minor dockerfile updates (#23826)
1 parent 9978441 commit 276c97c

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

Dockerfile

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ WORKDIR /usr/src/docs
1717
# ---------------
1818
FROM base as all_deps
1919

20-
COPY package*.json ./
2120
COPY .npmrc ./
21+
COPY package*.json ./
2222

2323
RUN npm ci
2424

@@ -36,14 +36,12 @@ RUN npm prune --production
3636
# ---------------
3737
FROM all_deps as builder
3838

39-
ENV NODE_ENV production
40-
4139
COPY stylesheets ./stylesheets
4240
COPY pages ./pages
4341
COPY components ./components
4442
COPY lib ./lib
4543

46-
# one part of the build relies on this content file to pull all-products
44+
# One part of the build relies on this content file to pull all-products
4745
COPY content/index.md ./content/index.md
4846

4947
COPY next.config.js ./next.config.js
@@ -76,24 +74,27 @@ COPY --chown=node:node --from=builder /usr/src/docs/.next /usr/src/docs/.next
7674
# We should always be running in production mode
7775
ENV NODE_ENV production
7876

79-
# Hide iframes, add warnings to external links
80-
ENV AIRGAP true
77+
# Whether to hide iframes, add warnings to external links
78+
ENV AIRGAP false
79+
80+
# By default we typically don't want to run in clustered mode
81+
ENV WEB_CONCURRENCY 1
82+
83+
# This makes sure server.mjs always picks up the preferred port
84+
ENV PORT 4000
8185

8286
# Copy only what's needed to run the server
8387
COPY --chown=node:node assets ./assets
84-
COPY --chown=node:node content ./content
85-
COPY --chown=node:node data ./data
8688
COPY --chown=node:node includes ./includes
89+
COPY --chown=node:node translations ./translations
90+
COPY --chown=node:node content ./content
8791
COPY --chown=node:node lib ./lib
8892
COPY --chown=node:node middleware ./middleware
89-
COPY --chown=node:node translations ./translations
90-
COPY --chown=node:node server.mjs ./server.mjs
91-
COPY --chown=node:node package*.json ./
9293
COPY --chown=node:node feature-flags.json ./
94+
COPY --chown=node:node data ./data
9395
COPY --chown=node:node next.config.js ./
96+
COPY --chown=node:node server.mjs ./server.mjs
9497

95-
# This makes sure server.mjs always picks up the preferred port
96-
ENV PORT=4000
9798
EXPOSE $PORT
9899

99100
CMD ["node", "server.mjs"]

0 commit comments

Comments
 (0)