Add AI DEV Node deployment foundation

This commit is contained in:
unknown
2026-07-13 10:33:21 +09:00
parent 6abcee3727
commit b90bfe35ca
23 changed files with 3978 additions and 0 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
FROM node:22-bookworm-slim AS build
WORKDIR /app
COPY package*.json ./
COPY frontend/package*.json ./frontend/
RUN npm ci
RUN npm --prefix frontend ci
COPY tsconfig.json ./
COPY server ./server
COPY migrations ./migrations
COPY frontend ./frontend
RUN npm run build
FROM node:22-bookworm-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
COPY package*.json ./
RUN npm ci --omit=dev && npm cache clean --force
COPY --from=build /app/dist ./dist
COPY --from=build /app/frontend/dist ./frontend/dist
COPY migrations ./migrations
EXPOSE 3000
CMD ["npm", "run", "start:deploy"]