Skip to content

Commit 719c25a

Browse files
committed
Infra: application-dev.yml 파일 제거
- application-dev.yml의 내용 application.yml로 이동
1 parent 4846041 commit 719c25a

File tree

4 files changed

+143
-154
lines changed

4 files changed

+143
-154
lines changed

build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,4 @@ dependencies {
8181

8282
tasks.withType<Test> {
8383
useJUnitPlatform()
84-
// application.yml 거치지않고 application-dev.yml 사용하도록
85-
systemProperty("spring.config.name", "application-dev")
8684
}

src/main/java/com/back/global/initData/DevInitData.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.springframework.transaction.annotation.Transactional;
1414

1515
@Configuration
16-
@Profile("dev")
1716
@RequiredArgsConstructor
1817
public class DevInitData {
1918
private final UserRepository userRepository;

src/main/resources/application-dev.yml

Lines changed: 0 additions & 145 deletions
This file was deleted.

src/main/resources/application.yml

Lines changed: 143 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,147 @@ spring:
22
application:
33
name: catfe-backend
44

5-
# 개발환경
6-
profiles:
7-
active: dev
5+
datasource:
6+
url: jdbc:h2:./db_dev;MODE=MySQL
7+
driver-class-name: org.h2.Driver
8+
username: sa
9+
password:
810

9-
# 운영환경
10-
# profiles:
11-
# active: prod
11+
data:
12+
redis:
13+
host: localhost
14+
port: 6379
15+
16+
config:
17+
import: optional:file:.env[.properties]
18+
19+
jpa:
20+
database-platform: org.hibernate.dialect.H2Dialect
21+
hibernate:
22+
ddl-auto: update # [none | validate | update | create | create-drop]
23+
show-sql: true
24+
properties:
25+
hibernate:
26+
format_sql: true
27+
highlight_sql: true
28+
use_sql_comments: true
29+
defer-datasource-initialization: true
30+
31+
sql:
32+
init:
33+
mode: always
34+
35+
security:
36+
oauth2:
37+
client:
38+
registration:
39+
kakao:
40+
client-id: ${KAKAO_CLIENT_ID}
41+
authorization-grant-type: authorization_code
42+
client-name: Kakao
43+
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
44+
scope: profile_nickname, profile_image, account_email
45+
naver:
46+
client-id: ${NAVER_CLIENT_ID}
47+
client-secret: ${NAVER_CLIENT_SECRET}
48+
client-name: Naver
49+
authorization-grant-type: authorization_code
50+
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
51+
scope: email, nickname, profile_image
52+
google:
53+
client-id: ${GOOGLE_CLIENT_ID}
54+
client-secret: ${GOOGLE_CLIENT_SECRET}
55+
client-name: Google
56+
authorization-grant-type: authorization_code
57+
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
58+
scope:
59+
- email
60+
- profile
61+
github:
62+
client-id: ${GITHUB_CLIENT_ID}
63+
client-secret: ${GITHUB_CLIENT_SECRET}
64+
client-name: GitHub
65+
authorization-grant-type: authorization_code
66+
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
67+
scope: user:email
68+
provider:
69+
kakao:
70+
authorization-uri: https://kauth.kakao.com/oauth/authorize
71+
token-uri: https://kauth.kakao.com/oauth/token
72+
user-info-uri: https://kapi.kakao.com/v2/user/me
73+
user-name-attribute: id
74+
naver:
75+
authorization-uri: https://nid.naver.com/oauth2.0/authorize
76+
token-uri: https://nid.naver.com/oauth2.0/token
77+
user-info-uri: https://openapi.naver.com/v1/nid/me
78+
user-name-attribute: response
79+
google:
80+
authorization-uri: https://accounts.google.com/o/oauth2/v2/auth
81+
token-uri: https://oauth2.googleapis.com/token
82+
user-info-uri: https://www.googleapis.com/oauth2/v3/userinfo
83+
user-name-attribute: sub
84+
github:
85+
authorization-uri: https://github.com/login/oauth/authorize
86+
token-uri: https://github.com/login/oauth/access_token
87+
user-info-uri: https://api.github.com/user
88+
user-name-attribute: id
89+
servlet:
90+
multipart:
91+
max-file-size: 10MB # 업로드할 수 있는 개별 파일의 최대 크기
92+
max-request-size: 10MB # 한 요청의 최대 허용 크기
93+
94+
mail:
95+
host: smtp.gmail.com # Gmail SMTP 서버 (운영 환경에서는 AWS SES 등으로 변경 권장)
96+
port: 587
97+
username: ${EMAIL_USERNAME} # 이메일 주소
98+
password: ${EMAIL_PASSWORD} # 이메일 비밀번호 또는 앱 비밀번호
99+
properties:
100+
mail:
101+
smtp:
102+
auth: true
103+
starttls:
104+
enable: true
105+
106+
springdoc:
107+
default-produces-media-type: application/json;charset=UTF-8
108+
109+
logging:
110+
level:
111+
org.hibernate.orm.jdbc.bind: trace
112+
org.springframework.web.socket: DEBUG
113+
org.springframework.messaging: DEBUG
114+
115+
jwt:
116+
secret: ${JWT_SECRET} # 운영 시에는 반드시 환경 변수로 설정할 것
117+
access-token-expiration: ${JWT_ACCESS_TOKEN_EXPIRATION:1800} # 30분 (초 단위)
118+
refresh-token-expiration: ${JWT_REFRESH_TOKEN_EXPIRATION:604800} # 7일 (초 단위)
119+
120+
# 스터디룸 설정
121+
studyroom:
122+
heartbeat:
123+
timeout-minutes: 5 # Heartbeat 타임아웃 (분)
124+
default:
125+
max-participants: 10 # 기본 최대 참가자 수
126+
allow-camera: true
127+
allow-audio: true
128+
allow-screen-share: true
129+
130+
frontend:
131+
base-url: http://localhost:3000
132+
133+
134+
# AWS S3
135+
cloud:
136+
aws:
137+
credentials:
138+
access-key: ${ACCESS_KEY}
139+
secret-key: ${SECRET_KEY}
140+
141+
region:
142+
static: ${REGION}
143+
144+
s3:
145+
bucket: ${BUCKET_NAME}
146+
147+
stack:
148+
auto: false

0 commit comments

Comments
 (0)