File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 11FROM node:20-alpine AS base
22
3- # Stage 1: Install dependencies only when needed
43FROM base AS deps
5- RUN apk add --no-cache libc6-compat
6-
74RUN set -ex; \
85 apk update; \
96 apk add --no-cache \
7+ libc6-compat \
108 openssl
119
1210WORKDIR /usr/src/app
@@ -17,30 +15,25 @@ COPY packages/ ./packages/
1715
1816RUN yarn install --ignore-scripts
1917
20- # Stage 2: Rebuild the source code only when needed
2118FROM base AS builder
2219WORKDIR /usr/src/app
2320
2421COPY --from=deps /usr/src/app/node_modules ./node_modules
25-
2622COPY . .
2723
2824RUN yarn global add turbo@^2.1.1
29-
30- RUN DATABASE_URL=$DATABASE_URL npx prisma generate --schema packages/db/prisma/schema.prisma
25+ RUN DATABASE_URL=$DATABASE_URL npx
[email protected] generate --schema packages/db/prisma/schema.prisma
3126
3227RUN cd apps/web && yarn add sharp
3328RUN yarn turbo run build --filter=web...
3429
35- # Stage 3: Production image
3630FROM base AS runner
3731WORKDIR /usr/src/app
3832
3933RUN addgroup --system --gid 1001 nodejs
4034RUN adduser --system --uid 1001 nextjs
4135
42- RUN mkdir .next
43- RUN chown nextjs:nodejs .next
36+ RUN mkdir .next && chown nextjs:nodejs .next
4437
4538USER nextjs
4639
@@ -50,7 +43,6 @@ COPY --from=builder --chown=nextjs:nodejs /usr/src/app/apps/web/public ./apps/we
5043
5144EXPOSE 3000
5245ENV NODE_ENV production
53- # For Standalone build
5446ENV PORT 3000
5547ENV HOSTNAME "0.0.0.0"
5648
You can’t perform that action at this time.
0 commit comments