CI/CD 준비: gitignore 정리, backend 멀티스테이지 빌드, Gitea Actions 배포 워크플로우

- .gitignore 추가: node_modules, dist, .env 파일을 추적에서 해제 (로컬 파일은 유지)
- .env.example 템플릿 추가 (실제 값은 서버 .env / Gitea Secrets로 관리)
- backend Dockerfile을 멀티스테이지로 전환: 이미지 빌드 내에서 npm ci + build.js 실행
- backend/frontend .dockerignore 추가
- .gitea/workflows/deploy.yml 추가: main push 시 배포 서버 러너가 compose build + up

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 03:54:20 +09:00
parent 7f950339ae
commit 4aebfaf049
23230 changed files with 119 additions and 3199885 deletions
+13 -2
View File
@@ -1,9 +1,20 @@
# Build stage: esbuild 번들링 + 배포용 의존성 설치 (build.js가 dist/를 생성)
FROM node:20-alpine AS build-stage
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN node build.js
# Production stage
FROM node:20-alpine
WORKDIR /app
# dist 폴더 안의 결과물(server.js, package.json, node_modules)을 이미지 내부에 복사
COPY dist/ ./
COPY --from=build-stage /app/dist/ ./
EXPOSE 3000