-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: Integrating Configuration Files and Docker-Compose #214
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
Changes from 4 commits
cca0166
3a434df
d33a74c
c6f70b5
1e88a1a
c601cbb
919a9ee
60407b0
5936c08
2c48ae6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Database Configuration | ||
| DB_HOST= | ||
| DB_PORT= | ||
| DB_NAME= | ||
| DB_USERNAME= | ||
| DB_PASSWORD= | ||
|
|
||
| # Spring Profile | ||
| SPRING_PROFILES_ACTIVE= | ||
|
|
||
| # OAuth - Kakao | ||
| KAKAO_CLIENT_ID= | ||
| KAKAO_CLIENT_SECRET= | ||
| KAKAO_REDIRECT_URI= | ||
| KAKAO_NATIVE_CLIENT_ID= | ||
|
|
||
| # OAuth - Google | ||
| GOOGLE_CLIENT_ID= | ||
| GOOGLE_CLIENT_SECRET= | ||
| GOOGLE_REDIRECT_URI= | ||
| GOOGLE_AOD_CLIENT_ID= | ||
|
|
||
| # JWT | ||
| JWT_ISSUER= | ||
| JWT_SECRET= | ||
| JWT_ACCESS_EXPIRATION= | ||
| JWT_REFRESH_EXPIRATION= | ||
|
|
||
| # AWS S3 Configuration | ||
| AWS_S3_BUCKET_NAME= | ||
| AWS_S3_REGION= | ||
| AWS_ACCESS_KEY_ID= | ||
| AWS_SECRET_ACCESS_KEY= | ||
| AWS_CLOUDFRONT_DOMAIN= | ||
| RESIZE_SECRET_KEY= | ||
|
|
||
| # Public Data Service Key | ||
| K_CULTURAL_INFO_CENTER_KEY= | ||
|
|
||
| # FCM | ||
| FIREBASE_CONFIG_PATH= |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,50 @@ | ||
| version: "3.8" | ||
|
|
||
| services: | ||
| app: | ||
| build: | ||
| context: . | ||
| dockerfile: docker/Dockerfile | ||
| db: | ||
| image: mysql:8.4 | ||
| container_name: db | ||
| platform: linux/amd64 | ||
| environment: | ||
| MYSQL_USER: artrip | ||
| MYSQL_ROOT_PASSWORD: artrip1! | ||
| MYSQL_DATABASE: artrip | ||
| MYSQL_PASSWORD: artrip1! | ||
| ports: | ||
| - "33069:3306" | ||
| volumes: | ||
| - ./db/data:/var/lib/mysql | ||
| - ./db/conf:/etc/mysql/conf.d | ||
|
|
||
| redis: | ||
| image: redis:7.2 | ||
| container_name: redis | ||
| restart: always | ||
| ports: | ||
| - "63799:6379" | ||
| volumes: | ||
| - redis-data:/data | ||
|
|
||
| elasticsearch: | ||
| image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0 | ||
| container_name: elastic | ||
| environment: | ||
| - discovery.type=single-node | ||
| - xpack.security.enabled=false | ||
| - xpack.security.http.ssl.enabled=false | ||
| - ES_JAVA_OPTS=-Xms1g -Xmx1g | ||
| ports: | ||
| - "9200:9200" | ||
| - "9300:9300" | ||
| volumes: | ||
| - ./elasticsearch/data:/usr/share/elasticsearch/data | ||
| healthcheck: | ||
| test: [ "CMD", "curl", "-f", "http://localhost:9200/_cluster/health" ] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 30s | ||
|
|
||
|
|
||
| volumes: | ||
| redis-data: | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,9 @@ | |
| import lombok.RequiredArgsConstructor; | ||
| import org.atdev.artrip.service.CustomOAuth2UserService; | ||
| import org.atdev.artrip.security.OAuth2LoginSuccessHandler; | ||
| import org.atdev.artrip.jwt.jwt.JwtAuthenticationFilter; | ||
| import org.atdev.artrip.jwt.jwt.JwtProvider; | ||
| import org.atdev.artrip.jwt.jwt.exception.JwtExceptionFilter; | ||
| import org.atdev.artrip.jwt.JwtAuthenticationFilter; | ||
| import org.atdev.artrip.jwt.JwtProvider; | ||
| import org.atdev.artrip.jwt.exception.JwtExceptionFilter; | ||
|
Comment on lines
-7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| import org.atdev.artrip.global.apipayload.exception.handler.JwtAccessDeniedHandler; | ||
| import org.atdev.artrip.global.apipayload.exception.handler.JwtAuthenticationEntryPoint; | ||
| import org.springframework.context.annotation.Bean; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,9 +31,11 @@ public class Curation { | |
| @Column(name = "curation_type", nullable = false) | ||
| private CurationType curationType; | ||
|
|
||
| @Builder.Default | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Builder 패턴과 정적 팩토리 메서드 패턴 둘 중 어느 것이 좋은지 객체 사용 패턴을 보고 고민해주세요.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 두 패턴을 같이 사용하는 경우도 있는지 궁굼합니다. 가능 하다면 댓글 달아주신 부분과 같은 현상이 있다면 정적메서드 패턴으로 사용하며, 두 패턴을 동시에 사용하지 못한다면 정적메서드 패턴으로 사용을 지향하고싶습니다. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Builder.Default는 빌더 패턴 사용 시에만 기본값으로 적용이 됨을 말해요. 클래스 단에 빌더를 명시하면 다른 개발자가 일관성없이 아무런 객체들을 만들게 될거구요. 네이밍을 주고 싶고 명확하게한다면 정적 팩토리 메서드가 권장됩니다. 다만 정적 팩토리 메서드도 단점이 있으니 이 부분은 확인해보시면 좋을 것 같아요.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 큐레이션 생성시 isActive가 동일한 초기 값을 가져야하고 생성에 필요한 파라미터가 많지 않다면 정적 팩토리 메서드도 적절해 보입니다
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Builder.Default 관련하여 큐레이션 뿐만 아닌 다른 코드들도 확인 후 수정은 새로운 이슈 생성해서 작업 하도록하겠습니다! |
||
| @Column(name = "is_active") | ||
| private boolean isActive = true; | ||
|
|
||
| @Builder.Default | ||
| @ManyToMany | ||
| @JoinTable( | ||
| name = "curation_exhibit", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ElasticSearch를 사용하는 기능을 대체하면 이 부분은 지우면 될 것 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 한번에 다 수정하기에는 양이 많아서 나눠서 진행 하겠습니다.