Diff_free / Dockerfile
ChBysk's picture
Upload 11 files
283b6c6 verified
Raw
History Blame
517 Bytes
# Build stage
FROM node:22-slim AS build
WORKDIR /app
RUN corepack enable && npm install -g bun@1.3.3
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
# Build with the Node server preset so the output runs in a plain Docker container
ENV NITRO_PRESET=node-server
RUN bun run build
# Runtime stage
FROM node:22-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production \
PORT=7860 \
HOST=0.0.0.0
COPY --from=build /app/.output ./.output
EXPOSE 7860
CMD ["node", ".output/server/index.mjs"]