chore: migrate build and CI pipeline from npm to bun
This commit is contained in:
1 parent
08ee84e5c9
commit
3b042fa4f5
2 files changed
+19
-19
No files matched your search
+9
-9
@@ -1,32 +1,32 @@
|
||||
# Stage 1: Build the Angular application
|
||||
FROM node:25-alpine AS builder
|
||||
FROM oven/bun:alpine AS builder
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
COPY package.json bun.lockb* ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci --only=production=false
|
||||
RUN bun install
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build the application for production
|
||||
RUN npm run build
|
||||
RUN bun run build
|
||||
|
||||
# Stage 2: Production image
|
||||
FROM node:25-alpine AS production
|
||||
FROM oven/bun:alpine AS production
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
COPY package.json bun.lockb* ./
|
||||
|
||||
# Install only production dependencies
|
||||
RUN npm ci --only=production && npm cache clean --force
|
||||
RUN bun install --production
|
||||
|
||||
# Copy built application from builder stage
|
||||
COPY --from=builder /app/dist ./dist
|
||||
@@ -39,7 +39,7 @@ EXPOSE 4000
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
||||
CMD node -e "require('http').get('http://localhost:4000', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
|
||||
CMD bun -e "require('http').get('http://localhost:4000', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
|
||||
|
||||
# Start the application
|
||||
CMD ["node", "dist/vac-optimizer/server/server.mjs"]
|
||||
CMD ["bun", "run", "dist/vac-optimizer/server/server.mjs"]
|
||||
Reference in new issue
Block a user