Skip to content

Commit 405151e

Browse files
authored
Merge pull request #60 from codeit-part3-team2/deploy
[release] MONEW v.1.0.3
2 parents 5745e1a + c9b9498 commit 405151e

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,28 @@ jobs:
154154
PORT="${{ matrix.service.port }}"
155155
TASK_DEF="${{ env.NEW_TASK_ARN }}"
156156
157-
# Network JSON (public subnets + monew-ecs-sg, public IP)
157+
# Network JSON (public subnets + SGs[], public IP)
158158
IFS=',' read -r -a SUBNETS <<< "${{ env.PUBLIC_SUBNETS_CSV }}"
159-
SUBNET_JSON=$(printf '"%s",' "${SUBNETS[@]}"); SUBNET_JSON="[${SUBNET_JSON%,}]"
159+
SUBNET_JSON=$(printf '"%s",' "${SUBNETS[@]}")
160+
SUBNET_JSON="[${SUBNET_JSON%,}]"
161+
162+
SGS_STR="${{ env.ECS_SERVICE_SG }}" # 예: "sg-aaaa,sg-bbbb"
163+
SG_JSON=$(jq -nc --arg s "$SGS_STR" '$s | split(",")')
164+
160165
NET_JSON=$(jq -nc \
161-
--argjson subnets "$SUBNET_JSON" \
162-
--arg sg "${{ env.ECS_SERVICE_SG }}" \
163-
'{awsvpcConfiguration:{subnets: $subnets, securityGroups: [$sg], assignPublicIp: "ENABLED"}}')
166+
--argjson subnets "$SUBNET_JSON" \
167+
--argjson sgs "$SG_JSON" \
168+
'{
169+
awsvpcConfiguration: {
170+
subnets: $subnets,
171+
securityGroups: $sgs,
172+
assignPublicIp: "ENABLED"
173+
}
174+
}')
175+
176+
echo "Network: $NET_JSON"
177+
178+
164179
165180
LB_JSON=$(jq -nc \
166181
--arg tg "$TG_ARN" --arg cn "$CONTAINER" --argjson cp "$PORT" \

monew-batch/src/main/java/com/monew/monew_batch/article/scheduler/AricleBatchScheduler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public AricleBatchScheduler(
3535
this.yonhapRssJob = yonhapRssJob;
3636
}
3737

38-
// @Scheduled(cron = "0 0 * * * *", zone = "Asia/Seoul")
39-
@Scheduled(fixedRate = 600000) // 테스트용
38+
@Scheduled(cron = "0 0 * * * *", zone = "Asia/Seoul")
39+
// @Scheduled(fixedRate = 600000) // 테스트용
4040
public void runJob() throws Exception {
4141
log.info("🕒 [Batch Scheduler] 뉴스 수집 Job 실행");
4242

0 commit comments

Comments
 (0)