Skip to content

Commit

Permalink
refactor: application profile 공통 파일로 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
alstn113 committed Dec 20, 2024
1 parent 9749b48 commit 2f69836
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 138 deletions.
68 changes: 0 additions & 68 deletions server/src/main/resources/application-local.yml

This file was deleted.

67 changes: 0 additions & 67 deletions server/src/main/resources/application-prod.yml

This file was deleted.

143 changes: 141 additions & 2 deletions server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,148 @@
spring:
profiles:
default: local
active: local

---
spring:
config:
activate:
on-profile: local, prod
on-profile: local
h2:
console:
path: /h2-console
enabled: true
datasource:
url: jdbc:h2:mem:database
flyway:
enabled: false
jpa:
open-in-view: false
show-sql: true
properties:
hibernate:
format_sql: true
highlight_sql: true
hibernate:
ddl-auto: create-drop
data:
redis:
host: localhost
port: 6379
mail:
host: ${MAIL_HOST}
port: 587
username: ${MAIL_USERNAME}
password: ${MAIL_PASSWORD}
properties:
mail:
smtp:
connectiontimeout: 5000
timeout: 3000
writetimeout: 5000
auth: true
starttls:
enable: true

api-host: http://localhost:8080
client-host: http://localhost:5173

auth:
jwt:
secret-key: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6
expiration-time: 86400000 # 1 day
cookie:
access-token-key: access_token
httpOnly: true
secure: true
domain: localhost
path: /
maxAge: 86400 # 1 day
oauth2:
github:
client-id: ${OAUTH_GITHUB_CLIENT_ID}
client-secret: ${OAUTH_GITHUB_CLIENT_SECRET}
redirect-uri: ${api-host}/api/v1/auth/oauth2/callback/github
client-uri: ${client-host}
google:
client-id: ${OAUTH_GOOGLE_CLIENT_ID}
client-secret: ${OAUTH_GOOGLE_CLIENT_SECRET}
redirect-uri: ${api-host}/api/v1/auth/oauth2/callback/google
client-uri: ${client-host}

logging:
level:
org.springframework.orm.jpa: DEBUG
org.springframework.orm.transaction: DEBUG
org.hibernate.orm.jdbc.bind: trace

