Skip to content

Commit

Permalink
feat: 무중단 배포를 위한 환경분리 추가 (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjooon2 authored Oct 18, 2023
1 parent 5ba559e commit 329b823
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 57 deletions.
28 changes: 0 additions & 28 deletions backend/deploy-dev.sh

This file was deleted.

28 changes: 0 additions & 28 deletions backend/deploy-prod.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# port
server:
port: 8080
shutdown: graceful

---
# database
Expand Down
59 changes: 59 additions & 0 deletions backend/src/main/resources/application-dev2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
# port
server:
port: 8081
shutdown: graceful

---
# database
spring:
datasource:
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: ${JDBC_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}

---
# jpa
spring:
jpa:
database: mysql
database-platform: org.hibernate.dialect.MySQL57Dialect
generate-ddl: true
hibernate:
ddl-auto: none
properties:
hibernate:
format_sql: true
show_sql: true
default_batch_fetch_size: 30
defer-datasource-initialization: true

sql:
init:
mode: never

---
# OAUTH
oauth:
kakao:
client-id: ${CLIENT_ID}
redirect-uri: ${REDIRECT_URI}
client-secret: ${CLIENT_SECRET}

---
# jwt
jwt:
secret-key: ${ZIPGO_SECRET_KEY}
access-token-expiration-time: ${ACCESS_TOKEN_EXPIRATION_TIME}
refresh-token-expiration-time: ${REFRESH_TOKEN_EXPIRATION_TIME}

---
# aws
cloud:
aws:
s3:
bucket: ${WOOTECO_BUCKET}
zipgo-directory: ${ZIPGO_DIRECTORY}
env: ${ENVIRONMENT_DIRECTORY}
image-url: ${ZIPGO_IMAGE_URL}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# port
server:
port: 8080
shutdown: graceful

---
# database
Expand Down
62 changes: 62 additions & 0 deletions backend/src/main/resources/application-prod2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
# port
server:
port: 8081
shutdown: graceful

---
# database
spring:
datasource:
driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: ${JDBC_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}

---
# jpa
spring:
jpa:
database: mysql
database-platform: org.hibernate.dialect.MySQL57Dialect
generate-ddl: true
hibernate:
ddl-auto: none
properties:
hibernate:
format_sql: true
show_sql: true
default_batch_fetch_size: 30
# open-in-view: false

---
# OAuth
oauth:
kakao:
client-id: ${CLIENT_ID}
redirect-uri: ${REDIRECT_URI}
client-secret: ${CLIENT_SECRET}

---
# jwt
jwt:
secret-key: ${ZIPGO_SECRET_KEY}
access-token-expiration-time: ${ACCESS_TOKEN_EXPIRATION_TIME}
refresh-token-expiration-time: ${REFRESH_TOKEN_EXPIRATION_TIME}

---
# log
logging:
level:
org.hibernate.SQL: error
org.hibernate.type: error

---
# cloud
cloud:
aws:
s3:
bucket: ${WOOTECO_BUCKET}
zipgo-directory: ${ZIPGO_DIRECTORY}
env: ${ENVIRONMENT_DIRECTORY}
image-url: ${ZIPGO_IMAGE_URL}
2 changes: 1 addition & 1 deletion backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# application
spring:
profiles:
active: dev
active: local

---
#metric, log monitoring
Expand Down

0 comments on commit 329b823

Please sign in to comment.