From 39deb471d976d863d2ec803f908025a2366f1486 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 6 Dec 2025 19:06:33 +0900 Subject: build(server): add Dockerfiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add build pipeline with esbuild for production bundling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- docker/client/Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docker/client/Dockerfile (limited to 'docker/client/Dockerfile') diff --git a/docker/client/Dockerfile b/docker/client/Dockerfile new file mode 100644 index 0000000..4647124 --- /dev/null +++ b/docker/client/Dockerfile @@ -0,0 +1,35 @@ +# Build stage +FROM node:22-slim AS builder + +WORKDIR /app + +# Enable corepack for pnpm +RUN corepack enable && corepack prepare pnpm@10.23.0 --activate + +# Copy package files +COPY package.json pnpm-lock.yaml ./ + +# Install all dependencies (including devDependencies for build) +RUN pnpm install --frozen-lockfile + +# Copy source files needed for client build +COPY tsconfig.json vite.config.ts index.html ./ +COPY src/client ./src/client + +# Build the client +RUN pnpm build:client + +# Production stage - nginx for static file serving +FROM nginx:stable AS production + +# Copy built client from builder stage +COPY --from=builder /app/dist/client /usr/share/nginx/html + +# Copy nginx configuration +COPY nginx.conf /etc/nginx/conf.d/default.conf + +# Expose the port +EXPOSE 80 + +# Start nginx +CMD ["nginx", "-g", "daemon off;"] -- cgit v1.2.3-70-g09d2