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..cf1eb4e 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/ServerCard.tsx b/components/ServerCard.tsx index 8111f24..afbe314 100644 --- a/components/ServerCard.tsx +++ b/components/ServerCard.tsx @@ -74,15 +74,13 @@ export default function ServerCard({
{t("Upload")}
{t("Download")}