Files
analiticaNucleo/nuxt4-app/Dockerfile
josedario87 dce81cecc6
Some checks failed
build-and-deploy / build (push) Successful in 23s
build-and-deploy / deploy (push) Failing after 13s
fix: actualizar Dockerfile para copiar desde directorio actual
2025-10-13 11:28:58 -06:00

41 lines
726 B
Docker

# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
# Install build dependencies for sharp
RUN apk add --no-cache python3 make g++ vips-dev
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install --prefer-offline --no-audit
# Copy app source
COPY . ./
# Build the application
RUN npm run build
# Production stage
FROM node:22-alpine
WORKDIR /app
# Install runtime dependencies for sharp
RUN apk add --no-cache vips
# Copy built application from builder
COPY --from=builder /app/.output /app/.output
# Expose port (internal, no published externally)
EXPOSE 3000
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=3000
# Start the application
CMD ["node", ".output/server/index.mjs"]