happybell80 c44bc1b4b4 Fix Docker Compose cache issue with proper cleanup
- Use docker-compose down to clear old service definitions
- Use docker system prune -f to remove cached metadata
- Verify new compose file is deployed correctly
- Force rebuild with --build flag
- This ensures new nginx-only config is used instead of cached old stack

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-07 23:50:39 +09:00

Nginx Deploy - Robeing Project

GitOps 방식으로 관리되는 Robeing 프로젝트의 배포 매니페스트 저장소입니다.

구조

nginx-deploy/
├── .github/workflows/deploy.yml  # GitHub Actions CI/CD
├── nginx/
│   ├── nginx.conf                # Nginx 설정
│   └── Dockerfile                # Nginx 컨테이너 빌드
└── docker-compose.yml            # 전체 서비스 정의

배포 플로우

  1. 애플리케이션 저장소에서 코드 변경 시
  2. GitHub Actions가 새 이미지 빌드 후 Docker Hub에 push
  3. Webhook으로 이 저장소의 docker-compose.yml 업데이트
  4. 수동 또는 자동으로 서버에 배포

설정

GitHub Secrets 설정

DOCKER_USERNAME: Docker Hub 사용자명
DOCKER_PASSWORD: Docker Hub 패스워드 또는 토큰

환경 변수 설정

# .env 파일 생성
DATABASE_URL=postgresql://user:password@postgres:5432/robeing
REDIS_URL=redis://redis:6379/0
POSTGRES_USER=robeing
POSTGRES_PASSWORD=your-secure-password

배포 방법

개발 환경

docker-compose up -d

프로덕션 배포

# 환경 변수 설정 후
docker-compose -f docker-compose.yml up -d

서비스 구성

  • nginx: 리버스 프록시 (포트 80, 443)
  • api-base: API 서버 (포트 8000)
  • test_api: 테스트 API 서버 (포트 8001)
  • frontend: 프론트엔드 서버 (포트 5173)
  • postgres: PostgreSQL 데이터베이스
  • redis: Redis 캐시

Health Check

모든 서비스는 health check가 설정되어 있으며, /health 엔드포인트로 상태 확인 가능합니다.

curl http://localhost/health
Description
No description provided
Readme 248 KiB
Languages
Nginx 100%