From 2b38e2118846fc15568319f5c5aaa01db70e49fc Mon Sep 17 00:00:00 2001 From: ttipo Date: Wed, 17 Jun 2026 13:16:03 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20env=20example=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=A0=95=EB=B9=84=20(=EB=A3=A8=ED=8A=B8=C2=B7=ED=94=84?= =?UTF-8?q?=EB=A1=A0=ED=8A=B8=20=EC=B6=94=EA=B0=80,=20=EB=8B=A8=EB=8F=85?= =?UTF-8?q?=20=EC=8B=A4=ED=96=89=20=EC=98=88=EC=8B=9C=20=EC=A0=9C=EA=B1=B0?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 루트 .env.{development,production}.example 신규 (비밀값 placeholder 마스킹) - frontend .env.{development,production}.example 신규 (docker build arg 주입 설명) - backend example 의 단독 실행(non-Docker) 예시 블록 제거 Co-Authored-By: Claude Opus 4.8 (1M context) --- .env.development.example | 39 +++++++++++++++++++++++++++++++ .env.production.example | 39 +++++++++++++++++++++++++++++++ backend/.env.development.example | 14 ++--------- backend/.env.production.example | 14 ++--------- frontend/.env.development.example | 5 ++++ frontend/.env.production.example | 5 ++++ 6 files changed, 92 insertions(+), 24 deletions(-) create mode 100644 .env.development.example create mode 100644 .env.production.example create mode 100644 frontend/.env.development.example create mode 100644 frontend/.env.production.example diff --git a/.env.development.example b/.env.development.example new file mode 100644 index 0000000..14b261b --- /dev/null +++ b/.env.development.example @@ -0,0 +1,39 @@ +# ========================================== +# 프로젝트 전역 설정 +# ========================================== +PROJECT_NAME=comrelay +APP_ENV=development +BUILD_MODE=development +FRONTEND_DIR=frontend +BACKEND_DIR=backend + +# ========================================== +# 포트 설정 +# ========================================== +FRONTEND_PORT=5273 +BACKEND_PORT=3100 +WEBSOCKET_PORT=3101 +DB_PORT=5532 +REDIS_PORT=6479 + +# ========================================== +# Database 설정 +# ========================================== +DB_IMAGE=postgres:15-alpine +DB_USER=dev_ttipo +DB_PASSWORD=change-me-db-password +DB_NAME=comrelay_db +DB_DATA_DIR=./data/postgres + +# ========================================== +# Redis 설정 +# ========================================== +REDIS_IMAGE=redis:7-alpine +REDIS_PASSWORD=change-me-redis-password +REDIS_DATA_DIR=./data/redis + +# ========================================== +# API 경로 설정 +# ========================================== +BACKEND_API_URL=http://localhost:3100/api +CORS_ORIGIN=http://localhost:5273 diff --git a/.env.production.example b/.env.production.example new file mode 100644 index 0000000..15d3ec0 --- /dev/null +++ b/.env.production.example @@ -0,0 +1,39 @@ +# ========================================== +# 프로젝트 전역 설정 +# ========================================== +PROJECT_NAME=comrelay +APP_ENV=production +BUILD_MODE=production +FRONTEND_DIR=frontend +BACKEND_DIR=backend + +# ========================================== +# 포트 설정 +# ========================================== +FRONTEND_PORT=5173 +BACKEND_PORT=3000 +WEBSOCKET_PORT=3001 +DB_PORT=5432 +REDIS_PORT=6379 + +# ========================================== +# Database 설정 +# ========================================== +DB_IMAGE=postgres:15-alpine +DB_USER=prd_ttipo +DB_PASSWORD=change-me-db-password +DB_NAME=comrelay_db +DB_DATA_DIR=./data/postgres + +# ========================================== +# Redis 설정 +# ========================================== +REDIS_IMAGE=redis:7-alpine +REDIS_PASSWORD=change-me-redis-password +REDIS_DATA_DIR=./data/redis + +# ========================================== +# API 경로 설정 +# ========================================== +BACKEND_API_URL=http://localhost:3000/api +CORS_ORIGIN=http://localhost:5173 diff --git a/backend/.env.development.example b/backend/.env.development.example index 619b3ff..cb2d0b6 100644 --- a/backend/.env.development.example +++ b/backend/.env.development.example @@ -22,15 +22,5 @@ GITEA_TOKEN=change-me-gitea-token # GITEA_ORG: 저장소가 생성될 조직 이름 (Relay 의 owner 로도 사용) GITEA_ORG=marketing-team # 템플릿 저장소(생성 시 복제) — 미설정 시 기본 TtiPo/project-base 사용. Gitea 에서 template 설정 필요 -GITEA_TEMPLATE_OWNER=TtiPo -GITEA_TEMPLATE_REPO=project-base - -# --- 단독 실행(non-Docker) 시 주석 해제 --- -# NODE_ENV=development -# DB_HOST=localhost -# DB_PORT=5532 -# DB_USER=dev_ttipo -# DB_PASSWORD=dev_960426 -# DB_NAME=comrelay_db -# FRONTEND_URL=http://localhost:5173 -# CORS_ORIGIN=http://localhost:5173 +GITEA_TEMPLATE_OWNER=ttiPo +GITEA_TEMPLATE_REPO=project-base \ No newline at end of file diff --git a/backend/.env.production.example b/backend/.env.production.example index 619b3ff..cb2d0b6 100644 --- a/backend/.env.production.example +++ b/backend/.env.production.example @@ -22,15 +22,5 @@ GITEA_TOKEN=change-me-gitea-token # GITEA_ORG: 저장소가 생성될 조직 이름 (Relay 의 owner 로도 사용) GITEA_ORG=marketing-team # 템플릿 저장소(생성 시 복제) — 미설정 시 기본 TtiPo/project-base 사용. Gitea 에서 template 설정 필요 -GITEA_TEMPLATE_OWNER=TtiPo -GITEA_TEMPLATE_REPO=project-base - -# --- 단독 실행(non-Docker) 시 주석 해제 --- -# NODE_ENV=development -# DB_HOST=localhost -# DB_PORT=5532 -# DB_USER=dev_ttipo -# DB_PASSWORD=dev_960426 -# DB_NAME=comrelay_db -# FRONTEND_URL=http://localhost:5173 -# CORS_ORIGIN=http://localhost:5173 +GITEA_TEMPLATE_OWNER=ttiPo +GITEA_TEMPLATE_REPO=project-base \ No newline at end of file diff --git a/frontend/.env.development.example b/frontend/.env.development.example new file mode 100644 index 0000000..de347d8 --- /dev/null +++ b/frontend/.env.development.example @@ -0,0 +1,5 @@ +# ========================================== +# 프론트엔드 고유 설정 예시 — 복사해 .env.development 생성 +# VITE_API_BASE_URL 은 docker-compose 가 루트 .env 의 BACKEND_API_URL 을 +# build arg 로 주입하므로 별도로 작성하지 않는다. +# ========================================== diff --git a/frontend/.env.production.example b/frontend/.env.production.example new file mode 100644 index 0000000..523a653 --- /dev/null +++ b/frontend/.env.production.example @@ -0,0 +1,5 @@ +# ========================================== +# 프론트엔드 고유 설정 예시 — 복사해 .env.production 생성 +# VITE_API_BASE_URL 은 docker-compose 가 루트 .env 의 BACKEND_API_URL 을 +# build arg 로 주입하므로 별도로 작성하지 않는다. +# ==========================================