Skip to content

Commit

Permalink
Config: Add dev profile
Browse files Browse the repository at this point in the history
  • Loading branch information
huGgW committed Apr 3, 2024
1 parent 96ea7b0 commit aa82ed3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 7 deletions.
48 changes: 41 additions & 7 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ spring:
active: local
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
properties:
hibernate:
dialect: com.wafflestudio.csereal.common.config.MySQLDialectCustom
servlet:
multipart:
enabled: true
Expand Down Expand Up @@ -50,9 +54,6 @@ spring:
ddl-auto: update
show-sql: true
open-in-view: false
properties:
hibernate:
dialect: com.wafflestudio.csereal.common.config.MySQLDialectCustom
security:
oauth2:
client:
Expand Down Expand Up @@ -80,11 +81,8 @@ spring:
config.activate.on-profile: prod
jpa:
hibernate:
ddl-auto: update # TODO: change to validate (or none) when save actual data to server
ddl-auto: validate
open-in-view: false
properties:
hibernate:
dialect: com.wafflestudio.csereal.common.config.MySQLDialectCustom
security:
oauth2:
client:
Expand Down Expand Up @@ -117,6 +115,42 @@ slack:
token: ${SLACK_TOKEN}
channel: ${SLACK_CHANNEL}

---
spring:
config.activate.on-profile: dev
jpa:
hibernate:
ddl-auto: update
show-sql: true
open-in-view: false
security:
oauth2:
client:
registration:
idsnucse:
client-id: cse-waffle-dev
client-secret: ${OIDC_CLIENT_SECRET}
authorization-grant-type: authorization_code
scope: openid, profile, email
redirect-uri: https://${URL}/api/v1/login/oauth2/code/idsnucse
provider:
idsnucse:
issuer-uri: https://id.snucse.org/o
jwk-set-uri: https://id.snucse.org/o/jwks

csereal:
upload:
path: /app/files/

oldFiles:
path: /app/cse-files/

endpoint:
backend: https://${URL}/api
frontend: https://${URL}

login-page: https://${URL}

---
spring:
config.activate.on-profile: test
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@
</root>
</springProfile>

<springProfile name="dev">
<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>
</springProfile>

<springProfile name="prod">
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="ASYNC_SLACK" />
</root>
</springProfile>

</configuration>

0 comments on commit aa82ed3

Please sign in to comment.