File size: 517 Bytes
283b6c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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"]