Files
bar/Dockerfile
valknar b3b9fb7ac6 Initial commit — Bar Pivoine cocktail recipe site
Hugo Extended site with 426 cocktail recipes from the open cocktail dataset.
Dark amber/gold editorial aesthetic, Tailwind CSS v4, Alpine.js client-side
search and filtering, HTMX page transitions, Docker + nginx production build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 11:53:45 +02:00

36 lines
1.1 KiB
Docker

# ── Stage 1: builder ────────────────────────────────────────────────────────
FROM node:22-alpine AS builder
# Install Hugo extended + build tools
RUN apk add --no-cache \
curl \
git \
libc6-compat \
&& HUGO_VERSION=0.147.2 \
&& curl -sSL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" \
| tar -xz -C /usr/local/bin hugo
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
# Install dependencies
COPY package.json pnpm-lock.yaml* ./
RUN pnpm install --frozen-lockfile
# Copy source
COPY . .
# Build site
RUN NODE_ENV=production hugo --minify
# ── Stage 2: production (nginx) ──────────────────────────────────────────────
FROM nginx:alpine AS production
COPY --from=builder /app/public /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]