- Exclude .git directory from tar archive - Clean target directory before extraction - Prevent file exists and permission denied errors - Ensure clean deployment without conflicts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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 # 전체 서비스 정의
배포 플로우
- 애플리케이션 저장소에서 코드 변경 시
- GitHub Actions가 새 이미지 빌드 후 Docker Hub에 push
- Webhook으로 이 저장소의
docker-compose.yml업데이트 - 수동 또는 자동으로 서버에 배포
설정
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
Languages
Nginx
100%