Files
portfolio/Dockerfile

25 lines
425 B
Docker

# Stage 1 — install deps & build
FROM oven/bun:1.2 AS builder
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install
COPY . .
ARG STRAPI_URL=https://strapi.moshariri.com
ENV STRAPI_URL=$STRAPI_URL
RUN bun run build
# Stage 2 — production runtime
FROM node:22-alpine AS runner
WORKDIR /app
COPY --from=builder /app/.output ./.output
EXPOSE 3000
ENV NODE_ENV=production
CMD ["node", ".output/server/index.mjs"]