Pin Bun 1.4.3 with packageManager, and force every bun run script onto the Bun runtime through bunfig so ng, ESLint and Prettier never fall back to an installed Node. Type checking uses bun check for the application and test projects, next to the Angular build. CI jobs install the pinned release from a checksum-verified download instead of npm and run project steps in a shell without Node on PATH, which stays available only for the checkout and upload actions. The image test's fake docker runs on Bun. Refs #290, #293 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
989 B
Docker
31 lines
989 B
Docker
# Stage 1: Build the Angular application and the Bun static server
|
|
FROM oven/bun:1.4.3-alpine@sha256:629e17411f1f129dbec3af78d5af9c9f2a937435c80349437206c6b0b7422373 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json bun.lock ./
|
|
RUN bun install --frozen-lockfile
|
|
|
|
COPY . .
|
|
|
|
# bunfig.toml makes the Node-shebang Angular CLI run on Bun; the image has no Node
|
|
RUN bun run build
|
|
|
|
# Stage 2: Production image
|
|
FROM oven/bun:1.4.3-alpine@sha256:629e17411f1f129dbec3af78d5af9c9f2a937435c80349437206c6b0b7422373 AS production
|
|
|
|
WORKDIR /app
|
|
|
|
# The server is a self-contained Bun bundle that serves the browser build, so
|
|
# the runtime has no dependencies to install.
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
EXPOSE 4000
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
|
CMD bun -e "fetch('http://localhost:' + (process.env.PORT || 4000) + '/').then(r => process.exit(r.ok ? 0 : 1), () => process.exit(1))"
|
|
|
|
CMD ["bun", "dist/vac-optimizer/server/server.js"]
|