Files
incidentops/web/Dockerfile
T

32 lines
669 B
Docker
Raw Normal View History

FROM oven/bun:latest AS deps
2025-01-11 12:00:00 -05:00
WORKDIR /app
COPY package.json bun.lock* ./
RUN bun install --frozen-lockfile 2>/dev/null || bun install
2025-01-11 12:00:00 -05:00
FROM oven/bun:latest AS builder
2025-01-11 12:00:00 -05:00
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Ensure public folder exists for the build
RUN mkdir -p public
ENV NEXT_TELEMETRY_DISABLED=1
RUN bun run build
2025-01-11 12:00:00 -05:00
FROM oven/bun:latest AS runner
WORKDIR /app
2025-01-11 12:00:00 -05:00
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
2025-01-11 12:00:00 -05:00
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
2025-01-11 12:00:00 -05:00
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
2025-01-11 12:00:00 -05:00
CMD ["bun", "server.js"]