Files
aranroig.com/frontend/Dockerfile
BinarySandia04 45404157b3
Some checks failed
Build and Deploy Nuxt / build (push) Failing after 2m1s
Backend integrated?
2026-03-17 19:48:05 +01:00

31 lines
506 B
Docker

# ---------- Build Stage ----------
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy project files
COPY . .
# Build the Nuxt app
RUN npm run build --dotenv .env.production
# ---------- Production Stage ----------
FROM node:20-alpine
WORKDIR /app
# Copy built output
COPY --from=builder /app/.output ./.output
# Expose Nuxt port
EXPOSE 3000
# Start Nuxt production server
CMD ["node", ".output/server/index.mjs"]