From dfbb2fdfc40739d61705c5e2b902a9826be69297 Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 4 Aug 2025 02:36:23 -0400 Subject: [PATCH] rf/fix: use bun instead of node, fix robots --- Dockerfile | 23 ++++++----------------- app/robots.ts | 4 ++++ 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61d6aa7..2c57fdb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,10 @@ -FROM node:23-alpine AS base +FROM oven/bun:latest AS base FROM base AS deps -RUN apk add --no-cache libc6-compat WORKDIR /app -COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./ -RUN \ - if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ - elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ - else echo "Lockfile not found." && exit 1; \ - fi +COPY package.json bun.lockb* ./ +RUN bun install --frozen-lockfile FROM base AS builder WORKDIR /app @@ -19,12 +13,7 @@ COPY . . ENV NEXT_TELEMETRY_DISABLED=1 -RUN \ - if [ -f yarn.lock ]; then yarn run build; \ - elif [ -f package-lock.json ]; then npm run build; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ - else echo "Lockfile not found." && exit 1; \ - fi +RUN bun run build FROM base AS runner WORKDIR /app @@ -32,8 +21,8 @@ WORKDIR /app ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1 -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nextjs +RUN groupadd --system --gid 1001 nodejs +RUN useradd --system --uid 1001 nextjs COPY --from=builder /app/public ./build/public diff --git a/app/robots.ts b/app/robots.ts index e429c8f..8451432 100644 --- a/app/robots.ts +++ b/app/robots.ts @@ -6,4 +6,8 @@ export const robots: MetadataRoute.Robots = { allow: '/', }, sitemap: 'https://aidxn.cc/sitemap.xml', +} + +export default function handler(): MetadataRoute.Robots { + return robots } \ No newline at end of file