fix: mover Dockerfile a nuxt4-app/ y corregir workflow
This commit is contained in:
40
nuxt4-app/Dockerfile
Normal file
40
nuxt4-app/Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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 nuxt4-app/package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --prefer-offline --no-audit
|
||||
|
||||
# Copy app source
|
||||
COPY nuxt4-app/ ./
|
||||
|
||||
# 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"]
|
||||
Reference in New Issue
Block a user