diff --git a/Dockerfile b/Dockerfile index fcfe033..776669f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,43 +1,25 @@ FROM oven/bun:1 AS base +# Stage 1: Install dependencies FROM base AS deps WORKDIR /app +COPY package.json bun.lockb ./ +RUN bun install --frozen-lockfile - -COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* bun.lockb* ./ -RUN bun install - - +# Stage 2: Build the application FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . - - RUN bun run build - -FROM node:21-alpine AS runner - +# Stage 3: Production image +FROM oven/bun:1-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 - +ENV NODE_ENV=production COPY --from=builder /app/public ./public - -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/.env.example ./.env - -USER nextjs +COPY --from=builder /app/.next/standalone ./ +COPY --from=builder /app/.next/static ./.next/static EXPOSE 3000 - -ENV PORT 3000 -ENV HOSTNAME "0.0.0.0" - -CMD ["node", "server.js"] +CMD ["bun", "run", "server.js"] diff --git a/bun.lockb b/bun.lockb index b7f3c40..77db974 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 8c71be1..0382959 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.3", "@types/luxon": "^3.4.2", - "@typescript-eslint/eslint-plugin": "^7.18.0", + "@typescript-eslint/eslint-plugin": "^8.8.0", "caniuse-lite": "^1.0.30001667", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", @@ -53,7 +53,7 @@ "@types/react": "^18.3.11", "@types/react-dom": "^18.3.0", "autoprefixer": "^10.4.20", - "eslint": "^9.11.1", + "eslint": "^9.12.0", "eslint-config-next": "^14.2.14", "postcss": "^8.4.47", "prettier": "^3.3.3",