Files
dbx-main/.env.example
T
king 9c58b022e2 feat(expense): 개인경비 모듈 + ERP 좌측메뉴 셸 + expense_db 연결
- ERP 셸: 좌측 사이드바 + 상단 헤더 + 콘텐츠 영역(erp_base.html)
- 분기: 슈퍼관리자 → 업무모듈 카드, 일반사용자 → ERP 메인(erp_home.html)
- 신규 라우트: /modules (슈퍼관리자 모듈 카드 재진입)
- 개인경비 모듈: app/modules/expense/ (라우터/저장소/템플릿)
  - JSON 저장소(ExpenseStore) + PostgreSQL 저장소(ExpenseDBStore)
  - 팩토리: EXPENSE_DB_URL 있으면 DB, 없으면 JSON 폴백
- DB: scripts/sql/expense_db_init.sql (멱등 DDL, postgres-db 컨테이너)
  - expense_db, 역할 expense_app, 테이블 expense_items, 인덱스/트리거
- 마이그레이션: scripts/migrate_expense_json_to_db.py (멱등, --dry-run)
- 의존성: psycopg[binary,pool]>=3.2
- 환경변수: EXPENSE_DB_URL 추가
- 문서: CLAUDE.md 작업 기준 + docs/{PROJECT_OVERVIEW,SERVER_ARCHITECTURE,DATABASES,DEPLOYMENT}.md
  - main-app 배포 경로 /opt/www/main 고정 명시
  - 위험 명령(DROP/TRUNCATE/rm -rf/volume 삭제) 사용자 승인 정책
2026-05-29 02:21:03 +09:00

23 lines
1.2 KiB
Bash

GOOGLE_CLIENT_ID=your-google-oauth-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-google-oauth-client-secret
# OMS(orderlist) 와 SSO 하려면 양쪽 .env 에 동일한 값으로 설정.
# 미설정 시 컨테이너 기동 실패(fail-fast). openssl rand -hex 32 로 생성 권장.
SESSION_SECRET_KEY=replace-with-a-long-random-secret
SESSION_COOKIE_NAME=session
SESSION_COOKIE_SECURE=true
# 세션 유효기간(초). OMS(orderlist) 와 동일하게 맞출 것. 28800=8h
SESSION_MAX_AGE=28800
# 포털 접근 허용 이메일. 쉼표로 구분. 비워두면 코드의 기본 목록 사용.
ALLOWED_EMAILS=king@dbxcorp.co.kr,julie@dbxcorp.co.kr,ellen@dbxcorp.co.kr,bj@dbxcorp.co.kr
PUBLIC_BASE_URL=https://dbx.no1king.freeddns.org
# 비워두면 같은 도메인의 /corm/ 경로(NPM 리버스 프록시)로 자동 연결됨
CS_ORDER_URL=/corm/
# 비워두면 같은 도메인의 /orderlist/ 경로(NPM 리버스 프록시)로 자동 연결됨
CUSTOMER_ORDER_LIST_URL=/orderlist/
# ─── 개인경비 모듈 (expense_db) ───
# 설정하면 PostgreSQL 사용, 미설정 시 DATA_DIR/expense.json 사용.
# DB/역할 생성: scripts/sql/expense_db_init.sql 참고.
# EXPENSE_DB_URL=postgresql://expense_app:replace-me@postgres-db:5432/expense_db