Skip to content

Commit

Permalink
πŸš€ [DEPLOY] local, dev ν™˜κ²½ 뢄리 #23
Browse files Browse the repository at this point in the history
  • Loading branch information
ddongseop committed Jan 5, 2024
1 parent 0716543 commit 40015b7
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 38 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ out/

### Config ###
application-secret.properties
scripts/
application.yaml
application.yaml
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ ENV AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}
ENV AWS_OUTPUT_FORMAT=${AWS_OUTPUT_FORMAT}

# μ»¨ν…Œμ΄λ„ˆ μ‹€ν–‰ μ‹œ Java μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ‹€ν–‰
CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "lequuServer.jar"]
CMD ["java", "-Duser.timezone=Asia/Seoul", "-jar", "-Dspring.profiles.active=dev", "lequuServer.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class SecurityConfig {
private static final String[] AUTH_WHITELIST = {
"/kakao/**", "/loading", "/error", "/login", "/reissue",
"/test/**", "/health", "/actuator/health",
"/images/**"
"/images/**", "/"
};

@Bean
Expand Down
33 changes: 33 additions & 0 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
spring:
config:
activate:
on-profile: local

datasource:
driver-class-name: ${DB_NAME_DEV}
url: ${DB_URL_DEV}
username: ${DB_USER_DEV}
password: ${DB_PW_DEV}

jpa:
show-sql: true
hibernate:
ddl-auto: update
properties:
hibernate:
format_sql: true
show_sql: true
default_batch_fetch_size: 500

data:
redis:
host: redis
port: 6379

kakao:
client-id: ${KAKAO_ID}
authorization-grant-type: authorization_code
redirect-uri: ${KAKAO_REDIRECT_DEV}

server:
address: 0.0.0.0
31 changes: 31 additions & 0 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
spring:
config:
activate:
on-profile: local
import: optional:application-secret.properties

datasource:
driver-class-name: ${DB_NAME_LOCAL}
url: ${DB_URL_LOCAL}
username: ${DB_USER_LOCAL}
password: ${DB_PW_LOCAL}

jpa:
show-sql: true
hibernate:
ddl-auto: create
properties:
hibernate:
format_sql: true
show_sql: true
default_batch_fetch_size: 500

data:
redis:
host: localhost
port: 6379

kakao:
client-id: ${KAKAO_ID}
authorization-grant-type: authorization_code
redirect-uri: ${KAKAO_REDIRECT_LOCAL}
39 changes: 5 additions & 34 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,20 @@
server:
address: 0.0.0.0

spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${DATABASE_ENDPOINT_URL}:3306/${DATABASE_NAME}?serverTimezone=UTC&characterEncoding=UTF-8
username: ${DATABASE_USER}
password: ${DATABASE_PASSWORD}

jpa:
show-sql: true
hibernate:
ddl-auto: update
properties:
hibernate:
format_sql: true
show_sql: true
default_batch_fetch_size: 500
profiles:
active: local

servlet:
multipart:
enabled: true
max-file-size: 3MB
max-request-size: 5MB

data:
redis:
host: redis
port: 6379

config:
import: optional:application-secret.properties
jwt:
secret: ${JWT_SECRET}

cloud:
aws:
credentials:
accessKey: ${ACCESS_KEY}
secretKey: ${SECRET_KEY}
aws-region: ap-northeast-2
s3-bucket-name: ${BUCKET_NAME}

kakao:
client-id: ${KAKAO_ID}
authorization-grant-type: authorization_code
redirect-uri: ${KAKAO_REDIRECT}

jwt:
secret: ${JWT_SECRET}
s3-bucket-name: ${BUCKET_NAME}

0 comments on commit 40015b7

Please sign in to comment.