本番用Docker Compose作成

This commit is contained in:
CyberRex
2026-05-25 10:01:34 +09:00
parent 40e7953ee5
commit d4918762d2
12 changed files with 183 additions and 7 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM node:22-bookworm-slim
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates openssl \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g pnpm@11.1.3
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm exec vite build
ENV NODE_ENV=production \
HOST=0.0.0.0 \
PORT=3000
EXPOSE 3000
CMD ["pnpm", "start"]