From 6ac6807b1be64f83a557725f4b968a44cf6e64d2 Mon Sep 17 00:00:00 2001 From: chpark Date: Sat, 30 May 2026 13:55:46 +0900 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20DB=20IP=EB=A5=BC=20121.156.99.3?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EA=B0=B1=EC=8B=A0=20=E2=80=94=20=EC=9A=B4?= =?UTF-8?q?=EC=98=81=20.env.production=20=EC=9E=90=EB=8F=99=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .gitea/workflows/deploy.yml: heredoc DATABASE_URL을 새 DB IP로 - CICD_SETUP.md / e2e 스크립트: 문서·테스트의 DB URL 일괄 갱신 - 이전엔 git push 후에도 deploy.yml의 hardcoded 구IP가 .env.production을 덮어써서 운영이 옛 DB로 부팅됨 → 본 커밋으로 자동배포 시 신 DB 적용 Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/deploy.yml | 2 +- CICD_SETUP.md | 2 +- scripts/test-prod-e2e.mjs | 2 +- scripts/test-prod-full-e2e.mjs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index bb55e26..2f47e91 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -43,7 +43,7 @@ jobs: # .env.production 갱신 (SMTP/MOMO 포함) cat > .env.production <<'ENVEOF' - DATABASE_URL=postgresql://momo_app:qlalfqjsgh11@183.99.177.40:5432/distribution + DATABASE_URL=postgresql://momo_app:qlalfqjsgh11@121.156.99.3:5432/distribution NEXTAUTH_URL=https://momotogether.com NEXTAUTH_SECRET=2b1f94cca798f49ff62822b01617503b019d118df9d249ee61f835a7dca1946e NEXT_PUBLIC_APP_NAME=유통관리 ERP diff --git a/CICD_SETUP.md b/CICD_SETUP.md index 38ce805..0ca741e 100644 --- a/CICD_SETUP.md +++ b/CICD_SETUP.md @@ -14,7 +14,7 @@ Gitea 저장소 → **Settings → Actions → Secrets** 에 다음 시크릿을 | `DEPLOY_HOST` | `183.99.177.40` | | `DEPLOY_USER` | `chpark` | | `DEPLOY_SSH_KEY` | SSH 개인키 전체 (BEGIN/END 포함) | -| `DATABASE_URL` | `postgresql://postgres:qlalfqjsgh11@183.99.177.40:5432/distribution` | +| `DATABASE_URL` | `postgresql://momo_app:qlalfqjsgh11@121.156.99.3:5432/distribution` | | `NEXTAUTH_URL` | `https://momotogether.com` | | `NEXTAUTH_SECRET` | 임의의 32바이트 hex (현재 .env.production 값 재사용 가능) | | `MASTER_PWD` | `qlalfqjsgh11` | diff --git a/scripts/test-prod-e2e.mjs b/scripts/test-prod-e2e.mjs index 56cfde9..79e8d6f 100644 --- a/scripts/test-prod-e2e.mjs +++ b/scripts/test-prod-e2e.mjs @@ -16,7 +16,7 @@ import { fileURLToPath } from "node:url"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const BASE = process.env.E2E_BASE || "http://localhost:3000"; -const DB_URL = "postgresql://momo_app:qlalfqjsgh11@183.99.177.40:5432/distribution"; +const DB_URL = "postgresql://momo_app:qlalfqjsgh11@121.156.99.3:5432/distribution"; const ADMIN_EMAIL = "admin@momo.com"; const ADMIN_PASS = "admin1234"; diff --git a/scripts/test-prod-full-e2e.mjs b/scripts/test-prod-full-e2e.mjs index 26128cc..e0ac1af 100644 --- a/scripts/test-prod-full-e2e.mjs +++ b/scripts/test-prod-full-e2e.mjs @@ -4,7 +4,7 @@ import pg from "pg"; const BASE = process.env.E2E_BASE || "https://momo.junggomoa.com"; -const DB_URL = "postgresql://momo_app:qlalfqjsgh11@183.99.177.40:5432/distribution"; +const DB_URL = "postgresql://momo_app:qlalfqjsgh11@121.156.99.3:5432/distribution"; const log = (...a) => console.log("[e2e]", ...a); const fail = (m) => { console.error("[e2e] ✖", m); process.exit(1); };