Skip to content

Commit d7076e0

Browse files
authored
[FIX] 도커 실행 문제 해결
fix: 도커 실행 문제 해결
2 parents 32bc3fd + 3c52638 commit d7076e0

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ jobs:
3030
run: |
3131
cp scripts/deploy.sh ./deploy.sh
3232
echo "DOCKER_HUB_USERNAME=${{ secrets.DOCKER_HUB_USERNAME }}" > .env
33-
zip -r deploy.zip .env docker-compose.yml deploy.sh appspec.yml
33+
34+
zip -r deploy.zip .env docker-compose.yml deploy.sh appspec.yml \
35+
Dockerfile package.json package-lock.json next.config.mjs \
36+
pages public .next
37+
3438
3539
3640
- name: Configure AWS credentials

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# 1단계: 빌드 환경
22
FROM node:18 AS builder
33

4-
WORKDIR /app
5-
COPY package*.json ./
4+
# package.json과 package-lock.json을 먼저 복사하고, npm install 실행
5+
COPY package.json package-lock.json ./
66
RUN npm install
7+
8+
# 이후 전체 파일 복사
79
COPY . .
810
RUN npm run build
911

scripts/deploy.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
#!/bin/bash
32
cd /home/ubuntu/gdgoc-fe-app
43

54
# Docker & Docker Compose가 설치되어 있는지 확인

0 commit comments

Comments
 (0)