diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5a84a38..8a98c72 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -154,13 +154,28 @@ jobs: PORT="${{ matrix.service.port }}" TASK_DEF="${{ env.NEW_TASK_ARN }}" - # Network JSON (public subnets + monew-ecs-sg, public IP) + # Network JSON (public subnets + SGs[], public IP) IFS=',' read -r -a SUBNETS <<< "${{ env.PUBLIC_SUBNETS_CSV }}" - SUBNET_JSON=$(printf '"%s",' "${SUBNETS[@]}"); SUBNET_JSON="[${SUBNET_JSON%,}]" + SUBNET_JSON=$(printf '"%s",' "${SUBNETS[@]}") + SUBNET_JSON="[${SUBNET_JSON%,}]" + + SGS_STR="${{ env.ECS_SERVICE_SG }}" # 예: "sg-aaaa,sg-bbbb" + SG_JSON=$(jq -nc --arg s "$SGS_STR" '$s | split(",")') + NET_JSON=$(jq -nc \ - --argjson subnets "$SUBNET_JSON" \ - --arg sg "${{ env.ECS_SERVICE_SG }}" \ - '{awsvpcConfiguration:{subnets: $subnets, securityGroups: [$sg], assignPublicIp: "ENABLED"}}') + --argjson subnets "$SUBNET_JSON" \ + --argjson sgs "$SG_JSON" \ + '{ + awsvpcConfiguration: { + subnets: $subnets, + securityGroups: $sgs, + assignPublicIp: "ENABLED" + } + }') + + echo "Network: $NET_JSON" + + LB_JSON=$(jq -nc \ --arg tg "$TG_ARN" --arg cn "$CONTAINER" --argjson cp "$PORT" \ diff --git a/monew-batch/src/main/java/com/monew/monew_batch/article/scheduler/AricleBatchScheduler.java b/monew-batch/src/main/java/com/monew/monew_batch/article/scheduler/AricleBatchScheduler.java index 1077cf3..bfc5f3a 100644 --- a/monew-batch/src/main/java/com/monew/monew_batch/article/scheduler/AricleBatchScheduler.java +++ b/monew-batch/src/main/java/com/monew/monew_batch/article/scheduler/AricleBatchScheduler.java @@ -35,8 +35,8 @@ public AricleBatchScheduler( this.yonhapRssJob = yonhapRssJob; } -// @Scheduled(cron = "0 0 * * * *", zone = "Asia/Seoul") - @Scheduled(fixedRate = 600000) // 테스트용 + @Scheduled(cron = "0 0 * * * *", zone = "Asia/Seoul") +// @Scheduled(fixedRate = 600000) // 테스트용 public void runJob() throws Exception { log.info("🕒 [Batch Scheduler] 뉴스 수집 Job 실행");