From 1f6da759073206f78e544d5a75db1f350d883f14 Mon Sep 17 00:00:00 2001 From: jisangs Date: Thu, 11 Jun 2026 11:33:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=9C=EB=B9=84=EC=8A=A4=20=ED=8F=AC?= =?UTF-8?q?=ED=8A=B8=20=EB=B3=80=EA=B2=BD:=203001=20->=203000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 6 +++--- docker-compose.stage.yml | 16 ++++++++++++++++ docker-compose.yml | 2 +- docs/deployment.md | 4 ++-- docs/plan/project-plan-claudecode.md | 4 ++-- docs/plan/project-plan.md | 6 +++--- package.json | 2 +- 7 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 docker-compose.stage.yml diff --git a/.env.example b/.env.example index b69b47b..63728b2 100644 --- a/.env.example +++ b/.env.example @@ -2,16 +2,16 @@ DATABASE_URL="mysql://USER:PASSWORD@127.0.0.1:3306/chocomae" AUTH_SECRET="replace-with-local-secret" NEXTAUTH_SECRET="replace-with-local-secret" -NEXTAUTH_URL="http://localhost:3001" +NEXTAUTH_URL="http://localhost:3000" # Production example (.env.production) # DATABASE_URL="mysql://USER:PASSWORD@AWS_EC2_HOST:3306/chocomae" # AUTH_SECRET="replace-with-production-secret" # NEXTAUTH_SECRET="replace-with-production-secret" -# NEXTAUTH_URL="http://NAS_HOST_OR_DOMAIN:3001" +# NEXTAUTH_URL="http://NAS_HOST_OR_DOMAIN:3000" # Stage example (.env.stage) # DATABASE_URL="mysql://USER:PASSWORD@STAGE_DB_HOST:3306/chocomae" # AUTH_SECRET="replace-with-stage-secret" # NEXTAUTH_SECRET="replace-with-stage-secret" -# NEXTAUTH_URL="http://STAGE_HOST_OR_DOMAIN:3001" +# NEXTAUTH_URL="http://STAGE_HOST_OR_DOMAIN:3000" diff --git a/docker-compose.stage.yml b/docker-compose.stage.yml new file mode 100644 index 0000000..f49db2c --- /dev/null +++ b/docker-compose.stage.yml @@ -0,0 +1,16 @@ +services: + chocoadmin: + build: + context: . + dockerfile: Dockerfile + image: chocoadmin-stage:latest + container_name: stage-chocoadmin + ports: + - "3000:3000" + env_file: + - .env.stage + environment: + NODE_ENV: development + PORT: 3000 + HOSTNAME: 0.0.0.0 + restart: unless-stopped diff --git a/docker-compose.yml b/docker-compose.yml index e7e769f..b62e84e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: image: chocoadmin:latest container_name: chocoadmin ports: - - "3001:3000" + - "3000:3000" env_file: - ${ENV_FILE:-.env.production} environment: diff --git a/docs/deployment.md b/docs/deployment.md index b88c356..30ca84c 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -8,7 +8,7 @@ Create `.env.production` on the production host. Do not commit it. DATABASE_URL="mysql://CHCOCO_ADMIN_USER:PASSWORD@AWS_EC2_HOST:3306/chocomae" AUTH_SECRET="replace-with-production-secret" NEXTAUTH_SECRET="replace-with-production-secret" -NEXTAUTH_URL="http://NAS_HOST_OR_DOMAIN:3001" +NEXTAUTH_URL="http://NAS_HOST_OR_DOMAIN:3000" ``` Create `.env.stage` on the stage host with the same keys and stage-specific values. @@ -21,7 +21,7 @@ Create `.env.stage` on the stage host with the same keys and stage-specific valu 2. Place `.env.production` in the repository root on the NAS. 3. In Container Manager, create a project from `docker-compose.yml`. 4. Build and start the project. -5. Open `http://NAS_HOST_OR_DOMAIN:3001/login`. +5. Open `http://NAS_HOST_OR_DOMAIN:3000/login`. Equivalent CLI command: diff --git a/docs/plan/project-plan-claudecode.md b/docs/plan/project-plan-claudecode.md index 9e67cc9..b6e047a 100644 --- a/docs/plan/project-plan-claudecode.md +++ b/docs/plan/project-plan-claudecode.md @@ -96,7 +96,7 @@ | 플랫폼 | Synology NAS (DS920+, 20GB RAM) - Docker | | DB (개발) | localhost MariaDB | | 실행 방법 | `docker compose up` | -| 포트 | 3001 (기존 mouse-typing과 충돌 방지) | +| 포트 | 3000 | ### 5-2. 서비스 환경 @@ -114,7 +114,7 @@ services: chocoadmin: build: . ports: - - "3001:3000" + - "3000:3000" environment: - NODE_ENV=development - DB_HOST=host.docker.internal diff --git a/docs/plan/project-plan.md b/docs/plan/project-plan.md index 96b94b5..d9e3ca8 100644 --- a/docs/plan/project-plan.md +++ b/docs/plan/project-plan.md @@ -58,7 +58,7 @@ | 하드웨어 | 맥미니 | | IDE | IntelliJ IDEA | | 실행 방법 | IntelliJ 터미널에서 `pnpm dev` | -| 포트 | 3001 (기존 mouse-typing과 충돌 방지) | +| 포트 | 3000 | | DB (개발) | 맥미니 로컬 MariaDB (`localhost:3306`) | | 환경변수 | `.env.local` | @@ -93,12 +93,12 @@ services: chocoadmin: build: . ports: - - "3001:3000" + - "3000:3000" environment: - NODE_ENV=production - DATABASE_URL=mysql://USER:PASS@AWS_EC2_HOST:3306/chocomae - NEXTAUTH_SECRET=... - - NEXTAUTH_URL=http://NAS_IP:3001 + - NEXTAUTH_URL=http://NAS_IP:3000 restart: unless-stopped ``` diff --git a/package.json b/package.json index ecac5dc..51ccac8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "packageManager": "pnpm@10.29.3", "scripts": { - "dev": "next dev --port 3001", + "dev": "next dev", "build": "next build", "start": "next start", "lint": "eslint",