Skip to content

Commit

Permalink
Elastic Cache - Valkey 도입 (#48)
Browse files Browse the repository at this point in the history
* refactor: production redis host, port를 env에서 가져온다.
* refactor: local docker commpose에서 redis 대신 valkey를 사용한다.
* refactor: production redis를 docker에서 지우고, AWS Elastic Cache로 변경한다.
  • Loading branch information
alstn113 committed Feb 10, 2025
1 parent ea1a0d1 commit bba2756
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
4 changes: 2 additions & 2 deletions server/compose.local.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
redis:
container_name: redis
image: redis:7.4.1
container_name: valkey
image: valkey/valkey:8.0
restart: always
ports:
- '6379:6379'
8 changes: 0 additions & 8 deletions server/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,8 @@ x-app: &app
TZ: Asia/Seoul
SPRING_PROFILES_ACTIVE: prod
restart: always
depends_on:
- redis

services:
redis:
container_name: redis
image: redis:7.4.1
restart: always
ports:
- '6379:6379'
app-blue:
<<: *app
container_name: app-blue
Expand Down
14 changes: 6 additions & 8 deletions server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ spring:
profiles:
active: local
---
spring.config.activate.on-profile: local

spring:
config:
activate:
on-profile: local
h2:
console:
path: /h2-console
Expand Down Expand Up @@ -82,10 +81,9 @@ management:
include: health

---
spring.config.activate.on-profile: prod

spring:
config:
activate:
on-profile: prod
datasource:
url: ${DB_URL}
username: ${DB_USERNAME}
Expand All @@ -104,8 +102,8 @@ spring:
ddl-auto: validate
data:
redis:
host: redis
port: 6379
host: ${REDIS_HOST}
port: ${REDIS_PORT}
cloud:
aws:
credentials:
Expand Down

0 comments on commit bba2756

Please sign in to comment.