Files
dragonroll/frontend/Dockerfile
Aran Roig eaac266ebb
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 55s
2
2026-05-02 18:34:05 +02:00

34 lines
525 B
Docker

# ---------- Build Stage ----------
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
RUN apk add --no-cache git
# Install dependencies
RUN npm install
# Copy project files
ARG CACHEBUST=1
COPY . .
# Build the Nuxt app
RUN npm run build
# ---------- 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"]