Skip to content

Commit

Permalink
Merge pull request #172 from Team-Smeme/chore_#171
Browse files Browse the repository at this point in the history
[CHORE] application 설정 파일 수정
  • Loading branch information
unanchoi authored Nov 28, 2023
2 parents 5eb07e3 + 8f7ab5a commit b7b27f1
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 39 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,12 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: create .env file
working-directory: ./
- name: Create application-secret.yml
run: |
pwd
touch .env
echo "${{ secrets.ENV }}" >> .env
cat .env
- name: Create application.yml
run: |
pwd
touch src/main/resources/application.yml
echo "${{ secrets.APPLICATION_YML }}" >> src/main/resources/application.yml
cat src/main/resources/application.yml
touch src/main/resources/application-secret.yml
echo "${{ secrets.APPLICATION_SECRET_YML }}" >> src/main/resources/application-secret.yml
cat src/main/resources/application-secret.yml
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,12 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: create .env file
working-directory: ./
- name: Create application-secret.yml
run: |
pwd
touch .env
echo "${{ secrets.ENV }}" >> .env
cat .env
- name: Create application.yml
run: |
pwd
touch src/main/resources/application.yml
echo "${{ secrets.APPLICATION_PROD_YML }}" >> src/main/resources/application.yml
cat src/main/resources/application.yml
touch src/main/resources/application-secret.yml
echo "${{ secrets.APPLICATION_SECRET_YML }}" >> src/main/resources/application-secret.yml
cat src/main/resources/application-secret.yml
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,12 @@ jobs:
distribution: 'temurin'
cache: gradle

- name: create .env file
working-directory: ./
- name: Create application-secret.yml
run: |
pwd
touch .env
echo "${{ secrets.ENV }}" >> .env
cat .env
- name: Create application.yml
run: |
pwd
touch src/main/resources/application.yml
echo "${{ secrets.APPLICATION_YML }}" >> src/main/resources/application.yml
cat src/main/resources/application.yml
touch src/main/resources/application-secret.yml
echo "${{ secrets.APPLICATION_SECRET_YML }}" >> src/main/resources/application-secret.yml
cat src/main/resources/application-secret.yml
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ out/
.vscode/

application.properties
application-dev.yml
application-prod.yml
application-oauth2.yml
*.properties
.env
smeem_fcm.json
.DS_Store
.DS_Store

application-secret.yml
50 changes: 50 additions & 0 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
spring:
config:
import: application-secret.yml
activate:
on-profile: dev
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://${DATABASE.ENDPOINT_URL.dev}:5432/postgres?currentSchema=${DATABASE.NAME.dev}
username: ${DATABASE.USERNAME.dev}
password: ${DATABASE.PASSWORD.dev}
jpa:
hibernate:
ddl-auto: none
properties:
hibernate:
format_sql: true
default_batch_fetch_size: 1000
auto_quote_keyword: true

logging.level:
org.hibernate.SQL: debug

fcm:
file_path: smeem_fcm.json
url: ${FCM.URL}
google_api: https://www.googleapis.com/auth/cloud-platform
smeem_title: "오늘의 영어 훈련, 딱 5분 걸려요!"
smeem_body: "지금 눌러서 일기 쓰기 ✍️"

jwt:
secret: ${JWT.SECRET}
KAKAO_URL: https://kapi.kakao.com/v2/user/me
APPLE_URL: https://appleid.apple.com/auth/keys
ACCESS_TOKEN_EXPIRED: 7200000
REFRESH_TOKEN_EXPIRED: 1209600000

badge:
welcome-badge-id: ${WELCOME_BADGE_ID}

springdoc:
default-consumes-media-type: application/json;charset=UTF-8
default-produces-media-type: application/json;charset=UTF-8
swagger-ui:
url: /docs/open-api-3.0.1.json
path: /swagger

smeem:
duration:
expired: ${SMEEM.DURATION.EXPIRED}
remind: ${SMEEM.DURATION.REMIND}
43 changes: 43 additions & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
spring:
config:
activate:
on-profile: prod
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://${DATABASE.ENDPOINT_URL.prod}:5432/postgres?currentSchema=${DATABASE.NAME.prod}
username: ${DATABASE.USERNAME.prod}
password: ${DATABASE.PASSWORD.prod}

jpa:
hibernate:
ddl-auto: none
properties:
hibernate:
format_sql: true
default_batch_fetch_size: 1000
auto_quote_keyword: true

logging.level:
org.hibernate.SQL: debug

fcm:
file_path: smeem_fcm.json
url: ${FCM.URL}
google_api: https://www.googleapis.com/auth/cloud-platform
smeem_title: "오늘의 영어 훈련, 딱 5분 걸려요!"
smeem_body: "지금 눌러서 일기 쓰기 ✍️"

jwt:
secret: ${JWT.SECRET}
KAKAO_URL: https://kapi.kakao.com/v2/user/me
APPLE_URL: https://appleid.apple.com/auth/keys
ACCESS_TOKEN_EXPIRED: 7200000
REFRESH_TOKEN_EXPIRED: 1209600000

badge:
welcome-badge-id: ${WELCOME_BADGE_ID}

smeem:
duration:
expired: ${SMEEM.DURATION.EXPIRED}
remind: ${SMEEM.DURATION.REMIND}

0 comments on commit b7b27f1

Please sign in to comment.