Skip to content

Commit

Permalink
hotfix: Redis를 AWS ElastiCache로 전환 (#138)
Browse files Browse the repository at this point in the history
* chore: aws elasticache 도입으로 인한 docker-compose.yml 삭제

* fix: redis.yml 파일 수정

* fix: task-definition.json 파일에 Redis 컨테이너 삭제 및 환경 변수 추가

* fix: Redis Config 수정
  • Loading branch information
ht3064 authored Jul 11, 2024
1 parent e8dc85e commit ed0b339
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 46 deletions.
14 changes: 0 additions & 14 deletions docker-compose.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

import java.time.Duration;

@EnableRedisRepositories(
enableKeyspaceEvents = RedisKeyValueAdapter.EnableKeyspaceEvents.ON_STARTUP)
@EnableRedisRepositories
@Configuration
@RequiredArgsConstructor
public class RedisConfig {
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/application-redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ spring:
on-profile: "redis"
data:
redis:
host: ${REDIS_HOST:localhost}
port: ${REDIS_HOST:6379}
password: ${REDIS_PASSWORD:}
host: ${REDIS_HOST}
port: ${REDIS_PORT}
password: ${REDIS_PASSWORD}
33 changes: 6 additions & 27 deletions task-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,37 +98,16 @@
{
"name": "FCM_CERTIFICATION",
"valueFrom": "arn:aws:secretsmanager:ap-northeast-2:122971469363:secret:playauto/gmp-2dXhTZ:FCM_CERTIFICATION::"
}
],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/pickle-family",
"awslogs-create-group": "true",
"awslogs-region": "ap-northeast-2",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
},
"systemControls": []
},
{
"name": "redis",
"image": "redis:alpine",
"cpu": 0,
"portMappings": [
{
"containerPort": 6379,
"hostPort": 6379,
"protocol": "tcp"
"name": "REDIS_HOST",
"valueFrom": "arn:aws:secretsmanager:ap-northeast-2:122971469363:secret:playauto/gmp-2dXhTZ:REDIS_HOST::"
},
{
"name": "REDIS_PORT",
"valueFrom": "arn:aws:secretsmanager:ap-northeast-2:122971469363:secret:playauto/gmp-2dXhTZ:REDIS_PORT::"
}
],
"essential": true,
"environment": [],
"environmentFiles": [],
"mountPoints": [],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
Expand Down

0 comments on commit ed0b339

Please sign in to comment.