Skip to content

Commit

Permalink
fix Dockerfile (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
fru1tworld authored Nov 12, 2024
2 parents 6319504 + 5629301 commit d80d48a
Show file tree
Hide file tree
Showing 4 changed files with 5,110 additions and 6,256 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/BACKEND_DEPLOY.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
file: ./packages/backend/Dockerfile.blue
file: ./packages/backend/Dockerfile
push: true
tags: ${{ secrets.CONTAINER_REGISTRY_URL }}/backend:latest

Expand Down
14 changes: 7 additions & 7 deletions packages/backend/Dockerfile.blue → packages/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ RUN apk add --no-cache python3 make g++ && npm install -g pnpm
COPY package.json pnpm-workspace.yaml ./

# packages의 package.json 파일들 복사
COPY packages/backend/package.json ./packages/backend/
COPY packages/shared/package.json ./packages/shared/
COPY ./packages/backend/package.json ./packages/backend/
COPY ./packages/shared/package.json ./packages/shared/

# 의존성 설치 (husky 설치 건너뛰기)
RUN HUSKY=0 pnpm install --no-frozen-lockfile

# 소스 코드 복사
COPY packages/backend ./packages/backend
COPY packages/shared ./packages/shared
COPY tsconfig.json ./
COPY ./packages/backend ./packages/backend
COPY ./packages/shared ./packages/shared
COPY ./tsconfig.json ./

# 백엔드 빌드
RUN cd packages/backend && pnpm build
RUN cd ./packages/backend && pnpm build

# 프로덕션 스테이지
FROM node:20-alpine AS production
Expand Down Expand Up @@ -57,4 +57,4 @@ ENV NODE_ENV=production
EXPOSE 3000

# 애플리케이션 실행
CMD ["node", "dist/src/main"]
CMD ["node", "dist/main"]
61 changes: 0 additions & 61 deletions packages/backend/Dockerfile.green

This file was deleted.

Loading

0 comments on commit d80d48a

Please sign in to comment.