-
Notifications
You must be signed in to change notification settings - Fork 0
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
3532c13
commit c926354
Showing
8 changed files
with
57 additions
and
109 deletions.
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
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
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 |
---|---|---|
@@ -1,34 +1,32 @@ | ||
FROM oven/bun:1 as base | ||
FROM base AS deps | ||
FROM oven/bun:latest AS deps | ||
WORKDIR /app | ||
COPY package.json ./ | ||
COPY .npmrc ./ | ||
COPY package.json bun.lockb .npmrc ./ | ||
RUN bun install --frozen-lockfile | ||
|
||
RUN bun install | ||
|
||
# Rebuild the source code only when needed | ||
FROM base AS builder | ||
FROM node:lts-alpine AS builder | ||
WORKDIR /app | ||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY . . | ||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
RUN pnpm run build | ||
RUN npm run build | ||
|
||
# Production image, copy all the files and run next | ||
FROM node:lts-alpine AS runner | ||
WORKDIR /app | ||
|
||
ENV NODE_ENV=production | ||
ENV NEXT_TELEMETRY_DISABLED=1 | ||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 nextjs | ||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/.next/standalone ./ | ||
COPY --from=builder /app/.next/static ./.next/static | ||
|
||
# Set the correct permission for prerender cache | ||
RUN chown -R nextjs:nodejs .next | ||
|
||
RUN addgroup --system --gid 1001 nodejs && \ | ||
adduser --system --uid 1001 nextjs | ||
|
||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ | ||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static | ||
COPY --from=builder --chown=nextjs:nodejs /app/public ./public | ||
|
||
USER nextjs | ||
|
||
EXPOSE 3000 | ||
|
||
ENV PORT=3000 | ||
ENV HOSTNAME="0.0.0.0" | ||
|
||
CMD ["node", "server.js"] |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,21 +1,18 @@ | ||
FROM node:lts-slim AS deps | ||
FROM oven/bun:latest AS deps | ||
WORKDIR /app | ||
|
||
RUN npm install -g pnpm | ||
COPY package.json ./ | ||
COPY .npmrc ./ | ||
RUN pnpm install | ||
COPY package.json bun.lockb .npmrc ./ | ||
RUN bun install | ||
|
||
FROM node:lts-slim AS builder | ||
WORKDIR /app | ||
RUN npm install -g pnpm | ||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY . . | ||
RUN pnpm run build:workflow | ||
RUN npm run build:workflow | ||
|
||
FROM node:lts-slim | ||
FROM node:lts-slim AS runner | ||
WORKDIR /app | ||
RUN npm install -g pnpm && pnpm install esbuild-loader | ||
RUN npm install esbuild-loader | ||
COPY --from=builder /app . | ||
|
||
CMD ["pnpm", "run", "start:worker"] | ||
CMD ["npm", "run", "start:worker"] |
Binary file not shown.
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