Files
aranroig.com/frontend/Dockerfile
BinarySandia04 1f21f79e57
Some checks failed
Build and Deploy Nuxt / build (push) Failing after 2s
Moved content of blogs to its own repo
2026-06-09 23:47:53 +02:00

38 lines
688 B
Docker

# ---------- Build Stage ----------
FROM node:20-alpine AS builder
WORKDIR /app
RUN apk add --no-cache python3 make g++
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy project files
RUN git clone http://git.aranroig.com/Syndria98/blogs /tmp/blogs
RUN mkdir -p content && cp -r /tmp/blogs/content/. ./content/ && rm -r /tmp/blogs
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"]