Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD : docker compose 사용 #13

Closed
yooniversal opened this issue Jul 27, 2023 · 0 comments · Fixed by #14
Closed

CI/CD : docker compose 사용 #13

yooniversal opened this issue Jul 27, 2023 · 0 comments · Fixed by #14
Labels
🐞 BugFix Something isn't working ✨ Feature 기능 개발 및 개선

Comments

@yooniversal
Copy link
Contributor

yooniversal commented Jul 27, 2023

Problem

  • EC2에서 workflow를 통해 빌드된 파일을 직접 실행해보니 프로젝트 내부 로직 중 redis 캐시 애노테이션이 포함돼 문제 발생:
2023-07-27T05:18:38.762Z  INFO 24269 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface yeolJyeongKong.mall.repository.FavoriteRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2023-07-27T05:18:38.763Z  INFO 24269 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface yeolJyeongKong.mall.repository.RecentRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2023-07-27T05:18:38.763Z  INFO 24269 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface yeolJyeongKong.mall.repository.TopRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
2023-07-27T05:18:38.767Z  INFO 24269 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface yeolJyeongKong.mall.repository.CategoryRepository; If you want this repository to be a Redis repository, consider annotating your entities with one of these annotations: org.springframework.data.redis.core.RedisHash (preferred), or consider extending one of the following types with your repository: org.springframework.data.keyvalue.repository.KeyValueRepository
...
  • deploy.yml에 docker-compose 설치, 빌드 및 실행 로직을 넣었을 때 다음 에러 발생:
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/ubuntu/app/src/main/resources/prometheus.yml" to rootfs at "/etc/prometheus/prometheus.yml": mount /home/ubuntu/app/src/main/resources/prometheus.yml:/etc/prometheus/prometheus.yml (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Error: Process completed with exit code 1.

To Do

  • redis, prometheus, grafana를 docker container로 한번에 띄울 수 있도록 docker-compose.yml 작성
  • EC2에서 docker 설치 및 docker 데몬이 실행되고 있는지 확인
  • appspec.yml에 의해 배포할 때마다 실행되는 start.sh, stop.sh를 수정해 docker-compose.yml 실행 관리
    • start.sh : docker compose up -d
    • stop.sh : docker compose down -v
@yooniversal yooniversal added 🐞 BugFix Something isn't working enhancement labels Jul 27, 2023
@yooniversal yooniversal reopened this Jul 27, 2023
@yooniversal yooniversal linked a pull request Jul 27, 2023 that will close this issue
@yooniversal yooniversal added ✨ Feature 기능 개발 및 개선 and removed enhancement labels Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 BugFix Something isn't working ✨ Feature 기능 개발 및 개선
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant