1+ {
2+ "family" : " user-service-task" ,
3+ "executionRoleArn" : " arn:aws:iam::826331271523:role/ecsTaskExecutionRole" ,
4+ "taskRoleArn" : " arn:aws:iam::826331271523:role/ecsUserServiceRole" ,
5+ "networkMode" : " awsvpc" ,
6+ "requiresCompatibilities" : [
7+ " FARGATE"
8+ ],
9+ "cpu" : " 1024" ,
10+ "memory" : " 3072" ,
11+ "containerDefinitions" : [
12+ {
13+ "name" : " user-service-task" ,
14+ "image" : " ${IMAGE_URI}" ,
15+ "essential" : true ,
16+ "cpu" : 0 ,
17+ "portMappings" : [
18+ {
19+ "containerPort" : 50051 ,
20+ "hostPort" : 50051 ,
21+ "protocol" : " tcp" ,
22+ "name" : " user-service-50051-tcp" ,
23+ "appProtocol" : " grpc"
24+ },
25+ {
26+ "containerPort" : 8081 ,
27+ "hostPort" : 8081 ,
28+ "protocol" : " tcp" ,
29+ "name" : " user-service-8081-tcp" ,
30+ "appProtocol" : " http"
31+ }
32+ ],
33+ "environment" : [
34+ { "name" : " EUREKA_CLIENT_ENABLED" , "value" : " true" },
35+ { "name" : " GRPC_PORT" , "value" : " 50051" },
36+ { "name" : " EUREKA_INSTANCE_HOSTNAME" , "value" : " user-service.hanium.local" },
37+ { "name" : " DB_PORT" , "value" : " 3306" },
38+ { "name" : " SPRING_CONFIG_IMPORT" , "value" : " configserver:http://config-service.hanium.local:8888" },
39+ { "name" : " SPRING_PROFILES_ACTIVE" , "value" : " prod" },
40+ { "name" : " SPRING_APPLICATION_NAME" , "value" : " user-service" },
41+ { "name" : " ZIPKIN_ENDPOINT" , "value" : " http://zipkin-service.hanium.local:9411/api/v2/spans" },
42+ { "name" : " EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE" , "value" : " http://discovery-service.hanium.local:8761/eureka" }
43+ ],
44+ "secrets" : [
45+ { "name" : " DB_HOST" , "valueFrom" : " arn:aws:secretsmanager:ap-northeast-2:826331271523:secret:prod/mysql/user-service-GfKyQU:host::" },
46+ { "name" : " DB_NAME" , "valueFrom" : " arn:aws:secretsmanager:ap-northeast-2:826331271523:secret:prod/mysql/user-service-GfKyQU:name::" },
47+ { "name" : " DB_PASSWORD" , "valueFrom" : " arn:aws:secretsmanager:ap-northeast-2:826331271523:secret:prod/mysql/user-service-GfKyQU:password::" },
48+ { "name" : " DB_USER" , "valueFrom" : " arn:aws:secretsmanager:ap-northeast-2:826331271523:secret:prod/mysql/user-service-GfKyQU:username::" }
49+ ],
50+ "healthCheck" : {
51+ "command" : [ " CMD-SHELL" , " curl -f http://localhost:8081/actuator/health || exit 1" ],
52+ "interval" : 30 ,
53+ "retries" : 3 ,
54+ "startPeriod" : 120 ,
55+ "timeout" : 5
56+ },
57+ "logConfiguration" : {
58+ "logDriver" : " awslogs" ,
59+ "options" : {
60+ "awslogs-group" : " /ecs/user-service-task" ,
61+ "awslogs-create-group" : " true" ,
62+ "awslogs-region" : " ap-northeast-2" ,
63+ "awslogs-stream-prefix" : " ecs"
64+ }
65+ }
66+ },
67+ {
68+ "name" : " redis" ,
69+ "image" : " redis:7-alpine" ,
70+ "essential" : false ,
71+ "cpu" : 0 ,
72+ "portMappings" : [
73+ {
74+ "containerPort" : 6379 ,
75+ "hostPort" : 6379 ,
76+ "protocol" : " tcp" ,
77+ "name" : " redis-6379-tcp"
78+ }
79+ ],
80+ "healthCheck" : {
81+ "command" : [ " CMD-SHELL" , " redis-cli ping | grep PONG || exit 1" ],
82+ "interval" : 5 ,
83+ "timeout" : 3 ,
84+ "retries" : 5 ,
85+ "startPeriod" : 5
86+ }
87+ }
88+ ]
89+ }
0 commit comments