---
spring:
config:
activate:
on-profile: prod
datasource:
url: ${DB_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
flyway:
enabled: true
baseline-on-migrate: true
jpa:
open-in-view: false
show-sql: true
properties:
hibernate:
format_sql: true
highlight_sql: true
hibernate:
ddl-auto: validate
data:
redis:
host: fluffy-redis
port: 6379
mail:
host: ${MAIL_HOST}
port: 587
username: ${MAIL_USERNAME}
password: ${MAIL_PASSWORD}
properties:
mail:
smtp:
connectiontimeout: 5000
timeout: 3000
writetimeout: 5000
auth: true
starttls:
enable: true

api-host: https://api.fluffy.run
client-host: https://www.fluffy.run

auth:
jwt:
secret-key: ${JWT_SECRET_KEY}
expiration-time: 86400000 # 1 day
cookie:
access-token-key: access_token
httpOnly: true
secure: true
domain: .fluffy.run
path: /
maxAge: 86400 # 1 day
oauth2:
github:
client-id: ${OAUTH_GITHUB_CLIENT_ID}
client-secret: ${OAUTH_GITHUB_CLIENT_SECRET}
redirect-uri: ${api-host}/api/v1/auth/oauth2/callback/github
client-uri: ${client-host}
google:
client-id: ${OAUTH_GOOGLE_CLIENT_ID}
client-secret: ${OAUTH_GOOGLE_CLIENT_SECRET}
redirect-uri: ${api-host}/api/v1/auth/oauth2/callback/google
client-uri: ${client-host}

logging:
level:
org.springframework.orm.jpa: DEBUG
org.springframework.orm.transaction: DEBUG
org.hibernate.orm.jdbc.bind: trace
2 changes: 1 addition & 1 deletion web/tsconfig.app.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/apiclient.ts","./src/api/authapi.ts","./src/api/examapi.ts","./src/api/questionapi.ts","./src/api/submissionapi.ts","./src/components/asyncboundary.tsx","./src/components/errorfallback.tsx","./src/components/dashboard/draftexamcard.tsx","./src/components/dashboard/publishedexamcard.tsx","./src/components/exams/examsummarycard.tsx","./src/components/exams/newexambutton.tsx","./src/components/layouts/base/baselayout.tsx","./src/components/layouts/base/header.tsx","./src/components/overview/editableinput.tsx","./src/components/overview/exampublishbutton.tsx","./src/components/questions/exammanagementquestionspanel.tsx","./src/components/questions/exammanagementquestionssidebar.tsx","./src/components/questions/details/longanswerquestion.tsx","./src/components/questions/details/multiplechoicequestion.tsx","./src/components/questions/details/questiondetailtemplate.tsx","./src/components/questions/details/shortanswerquestion.tsx","./src/components/questions/details/singlechoicequestion.tsx","./src/components/questions/details/trueorfalsequestion.tsx","./src/components/questions/editor/exameditorsidebar.tsx","./src/components/questions/editor/longanswerquestioneditor.tsx","./src/components/questions/editor/multiplechoicequestioneditor.tsx","./src/components/questions/editor/questioneditortemplate.tsx","./src/components/questions/editor/questiontypeselector.tsx","./src/components/questions/editor/shortanswerquestioneditor.tsx","./src/components/questions/editor/singlechoicequestioneditor.tsx","./src/components/questions/editor/trueorfalsequestioneditor.tsx","./src/components/questions/view/examviewsidebar.tsx","./src/components/questions/view/longanswerquestionview.tsx","./src/components/questions/view/multiplechoicequestionview.tsx","./src/components/questions/view/questionviewtemplate.tsx","./src/components/questions/view/shortanswerquestionview.tsx","./src/components/questions/view/singlechoicequestionview.tsx","./src/components/questions/view/trueorfalsequestionview.tsx","./src/constants/index.ts","./src/hooks/usegetme.ts","./src/hooks/uselogout.ts","./src/hooks/useuser.ts","./src/hooks/api/types.ts","./src/hooks/api/exam/usecreateexam.ts","./src/hooks/api/exam/usegetexam.ts","./src/hooks/api/exam/usegetexamsummaries.ts","./src/hooks/api/exam/usegetexamwithanswers.ts","./src/hooks/api/exam/usegetmyexamsummaries.ts","./src/hooks/api/exam/usepublishexam.ts","./src/hooks/api/exam/useupdateexamdescription.ts","./src/hooks/api/exam/useupdateexamquestions.ts","./src/hooks/api/exam/useupdateexamtitle.ts","./src/hooks/api/submission/usecreatesubmission.ts","./src/hooks/api/submission/usegetsubmissiondetail.ts","./src/hooks/api/submission/usegetsubmissionsummaries.ts","./src/lib/formatdate.ts","./src/pages/aboutpage.tsx","./src/pages/homepage.tsx","./src/pages/notfoundpage.tsx","./src/pages/dashboard/dashboardpage.tsx","./src/pages/exams/examdetailpage.tsx","./src/pages/exams/management/exammanagementanalyticspage.tsx","./src/pages/exams/management/exammanagementoverviewpage.tsx","./src/pages/exams/management/exammanagementquestionspage.tsx","./src/pages/exams/management/exammanagementsettingspage.tsx","./src/pages/exams/management/layout/exammanagementheader.tsx","./src/pages/exams/management/layout/exammanagementlayout.tsx","./src/stores/useexameditorstore.ts","./src/stores/usesubmissionstore.ts"],"version":"5.6.3"}
{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/apiclient.ts","./src/api/authapi.ts","./src/api/examapi.ts","./src/api/questionapi.ts","./src/api/submissionapi.ts","./src/components/asyncboundary.tsx","./src/components/errorfallback.tsx","./src/components/analytics/multiplechoicequestionwithanswer.tsx","./src/components/analytics/singlechoicequestionwithanswer.tsx","./src/components/analytics/submissionanswers.tsx","./src/components/analytics/submissiondetails.tsx","./src/components/analytics/textanswerquestionwithanswer.tsx","./src/components/analytics/trueorfalsequestionwithanswer.tsx","./src/components/dashboard/draftexamcard.tsx","./src/components/dashboard/publishedexamcard.tsx","./src/components/exams/examsummarycard.tsx","./src/components/exams/newexambutton.tsx","./src/components/layouts/base/baselayout.tsx","./src/components/layouts/base/header.tsx","./src/components/overview/editableinput.tsx","./src/components/overview/examdescriptionoverview.tsx","./src/components/overview/exampublishbutton.tsx","./src/components/overview/examtitleoverview.tsx","./src/components/questions/exammanagementquestionspanel.tsx","./src/components/questions/exammanagementquestionssidebar.tsx","./src/components/questions/details/longanswerquestion.tsx","./src/components/questions/details/multiplechoicequestion.tsx","./src/components/questions/details/questiondetailtemplate.tsx","./src/components/questions/details/shortanswerquestion.tsx","./src/components/questions/details/singlechoicequestion.tsx","./src/components/questions/details/trueorfalsequestion.tsx","./src/components/questions/editor/exameditorsidebar.tsx","./src/components/questions/editor/longanswerquestioneditor.tsx","./src/components/questions/editor/multiplechoicequestioneditor.tsx","./src/components/questions/editor/questioneditortemplate.tsx","./src/components/questions/editor/questiontypeselector.tsx","./src/components/questions/editor/shortanswerquestioneditor.tsx","./src/components/questions/editor/singlechoicequestioneditor.tsx","./src/components/questions/editor/trueorfalsequestioneditor.tsx","./src/components/questions/view/examviewsidebar.tsx","./src/components/questions/view/longanswerquestionview.tsx","./src/components/questions/view/multiplechoicequestionview.tsx","./src/components/questions/view/questionviewtemplate.tsx","./src/components/questions/view/shortanswerquestionview.tsx","./src/components/questions/view/singlechoicequestionview.tsx","./src/components/questions/view/trueorfalsequestionview.tsx","./src/constants/index.ts","./src/hooks/usegetme.ts","./src/hooks/uselogout.ts","./src/hooks/useuser.ts","./src/hooks/api/types.ts","./src/hooks/api/exam/usecreateexam.ts","./src/hooks/api/exam/usegetexam.ts","./src/hooks/api/exam/usegetexamsummaries.ts","./src/hooks/api/exam/usegetexamwithanswers.ts","./src/hooks/api/exam/usegetmyexamsummaries.ts","./src/hooks/api/exam/usepublishexam.ts","./src/hooks/api/exam/useupdateexamdescription.ts","./src/hooks/api/exam/useupdateexamquestions.ts","./src/hooks/api/exam/useupdateexamtitle.ts","./src/hooks/api/submission/usecreatesubmission.ts","./src/hooks/api/submission/usegetsubmissiondetail.ts","./src/hooks/api/submission/usegetsubmissionsummaries.ts","./src/lib/formatdate.ts","./src/pages/aboutpage.tsx","./src/pages/homepage.tsx","./src/pages/notfoundpage.tsx","./src/pages/dashboard/dashboardpage.tsx","./src/pages/exams/examdetailpage.tsx","./src/pages/exams/management/exammanagementanalyticspage.tsx","./src/pages/exams/management/exammanagementoverviewpage.tsx","./src/pages/exams/management/exammanagementquestionspage.tsx","./src/pages/exams/management/exammanagementsettingspage.tsx","./src/pages/exams/management/layout/exammanagementheader.tsx","./src/pages/exams/management/layout/exammanagementlayout.tsx","./src/stores/useexameditorstore.ts","./src/stores/usesubmissionstore.ts"],"version":"5.6.3"}

0 comments on commit 2f69836

Please sign in to comment.