-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d263e07
commit 83b179b
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM node:20-slim AS base | ||
|
||
FROM base AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json package-lock.json* ./ | ||
RUN npm ci | ||
COPY . . | ||
|
||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
ENV NODE_ENV=production | ||
|
||
ARG CONVEX_DEPLOYMENT | ||
ARG NEXT_PUBLIC_CONVEX_URL | ||
ARG NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | ||
ARG CLERK_SECRET_KEY | ||
|
||
RUN npm run build | ||
|
||
FROM base AS runner | ||
WORKDIR /app | ||
|
||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 nextjs | ||
|
||
COPY --from=builder /app/public ./public | ||
|
||
RUN mkdir .next | ||
RUN chown nextjs:nodejs .next | ||
|
||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static | ||
|
||
USER nextjs | ||
|
||
EXPOSE 3000 | ||
|
||
ENV PORT=3000 | ||
|
||
CMD HOSTNAME="0.0.0.0" node server.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters