try use docker

This commit is contained in:
2026-02-19 11:10:32 +09:00
parent 3d2de67d1e
commit 366a11814c
10 changed files with 131 additions and 66 deletions

14
backend/Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM node:20-alpine AS base
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS production
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=base /app/dist ./dist
EXPOSE 3001
CMD ["node", "dist/main.js"]