Conversation
There was a problem hiding this comment.
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. |
| if [ $(docker ps -q -f name=gdgocinha-fe | wc -l) -eq 1 ]; then | ||
| echo "Deployment successful!" | ||
| else | ||
| echo "Deployment failed!" |
There was a problem hiding this comment.
[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.
| 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" |
| RUN ls -la /app | ||
| RUN ls -la /app/.next || echo ".next 디렉토리가 없습니다" | ||
| COPY --from=builder /app/next.config.mjs ./ | ||
| COPY --from=builder /app/.env ./ |
There was a problem hiding this comment.
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.
| COPY --from=builder /app/.env ./ |
#️⃣연관된 이슈
📝작업 내용