From df00c16e5b412abd520f5ff320296a8edf7403af Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 03:36:27 +0900 Subject: [PATCH 01/10] =?UTF-8?q?debug:=20=EC=9E=98=EB=AA=BB=EB=90=9C=20?= =?UTF-8?q?=EB=8F=84=EB=A9=94=EC=9D=B8=20=EB=AA=85=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- terraform/storage.tf | 2 +- terraform/variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform/storage.tf b/terraform/storage.tf index 63e9e4a4..78ee5250 100644 --- a/terraform/storage.tf +++ b/terraform/storage.tf @@ -16,7 +16,7 @@ resource "google_storage_bucket" "cockple_assets" { uniform_bucket_level_access = true cors { - origin = ["https://cockple.shop", "https://staging.cockple.shop"] + origin = ["https://cockple.store", "https://staging.cockple.store"] method = ["GET", "PUT", "POST", "DELETE"] response_header = ["Content-Type"] max_age_seconds = 3600 diff --git a/terraform/variables.tf b/terraform/variables.tf index 2f96e69b..27b8c522 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -16,7 +16,7 @@ variable "cloudflare_api_token" { } variable "cloudflare_zone_id" { - description = "cockple.shop Cloudflare Zone ID" + description = "cockple.store Cloudflare Zone ID" type = string } From 2b70f31260a7cf35cc2fb4a7b7d0b6b7fc7ada3b Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 03:40:37 +0900 Subject: [PATCH 02/10] =?UTF-8?q?debug:=20=EB=8F=84=EC=BB=A4=20=EC=84=A4?= =?UTF-8?q?=EC=B9=98=20=EB=B0=8F=20docker=20compose=20V1/V2=20=EB=B6=88?= =?UTF-8?q?=EC=9D=BC=EC=B9=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- terraform/compute.tf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/terraform/compute.tf b/terraform/compute.tf index d10c794f..8910e2cf 100644 --- a/terraform/compute.tf +++ b/terraform/compute.tf @@ -36,9 +36,13 @@ resource "google_compute_instance" "prod" { metadata_startup_script = <<-EOF #!/bin/bash apt-get update -y - apt-get install -y docker.io - curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose - chmod +x /usr/local/bin/docker-compose + apt-get install -y ca-certificates curl gnupg + install -m 0755 -d /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + chmod a+r /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + apt-get update -y + apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin systemctl enable docker systemctl start docker usermod -aG docker ubuntu From b18f9399689b769e408977fc6b8d607a81cdc27b Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 03:41:15 +0900 Subject: [PATCH 03/10] =?UTF-8?q?test:=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=B4=20=EC=9E=84=EC=9D=98=EB=A1=9C=20?= =?UTF-8?q?pull=5Frequest=20=EC=83=9D=EC=84=B1=20=EC=8B=9C=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=EB=90=98=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7f8f4449..b0b4cbbf 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -2,6 +2,8 @@ name: COCKPLE_CD on: push: branches: [ "main", "develop" ] + pull_request: + branches: [ "develop"] permissions: contents: read From a3a2089ce52d35bc33e90a44e3105893a7df070a Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 03:52:28 +0900 Subject: [PATCH 04/10] =?UTF-8?q?chore:=20deploy.sh=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=ED=97=AC=EC=8A=A4=EC=B2=B4=ED=81=AC=EB=A5=BC=20=EC=88=98?= =?UTF-8?q?=ED=96=89=ED=95=B4=20=EC=BB=A8=ED=85=8C=EC=9D=B4=EB=84=88=20?= =?UTF-8?q?=EC=84=B1=EA=B3=B5=20=EC=9C=A0=EB=AC=B4=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=9D=BC=20cd=EA=B0=80=20=EC=84=B1=EA=B3=B5=20=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 132b5a13..12f17ac2 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -40,3 +40,33 @@ sudo docker compose up -d $SERVICE echo "=== 배포 후 상태 ===" sudo docker ps + +echo "=== 헬스체크 ===" +for container in cockple-mysql cockple-redis $SERVICE; do + for i in $(seq 1 12); do + STATUS=$(sudo docker inspect --format='{{.State.Status}}' $container 2>/dev/null) + HEALTH=$(sudo docker inspect --format='{{if .State.Health}}{{.State.Health.Status}}{{else}}none{{end}}' $container 2>/dev/null) + + if [ "$STATUS" != "running" ]; then + echo "FAIL: $container 상태 이상 (status=$STATUS)" + sudo docker logs --tail 20 $container + exit 1 + fi + + if [ "$HEALTH" == "healthy" ] || [ "$HEALTH" == "none" ]; then + echo "OK: $container (status=$STATUS, health=$HEALTH)" + break + fi + + if [ $i -eq 12 ]; then + echo "FAIL: $container 헬스체크 타임아웃 (health=$HEALTH)" + sudo docker logs --tail 20 $container + exit 1 + fi + + echo "대기 중: $container ($i/12, health=$HEALTH)..." + sleep 5 + done +done + +echo "=== 배포 성공 ===" From b60c3f9c8174fd8c80fd2460370775993c4c94c8 Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 03:58:41 +0900 Subject: [PATCH 05/10] =?UTF-8?q?chore:=20=EB=B0=B0=ED=8F=AC=EA=B0=80=20?= =?UTF-8?q?=EC=84=B1=EA=B3=B5=ED=96=88=EC=9C=BC=EB=AF=80=EB=A1=9C=20?= =?UTF-8?q?=EB=8B=A4=EC=8B=9C=20=EB=B0=B0=ED=8F=AC=20=EC=A1=B0=EA=B1=B4=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b0b4cbbf..7f8f4449 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -2,8 +2,6 @@ name: COCKPLE_CD on: push: branches: [ "main", "develop" ] - pull_request: - branches: [ "develop"] permissions: contents: read From 288c7958ed34fde81017455dc9346a10274b151e Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 03:59:04 +0900 Subject: [PATCH 06/10] =?UTF-8?q?debug:=20nginx=EC=9D=98=20depends-on=20?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=EB=95=8C=EB=AC=B8=EC=97=90=20cockple-app?= =?UTF-8?q?=EB=8F=84=20=EA=B0=99=EC=9D=B4=20=EB=B0=B0=ED=8F=AC=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 09d702bd..d96ecb64 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -104,9 +104,6 @@ services: volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx/conf.d:/etc/nginx/conf.d:ro - depends_on: - - cockple-app - - cockple-app-staging mem_limit: 64m memswap_limit: 128m From 35870077ac9b67e7b68e5eae9a8d5a6936e02ac7 Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 04:03:05 +0900 Subject: [PATCH 07/10] =?UTF-8?q?debug:=20cockple.shop=EC=9C=BC=EB=A1=9C?= =?UTF-8?q?=20=EC=9E=98=EB=AA=BB=20=EA=B8=B0=EC=9E=AC=EB=90=9C=20nginx=20s?= =?UTF-8?q?erver=20name=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 ++ nginx/conf.d/prod.conf | 2 +- nginx/conf.d/staging.conf | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7f8f4449..b0b4cbbf 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -2,6 +2,8 @@ name: COCKPLE_CD on: push: branches: [ "main", "develop" ] + pull_request: + branches: [ "develop"] permissions: contents: read diff --git a/nginx/conf.d/prod.conf b/nginx/conf.d/prod.conf index 4f812314..29cee792 100644 --- a/nginx/conf.d/prod.conf +++ b/nginx/conf.d/prod.conf @@ -1,6 +1,6 @@ server { listen 80; - server_name cockple.shop; + server_name cockple.store; location / { proxy_pass http://cockple-app:8080; diff --git a/nginx/conf.d/staging.conf b/nginx/conf.d/staging.conf index 7fd60692..ae25a977 100644 --- a/nginx/conf.d/staging.conf +++ b/nginx/conf.d/staging.conf @@ -1,6 +1,6 @@ server { listen 80; - server_name staging.cockple.shop; + server_name staging.cockple.store; location / { proxy_pass http://cockple-app-staging:8080; From cb243affd0e10bd1b23ac33a383f6d9fa908e8ac Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 04:11:41 +0900 Subject: [PATCH 08/10] =?UTF-8?q?debug:=20https=EB=A5=BC=20=EC=A0=95?= =?UTF-8?q?=EC=83=81=EC=A0=81=EC=9C=BC=EB=A1=9C=20=EC=A0=84=EB=8B=AC?= =?UTF-8?q?=ED=95=98=EA=B8=B0=20=EC=9C=84=ED=95=B4=20scheme=EB=8C=80?= =?UTF-8?q?=EC=8B=A0=20http=5Fx=5Fforwarded=5Fproto=EB=A1=9C=20=EA=B7=B8?= =?UTF-8?q?=EB=8C=80=EB=A1=9C=20=EC=A0=84=EB=8B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx/conf.d/prod.conf | 2 +- nginx/conf.d/staging.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/conf.d/prod.conf b/nginx/conf.d/prod.conf index 29cee792..314b3e38 100644 --- a/nginx/conf.d/prod.conf +++ b/nginx/conf.d/prod.conf @@ -7,6 +7,6 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; } } diff --git a/nginx/conf.d/staging.conf b/nginx/conf.d/staging.conf index ae25a977..2a222c17 100644 --- a/nginx/conf.d/staging.conf +++ b/nginx/conf.d/staging.conf @@ -7,6 +7,6 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; } } From 3751c0fb9b88cf9fef52add762c0f19f8a2cef44 Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 04:14:00 +0900 Subject: [PATCH 09/10] =?UTF-8?q?chore:=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=B4=20=EB=B3=80=EA=B2=BD=ED=96=88?= =?UTF-8?q?=EB=8D=98=20CD=20=EC=A1=B0=EA=B1=B4=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b0b4cbbf..7f8f4449 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -2,8 +2,6 @@ name: COCKPLE_CD on: push: branches: [ "main", "develop" ] - pull_request: - branches: [ "develop"] permissions: contents: read From 44f6e77ab83f21cd310a688433e458c9f782cdcb Mon Sep 17 00:00:00 2001 From: Dimo-2562 Date: Wed, 25 Feb 2026 04:19:48 +0900 Subject: [PATCH 10/10] =?UTF-8?q?chore:=20staging=20=EB=8F=84=EB=A9=94?= =?UTF-8?q?=EC=9D=B8=EC=9D=84=20CORS=20=ED=97=88=EC=9A=A9=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/umc/cockple/demo/global/config/SecurityConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/umc/cockple/demo/global/config/SecurityConfig.java b/src/main/java/umc/cockple/demo/global/config/SecurityConfig.java index 6aae4a97..52718bf0 100644 --- a/src/main/java/umc/cockple/demo/global/config/SecurityConfig.java +++ b/src/main/java/umc/cockple/demo/global/config/SecurityConfig.java @@ -69,7 +69,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { @Bean public CorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration(); - config.setAllowedOrigins(List.of("http://localhost:5173", "https://cockple.store", "https://cockple-fe.vercel.app")); // 배포 시에는 도메인 지정 권장 + config.setAllowedOrigins(List.of("http://localhost:5173", "https://cockple.store", "https://staging.cockple.store", "https://cockple-fe.vercel.app")); // 배포 시에는 도메인 지정 권장 config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")); config.setAllowedHeaders(List.of("*")); config.setAllowCredentials(true);