Skip to content

Commit

Permalink
dev profile 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
power-minu committed Dec 3, 2024
1 parent 1d21ad3 commit 2866e38
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RUN curl -sSL https://github.com/jwilder/dockerize/releases/download/v0.6.1/dock

ARG JAR_FILE=RevUp-api/build/libs/RevUp-api-0.0.1-SNAPSHOT.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT [ "dockerize", "-wait", "tcp://mysql:3306", "-timeout", "30s", "java", "-Dspring.profiles.active=local", "-jar", "/app.jar" ]
ENTRYPOINT [ "dockerize", "-wait", "tcp://mysql:3306", "-timeout", "30s", "java", "-Dspring.profiles.active=dev", "-jar", "/app.jar" ]
37 changes: 30 additions & 7 deletions RevUp-domain/src/main/resources/application-domain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@ spring:
activate:
on-profile: local
import: domain-variable.yaml
datasource:
url: ${database.url}
username: ${database.username}
password: ${database.password}
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate:
ddl-auto: create
properties:
hibernate:
show-sql: true
format_sql: true
dialect: org.hibernate.dialect.MySQL8Dialect
default_batch_fetch_size: 1000
generate-ddl: true
defer-datasource-initialization: true
sql:
init:
data-locations: classpath:sql/data.sql
mode: always

---

spring:
config:
activate:
on-profile: dev
import: domain-variable.yaml
datasource:
url: ${SPRING_DATASOURCE_URL}
username: ${SPRING_DATASOURCE_USERNAME}
Expand All @@ -14,7 +42,7 @@ spring:
max-lifetime: 1800000
jpa:
hibernate:
ddl-auto: update
ddl-auto: create
properties:
hibernate:
show-sql: true
Expand All @@ -32,9 +60,4 @@ logging:
level:
org.hibernate.SQL: DEBUG
org.hibernate.type.descriptor.sql: TRACE
root: debug
---
spring:
config:
activate:
on-profile: dev
root: debug
37 changes: 34 additions & 3 deletions RevUp-infra/src/main/resources/application-infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,45 @@ aws:
refresh:
expiration_time: ${security.exp_time}
key: ${security.key}

---

spring:
config:
activate:
on-profile: dev
import: infra-variable.yaml

data:
redis:
host:
password:
port:
host: ${redis.host}
port: ${redis.port}
password: ${redis.password}

mail:
host: smtp.gmail.com
port: 587
username: ${mail.username}
password: ${mail.password}
properties:
mail:
smtp:
auth: true
timeout: 5000
starttls:
enable: true
aws:
s3:
bucket: ${aws.s3.bucket}
credentials:
access-key: ${aws.credentials.access-key}
secret-key: ${aws.credentials.secret-key}
region:
static: ${aws.region}
auto : ${aws.region.auto}
stack:
auto:${aws.region.stack.auto}

refresh:
expiration_time: ${security.exp_time}
key: ${security.key}
9 changes: 4 additions & 5 deletions RevUp-security/src/main/resources/application-security.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
spring:
config:
import: security-variable.yaml
Expand Down Expand Up @@ -61,8 +60,8 @@ jwt:
access-expiration-time: ${security.access-expiration-time}
refresh-expiration-time: ${security.refresh-expiration-time}


---

spring:
config:
import: security-variable.yaml
Expand Down Expand Up @@ -121,9 +120,9 @@ spring:
user-info-authentication-method: header

jwt:
secret-key: ${jwt.key}
access-expiration-time: ${jwt.access-expiration-time}
refresh-expiration-time: ${jwt.refresh-expiration-time}
secret-key: ${security.key}
access-expiration-time: ${security.access-expiration-time}
refresh-expiration-time: ${security.refresh-expiration-time}



0 comments on commit 2866e38

Please sign in to comment.