Skip to content

Commit 89a27d2

Browse files
authored
Merge pull request #425 from PromptPlace/bug/#424
CI: Add .dockerignore and EC2 disk cleanup step to dev workflow
2 parents c560d83 + 274f86d commit 89a27d2

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.dockerignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# 의존성 및 빌드 결과물
2+
node_modules
3+
dist
4+
build
5+
coverage
6+
7+
# 깃 관련 파일
8+
.git
9+
.gitignore
10+
11+
# 환경 변수
12+
.env
13+
.env.dev
14+
15+
# 로그 파일
16+
npm-debug.log
17+
yarn-error.log
18+
pnpm-debug.log
19+
20+
# 불필요한 OS 생성 파일
21+
.DS_Store
22+
Thumbs.db
23+
24+
# 도커 관련 파일
25+
Dockerfile
26+
docker-compose.yml
27+
.dockerignore
28+
29+
# 빌드에 필요 없는 파일
30+
README.md

.github/workflows/deploy-develop.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
- name: Install, Generate & Build on server
5252
run: |
53-
ssh prod 'cd /opt/app-dev && pnpm install --frozen-lockfile && pnpm exec prisma generate'
53+
ssh prod 'cd /opt/app-dev && pnpm install --frozen-lockfile && pnpm exec prisma generate && rm -rf dist && pnpm build'
5454
5555
# 테스트 DB 마이그레이션
5656
- name: Run Prisma DB Push (Dev)
@@ -63,6 +63,11 @@ jobs:
6363
pnpm exec prisma db push
6464
EOF
6565
66+
# 도커 빌드 전 디스크 용량 확보
67+
- name: Clean up unused Docker data on EC2
68+
run: |
69+
ssh prod 'sudo docker system prune -af'
70+
6671
# app-dev 컨테이너만 재시작 (운영 컨테이너 app, caddy는 건드리지 않음)
6772
- name: Deploy Docker services (Dev)
6873
run: |

0 commit comments

Comments
 (0)