Skip to content

Update: 여러 프로젝트 실행 충돌을 방지하기 위한 CI/CD 스크립트 업데이트#124

Merged
Ruthgyeul merged 1 commit intomasterfrom
develop
May 12, 2025
Merged

Update: 여러 프로젝트 실행 충돌을 방지하기 위한 CI/CD 스크립트 업데이트#124
Ruthgyeul merged 1 commit intomasterfrom
develop

Conversation

@Ruthgyeul
Copy link
Member

#️⃣연관된 이슈

#102

📝작업 내용

여러 프로젝트 실행 충돌을 방지하기 위한 CI/CD 스크립트 업데이트

@Ruthgyeul Ruthgyeul requested a review from Copilot May 12, 2025 09:33
@Ruthgyeul Ruthgyeul self-assigned this May 12, 2025
@Ruthgyeul Ruthgyeul added FIX 오류를 고쳤을 때 REFACTOR 구조를 다르게 하여 개선하였을 때 💻 MASTER Master PR 요청 labels May 12, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the CI/CD scripts and configuration to prevent conflicts when running multiple projects by switching from "gdgoc-fe-app" to "gdgocinha-fe" and adjusting related paths and settings.

  • Updated deployment script (scripts/deploy.sh) to create and navigate to a new application directory and added a deployment verification step.
  • Modified docker-compose.yml, appspec.yml, and .github/workflows/deploy.yml files to reflect the new project name and configuration.
  • Revised the Dockerfile to optimize dependency installation and add a healthcheck for the production container.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/deploy.sh Updates to directory handling, Docker installation, cleanup, and verification logic for the new project.
docker-compose.yml Renamed image and container name; updated environment syntax and network configuration.
appspec.yml Updated deployment destination and added extra deployment hooks.
Dockerfile Consolidated dependency commands, switched production base image, and added healthcheck.
.github/workflows/deploy.yml Revised workflow naming, deployment package creation, and S3 upload details.

Comment on lines +58 to +61
if [ $(docker ps -q -f name=gdgocinha-fe | wc -l) -eq 1 ]; then
echo "Deployment successful!"
else
echo "Deployment failed!"
Copy link

Copilot AI May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The current container verification only counts matching containers; consider checking the container's health status (e.g., via docker inspect or using the HEALTHCHECK result) to more reliably determine a successful deployment.

Suggested change
if [ $(docker ps -q -f name=gdgocinha-fe | wc -l) -eq 1 ]; then
echo "Deployment successful!"
else
echo "Deployment failed!"
CONTAINER_ID=$(docker ps -q -f name=gdgocinha-fe)
if [ -n "$CONTAINER_ID" ]; then
HEALTH_STATUS=$(docker inspect --format='{{.State.Health.Status}}' $CONTAINER_ID 2>/dev/null)
if [ "$HEALTH_STATUS" == "healthy" ]; then
echo "Deployment successful!"
else
echo "Deployment failed: Container is not healthy (status: $HEALTH_STATUS)"
exit 1
fi
else
echo "Deployment failed: Container not found"

Copilot uses AI. Check for mistakes.
RUN ls -la /app
RUN ls -la /app/.next || echo ".next 디렉토리가 없습니다"
COPY --from=builder /app/next.config.mjs ./
COPY --from=builder /app/.env ./
Copy link

Copilot AI May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying the .env file into the production image may expose sensitive configuration details. Consider injecting environment variables externally rather than including the .env file in the image.

Suggested change
COPY --from=builder /app/.env ./

Copilot uses AI. Check for mistakes.
@Ruthgyeul Ruthgyeul merged commit 42781a7 into master May 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FIX 오류를 고쳤을 때 💻 MASTER Master PR 요청 REFACTOR 구조를 다르게 하여 개선하였을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants