diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..48f29e2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.git +.github +.agents +.codex +node_modules +docs/.vitepress/dist +docs/.vitepress/cache +_test_* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a663e37 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM node:20-alpine AS build + +WORKDIR /app + +RUN corepack enable && corepack prepare pnpm@9.15.9 --activate + +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install --frozen-lockfile + +COPY . . +RUN pnpm docs:build + +FROM nginx:1.27-alpine + +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build /app/docs/.vitepress/dist /usr/share/nginx/html + +EXPOSE 8005 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..b085fa5 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,11 @@ +server { + listen 8005; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +}