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

Chore : OCI Migration #45

Merged
merged 11 commits into from
Oct 13, 2024
Merged

Chore : OCI Migration #45

merged 11 commits into from
Oct 13, 2024

Conversation

goldentrash
Copy link
Contributor

@goldentrash goldentrash commented Oct 12, 2024

OCI Migration

Background

AWS EC2 t2.small의 서버 비용이 감당하기 어려워 OCI의 Always Free Resources를 활용하기로 하는 의사 결정이 이뤄졌습니다. 이 과정에서 arm64 기반의 instance로 migration 하며 Dockerfilebuild.sh를 수정해야 했습니다. (docker buildx 명령어에 주목해 주세요)

하는 김에 하자 (PR 사이즈 죄송합니다죄송합니다)

  • build.gradle 다듬기
    • task re-ordering
    • task 명명 방법 통일 tasks.named("task") {}task {}가 혼용되고 있었습니다.
    • DB dependancy 그냥 둘 다 넣기
      runtimeOnly 'com.h2database:h2:2.2.224'
      implementation 'mysql:mysql-connector-java:8.0.32'
    • postman task 실행 시 baseURL 설정
    • excludeSecrets 옵션을 통해 application.yaml을 build에서 제외
      • application-prod.yaml을 분리하고 버전 관리에 추가했습니다.
      • Docker interpolation이 잘 되어 있으니 production 한정으로 조금 편하게 갈게요
  • Client 분리로 CORS Open List 추가
    • admin.gdsc-konkuk.dev, member.gdsc-konkuk.dev, landing.gdsc-konkuk.dev
  • Compose와 Nginx Configuration, DDL도 버전 관리 하면 좋을 것 같아 추가합니다.
  • PR Size 측정 App 설치

@goldentrash goldentrash self-assigned this Oct 12, 2024
Copy link
Collaborator

@ekgns33 ekgns33 left a comment

Choose a reason for hiding this comment

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

고생하셨어여

@@ -107,7 +107,7 @@ public ClientRegistrationRepository clientRegistrationRepository() {
private CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();

configuration.setAllowedOrigins(Arrays.asList("http://localhost:5173", "https://stage.gdsc-konkuk.dev", "https://gdsc-konkuk.dev"));
configuration.setAllowedOrigins(Arrays.asList("http://localhost:5173", "https://stage.gdsc-konkuk.dev", "https://gdsc-konkuk.dev", "https://admin.gdsc-konkuk.dev", "https://member.gdsc-konkuk.dev", "https://landing.gdsc-konkuk.dev"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

상수사용이 어떨지 제안합니다. 테스트할때 바꾸는게 귀찮더라구여

Copy link

sonarcloud bot commented Oct 13, 2024

@goldentrash goldentrash merged commit 0090976 into main Oct 13, 2024
2 checks passed
@goldentrash goldentrash deleted the chore/oci-migration branch October 13, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants