From 4358de87baae6c31655bd42b616f79e127ecc757 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 27 Feb 2026 15:33:04 +0100 Subject: [PATCH] **feat(docs):** add Dockerfile and Nginx config for static site deployment - Introduce `Dockerfile` for building and serving static site using Bun and Nginx - Add `nginx.conf` for configuring static file caching and routing rules - Expose port 80 for containerized deployment --- docs/Dockerfile | 11 +++++++++++ docs/nginx.conf | 15 +++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 docs/Dockerfile create mode 100644 docs/nginx.conf diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 0000000..85fb669 --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,11 @@ +FROM oven/bun:1-alpine AS build +WORKDIR /app +COPY package.json bun.lock ./ +RUN bun install --frozen-lockfile +COPY . . +RUN bun run build + +FROM nginx:alpine +COPY --from=build /app/.vitepress/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 diff --git a/docs/nginx.conf b/docs/nginx.conf new file mode 100644 index 0000000..c177c9b --- /dev/null +++ b/docs/nginx.conf @@ -0,0 +1,15 @@ +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ $uri.html /index.html; + } + + # Cache static assets + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } +}