e337d7bc45
Sitio estático generado con Eleventy (11ty) + Nginx en Docker: - Plantillas Nunjucks con layout base, tarjetas y fichas individuales - Datos de juegos en YAML, colección ordenada por fecha - CSS con tema oscuro gaming y diseño responsive (3/2/1 columnas) - Lightbox vanilla JS para capturas de pantalla - Build multi-stage Docker (node:20-alpine → nginx:alpine) - 2 juegos de ejemplo con imágenes SVG placeholder Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
548 B
Docker
27 lines
548 B
Docker
# ---------- ETAPA 1: Build ----------
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY src/ src/
|
|
COPY static/ static/
|
|
COPY .eleventy.js ./
|
|
|
|
RUN npx @11ty/eleventy
|
|
|
|
# ---------- ETAPA 2: Servir ----------
|
|
FROM nginx:alpine
|
|
|
|
# Configuración personalizada de Nginx
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Copiar el sitio generado
|
|
COPY --from=builder /app/_site /usr/share/nginx/html
|
|
|
|
# Copiar descargas (no pasan por Eleventy)
|
|
COPY downloads/ /usr/share/nginx/html/downloads/
|
|
|
|
EXPOSE 80
|