king 20232baf06 feat(project): add font options and selected goal text formatting
Restore the board header add button to the task side panel while keeping footer quick entry. Add safe, persisted goal text formatting and self-hosted Project font preferences with shared help updates and regression coverage.
2026-10-02 17:28:54 +09:00

DBX 메인 페이지

Google Workspace 계정으로 로그인한 뒤 허용된 사용자만 업무 메뉴에 접근하는 FastAPI 웹앱입니다.
Nginx Proxy Manager(NPM) 뒤에서 Docker 컨테이너로 실행하는 구성을 기준으로 작성했습니다.

접속 허용 계정

허용 목록은 app/main.py의 ALLOWED_EMAILS에서 서버 측으로 검사합니다.


Google OAuth 설정

Google Cloud Console에서 OAuth 클라이언트를 만들고 아래 값을 등록합니다.

항목 값
승인된 JavaScript 원본 https://dbx.no1king.freeddns.org
승인된 리디렉션 URI (운영) https://dbx.no1king.freeddns.org/auth/google
승인된 리디렉션 URI (로컬) http://localhost:8080/auth/google

Google 로그인 화면에서 hd=dbxcorp.co.kr 힌트를 보내지만,
실제 접근 제한은 서버에서 이메일 도메인과 허용 계정 목록으로 다시 검사합니다.


환경 변수

변수 설명
GOOGLE_CLIENT_ID Google OAuth 클라이언트 ID
GOOGLE_CLIENT_SECRET Google OAuth 클라이언트 보안 비밀
SESSION_SECRET_KEY 세션 쿠키 서명용 랜덤 문자열
SESSION_COOKIE_SECURE HTTPS 환경 true / 로컬 HTTP false
PUBLIC_BASE_URL 외부 접속 주소 (예: https://dbx.no1king.freeddns.org)
CS_ORDER_URL CS 발주 업무 버튼 이동 주소
CUSTOMER_ORDER_LIST_URL 고객 주문리스트 프로그램 버튼 이동 주소

로컬 Docker 테스트

# 1. 환경 변수 파일 준비
copy .env.local.example .env.local
# .env.local 을 열어 Google OAuth 키 등 실제 값으로 수정

# 2. 이미지 빌드 및 컨테이너 실행
docker compose -f docker-compose.local.yml up --build

# 3. 브라우저에서 확인
# http://localhost:8080

Google 로컬 OAuth 주의
Google Cloud Console → OAuth 클라이언트 → 승인된 리디렉션 URI에
http://localhost:8080/auth/google 를 반드시 추가해야 합니다.


서버 배포 (Ubuntu + NPM)

NPM은 dbx.no1king.freeddns.org → http://192.168.0.194:80 으로 이미 설정되어 있습니다.

# 서버에서 실행

# 1. 저장소 클론
git clone https://gitea.no1king.freeddns.org/king/dbx-main.git
cd dbx-main

# 2. 환경 변수 파일 준비
cp .env.example .env
# .env 를 열어 실제 값으로 수정
nano .env

# 3. 이미지 빌드 및 백그라운드 실행
docker compose up --build -d

# 4. 로그 확인
docker compose logs -f

업데이트 배포

git pull
docker compose up --build -d

컨테이너 관리

docker compose ps          # 상태 확인
docker compose down        # 중지
docker compose restart web # 재시작

폰트

app/static/fonts/ 에 Pretendard 폰트가 포함되어 있습니다.

파일 굵기
Pretendard-Thin.ttf 100 (얇음)
Pretendard-Regular.ttf 400 (기본)
Pretendard-Bold.ttf 700 (굵음)
S
Description
DBX 메인페이지
Readme 20 MiB
Languages
Python 46.2%
JavaScript 23.7%
HTML 11.3%
PLpgSQL 10.7%
CSS 7.3%
Other 0.7%