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] application.yml 파일 수정 & 환경 변수 설정 #11

Closed
2 of 3 tasks
drbug2000 opened this issue Jul 15, 2024 · 1 comment · Fixed by #16
Closed
2 of 3 tasks

[chore] application.yml 파일 수정 & 환경 변수 설정 #11

drbug2000 opened this issue Jul 15, 2024 · 1 comment · Fixed by #16

Comments

@drbug2000
Copy link
Collaborator

drbug2000 commented Jul 15, 2024

📝 이슈 설명

프로젝트 application.yml 파일 설정
local과 dev환경 분리
환경변수 파일 수정

✅ 투두리스트

  • 프로젝트 application.yml 파일 설정
  • DB 설정
  • JPA설정
  • GWT 설정
  • 기타 등등 (web, port 등등)
  • application.yml / application-local.yml 분리
  • CI/CD 환경변수 주입

📸 구현 화면 (선택)

참고 사항

@drbug2000
Copy link
Collaborator Author

drbug2000 commented Jul 15, 2024

application-local.yml 파일 포맷입니다.
개인 local 환경에서 파일 생성해서 자유롭게 수정해서 사용하시면 됩니다.
local에서 작업시, application.yml파일에 active:${SPRING_PROFILES_ACTIVE} 에 "local" 주입해서 실행시키시면 됩니다.

# application-local.yml
spring:
  config:
    activate:
      on-profile: "localPort"

server:
    port: 8080
---
spring:
  config:
    activate:
      on-profile: "localRDB"

  datasource:
      url:  ${DATASOURCE_URL_LOCAL}
      username: ${DATASOURCE_USERNAME}
      password: ${DATASOURCE_PASSWORD}
      driver-class-name: ${DATASOURCE_DRIVER:com.mysql.cj.jdbc.Driver}
logging:
  level:
    org.hibernate.sql: debug
---
spring:
  config:
    activate:
      on-profile: "localMongoDB"
  data:
    mongodb:
      uri: mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@${MONGO_HOST}:${MONGO_PORT}/${MONGO_DB}

---
spring:
  config:
    activate:
      on-profile: "localJPA"

  jpa:
    hibernate:
          ddl-auto: update        # table을 전부 drop했다가 다시 생성 -> 테스트용
    properties:
      hibernate:
        format_sql: true
        show_sql: true
---

spring:
  config:
    activate:
      on-profile: "localSecret"

secret:
  jwt-secret-key: ${JWT_SECRET_KEY:b237a73895f5e617b7364708413fff71c228721a5f8c84a7bb2a3b84f1bb1c23}
  jwt-expired-in: ${JWT_EXPIRED_IN:3600000}
---

@drbug2000 drbug2000 linked a pull request Jul 17, 2024 that will close this issue
drbug2000 added a commit that referenced this issue Jul 17, 2024
…-환경-변수-설정

Chore/#11/applicationyml 파일 수정 환경 변수 설정
hyunn522 added a commit that referenced this issue Jul 17, 2024
drbug2000 added a commit that referenced this issue Jul 17, 2024
seongjunnoh added a commit that referenced this issue Jul 17, 2024
…-환경-변수-설정

[chore] add gradle.yml resource path
drbug2000 added a commit that referenced this issue Jul 18, 2024
…-환경-변수-설정

Chore/#11/applicationyml 파일 수정 환경 변수 설정
seongjunnoh pushed a commit that referenced this issue Oct 30, 2024
…-환경-변수-설정

Chore/#11/applicationyml 파일 수정 환경 변수 설정
seongjunnoh pushed a commit that referenced this issue Oct 30, 2024
seongjunnoh pushed a commit that referenced this issue Oct 30, 2024
seongjunnoh added a commit that referenced this issue Oct 30, 2024
…-환경-변수-설정

[chore] add gradle.yml resource path
seongjunnoh pushed a commit that referenced this issue Oct 30, 2024
…-환경-변수-설정

Chore/#11/applicationyml 파일 수정 환경 변수 설정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant