Files
seguidorDeLotes/nuxt4/Dockerfile
josedario87 65cf637801
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 2m9s
Force npm ci --no-cache to rebuild node_modules without @nuxt/content
2025-11-21 21:36:51 -06:00

40 lines
770 B
Docker

# Multi-stage build for Nuxt 4 application
# Cache bust: 2025-11-21-fix-components
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (removed @nuxt/content, rebuild 2025-11-21T21:35)
RUN npm ci --no-cache
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Copy built application from builder stage
COPY --from=builder /app/.output /app/.output
# Copy SQL files for seed endpoint
COPY --from=builder /app/server/database /app/server/database
# Expose port
EXPOSE 3000
# Set environment variables
ENV NODE_ENV=production
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000
# Start the application
CMD ["node", ".output/server/index.mjs"]