rf/fix: use bun instead of node, fix robots
This commit is contained in:
parent
5dc930bcbb
commit
dfbb2fdfc4
2 changed files with 10 additions and 17 deletions
23
Dockerfile
23
Dockerfile
|
@ -1,16 +1,10 @@
|
||||||
FROM node:23-alpine AS base
|
FROM oven/bun:latest AS base
|
||||||
|
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
RUN apk add --no-cache libc6-compat
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
|
COPY package.json bun.lockb* ./
|
||||||
RUN \
|
RUN bun install --frozen-lockfile
|
||||||
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
|
|
||||||
|
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -19,12 +13,7 @@ COPY . .
|
||||||
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
RUN \
|
RUN bun run build
|
||||||
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
|
|
||||||
|
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -32,8 +21,8 @@ WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
RUN groupadd --system --gid 1001 nodejs
|
||||||
RUN adduser --system --uid 1001 nextjs
|
RUN useradd --system --uid 1001 nextjs
|
||||||
|
|
||||||
COPY --from=builder /app/public ./build/public
|
COPY --from=builder /app/public ./build/public
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,8 @@ export const robots: MetadataRoute.Robots = {
|
||||||
allow: '/',
|
allow: '/',
|
||||||
},
|
},
|
||||||
sitemap: 'https://aidxn.cc/sitemap.xml',
|
sitemap: 'https://aidxn.cc/sitemap.xml',
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function handler(): MetadataRoute.Robots {
|
||||||
|
return robots
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue