Skip to content

Commit 531677b

Browse files
authored
Merge pull request #114 from GDGoCINHA/develop
Fix(#102): to apply .env to right directory
2 parents 7de150b + a2a9b3f commit 531677b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ jobs:
3030
- name: Create Deployment Package
3131
run: |
3232
cp scripts/deploy.sh ./deploy.sh
33-
echo "DOCKER_HUB_USERNAME=${{ secrets.DOCKER_HUB_USERNAME }}" >> .env
33+
# Create .env file with all required environment variables
34+
echo "DOCKER_HUB_USERNAME=${{ secrets.DOCKER_HUB_USERNAME }}" > .env
3435
echo "NEXT_PUBLIC_GOOGLE_REDIRECT_CLIENT_ID=${{secrets.NEXT_PUBLIC_GOOGLE_REDIRECT_CLIENT_ID}}" >> .env
3536
echo "NEXT_PUBLIC_GOOGLE_REDIRECT_URI=${{secrets.NEXT_PUBLIC_GOOGLE_REDIRECT_URI}}" >> .env
37+
# Add any other environment variables you need here
3638
3739
zip -r deploy.zip .env docker-compose.yml deploy.sh appspec.yml \
3840
Dockerfile package.json package-lock.json next.config.mjs \

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ WORKDIR /app
77
COPY package.json package-lock.json ./
88
RUN npm install
99

10+
# .env 파일을 먼저 복사
11+
COPY .env ./
12+
1013
# 이후 전체 파일 복사
1114
COPY . .
1215

@@ -31,6 +34,9 @@ WORKDIR /app
3134
COPY package*.json ./
3235
RUN npm install --omit=dev
3336

37+
# .env 파일 복사
38+
COPY .env ./
39+
3440
# 빌드된 결과물 가져오기
3541
COPY --from=builder /app/.next ./.next
3642
COPY --from=builder /app/public ./public

0 commit comments

Comments
 (0)