Skip to content

Commit

Permalink
[BE] 설정 파일 서브 모듈 생성 (#82)
Browse files Browse the repository at this point in the history
* feat: 설정 파일을 서브모듈로 관리

Co-authored-by: kunsanglee <[email protected]>
Co-authored-by: Arachne <[email protected]>
Co-authored-by: khabh <[email protected]>

* feat: 테스트 설정 파일 추가

Co-authored-by: kunsanglee <[email protected]>
Co-authored-by: Arachne <[email protected]>
Co-authored-by: khabh <[email protected]>

* feat: 도커 파일 내 profile 설정

Co-authored-by: kunsanglee <[email protected]>
Co-authored-by: Arachne <[email protected]>
Co-authored-by: khabh <[email protected]>

* feat: gitflow에 서브 모듈 설정

Co-authored-by: kunsanglee <[email protected]>
Co-authored-by: Arachne <[email protected]>
Co-authored-by: khabh <[email protected]>

---------

Co-authored-by: kunsanglee <[email protected]>
Co-authored-by: Arachne <[email protected]>
Co-authored-by: khabh <[email protected]>
  • Loading branch information
4 people authored Jul 23, 2024
1 parent 880833a commit ac916e8
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/backend-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
steps:
- name: CheckOut
uses: actions/checkout@v4
with:
token: ${{secrets.CONFIG_SUBMODULE_TOKEN}}
submodules: true

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "server/src/main/resources/config"]
path = server/src/main/resources/config
url = https://github.com/woowacourse-teams/2024-haeng-dong-config.git
2 changes: 1 addition & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ COPY --from=build /app/build/libs/*.jar /app/haengdong-0.0.1-SNAPSHOT.jar

EXPOSE 8080
ENTRYPOINT ["java"]
CMD ["-jar", "haengdong-0.0.1-SNAPSHOT.jar"]
CMD ["-Dspring.profiles.active=dev", "-jar", "haengdong-0.0.1-SNAPSHOT.jar"]
28 changes: 18 additions & 10 deletions server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
spring:
h2:
console:
enabled: true
path: /h2-console
datasource:
url: jdbc:h2:mem:database
url: jdbc:mysql://localhost:3306/haengdong
username: root
password: 1234
driver-class-name: com.mysql.cj.jdbc.Driver

jpa:
defer-datasource-initialization: true
show-sql: true
hibernate:
ddl-auto: none
properties:
hibernate:
format_sql: true
hibernate:
ddl-auto: create-drop
dialect: org.hibernate.dialect.MySQL8Dialect
format_sql: true
show-sql: true

---

spring:
config:
import: classpath:config/application-dev.yml
activate:
on-profile: dev
1 change: 1 addition & 0 deletions server/src/main/resources/config
Submodule config added at c12697
15 changes: 15 additions & 0 deletions server/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
spring:
h2:
console:
enabled: true
path: /h2-console
datasource:
url: jdbc:h2:mem:database
jpa:
defer-datasource-initialization: true
show-sql: true
properties:
hibernate:
format_sql: true
hibernate:
ddl-auto: create-drop

0 comments on commit ac916e8

Please sign in to comment.